---
title: "Query event stream"
method: GET
path: "/v1/cryptos/{cryptoCode}/events"
tags: ["Events"]
---

# Query event stream

`GET /v1/cryptos/{cryptoCode}/events`

Retrieves a stream of events for the specified cryptocurrency.

## Path parameters

- `cryptoCode` string, required

## Query parameters

- `lastEventId` integer
- `longPolling` boolean
- `limit` integer

## Response `200`

Event stream retrieved successfully.

- object[]
  - `eventId` integer — Unique identifier of the event. (Sequential)
  - `type` 'newblock' | 'newtransaction' — Type of the event (e.g., 'newblock', 'newtransaction').
  - `data` union — Details of the event, depending on the type.
    - NewBlockEvent
      - `height` integer — Height of the new block.
      - `hash` string — Hash of the new block.
      - `previousBlockHash` string — Hash of the previous block.
      - `cryptoCode` string — Cryptocurrency code (e.g., 'BTC').
      - `confirmations` integer — Number of confirmations (typically 1 for a new block).
    - NewTransactionEvent
      - `blockId` string, nullable — Hash of the block containing the transaction, or null if unconfirmed.
      - `trackedSource` string — The tracked source identifier (e.g., derivation scheme).
      - `derivationStrategy` string — The derivation strategy used.
      - `transactionData` TransactionResult
        - `blockHash` string — The hash of the block containing this transaction. Will be `null` if the transaction is unconfirmed.
        - `confirmations` integer — Number of confirmations the transaction has.
        - `height` integer — The block height. Will be `null` if the transaction is unconfirmed.
        - `transactionId` string — The transaction ID.
        - `transaction` string — Raw transaction in hex format. Included only if `includeTransaction` is `true`.
        - `metadata` TransactionMetadata, nullable — Additional metadata related to the transaction. This may be null if the transaction had been indexed when it wasn't in the mempool anymore.'
          - `vsize` integer, nullable — Virtual size of the transaction. Only available if the transaction has been indexed when it was in the mempool.
          - `fees` integer, nullable — Total fee of this transaction in satoshi. Only available if the transaction has been indexed when it was in the mempool.
          - `feeRate` number, nullable — The estimated fee rate in satoshis per vByte. Only available if the transaction has been indexed when it was in the mempool.
          - `chunk` object, nullable — Fee metadata for the transaction chunk, as reported by Bitcoin Core mempool entry data.
            - `fees` integer, nullable — Total fee of this chunk in satoshi.
            - `weight` integer, nullable — Total chunk weight in weight units.
            - `feeRate` number, nullable — Chunk fee rate in satoshis per vByte.
        - `timestamp` integer — The UNIX timestamp indicating when the transaction was first seen by NBXplorer.
        - `replacedBy` string, nullable — If present, indicates the transaction ID that replaced this transaction via RBF.
      - `outputs` TransactionOutput[] — List of outputs related to the transaction.
        - `address` string — The address of the output.
        - `scriptPubKey` string — The scriptPubKey of the output in hexadecimal format.
        - `index` integer — The position of the referenced output in the previous transaction's output list'.
        - `feature` string, nullable — Specifies the type of address generated. Possible values are: - `Deposit`: A deposit address from the external chain (`0/x`). - `Change`: A change address from the internal chain (`1/x`). - `Direct`: An address from the direct chain (`x`). - `Custom`: An address using a custom key path template.
        - `value` integer — The amount of the output in satoshis.
        - `keyPath` string — The derivation path if the output is associated with the wallet. (Only for standard derivation schemes)
        - `keyIndex` integer — The index of the key in the descriptor (For example, if the keyPath is 0/123, then it is 123)
      - `inputs` TransactionInput[] — List of inputs related to the transaction.
        - `inputIndex` integer — The position of this input in the transaction's input list.
        - `transactionId` string — The transaction ID (hash) of the previous transaction whose output is being spent.
        - `index` integer — The position of the referenced output in the previous transaction's output list'.
        - `feature` string, nullable — Specifies the type of address generated. Possible values are: - `Deposit`: A deposit address from the external chain (`0/x`). - `Change`: A change address from the internal chain (`1/x`). - `Direct`: An address from the direct chain (`x`). - `Custom`: An address using a custom key path template.
        - `address` string — The address of the output.
        - `scriptPubKey` string — The scriptPubKey of the output being spent, in hexadecimal format.
        - `keyPath` string — The derivation path if the output is associated with the wallet. (Only for standard derivation schemes)
        - `keyIndex` integer — The index of the key in the descriptor (For example, if the keyPath is 1/2, then it is 2)
        - `value` integer — The amount of the output being spent, in satoshis.
      - `cryptoCode` string — Cryptocurrency code (e.g., 'BTC').

## Other responses

- `400` — Bad Request. Invalid parameters.

---

[API](https://skmtc.net/btcpayserver/apis/nbxplorer-api.md) · [All operations](https://skmtc.net/btcpayserver/apis/nbxplorer-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/btcpayserver/nbxplorer-api/versions/208cac39e31a/schema)
