v1

latestOpenAPI 3.0.02026-07-174823135.4 KB
Events

Query event stream

Retrieves a stream of events for the specified cryptocurrency.

get/v1/cryptos/{cryptoCode}/events

Path parameters

cryptoCodestring required

The cryptocurrency code to track (e.g., 'BTC' for Bitcoin, 'LTC' for Litecoin).

Query parameters

lastEventIdinteger

Will query all events which happened after this event ID; the first event has ID 1 (default: 0).

longPollingboolean

If no events have been received since lastEventId, the call will block (default: false).

limitinteger

Limit the maximum number of events to return (default: null).

Response

Event stream retrieved successfully.

eventIdinteger

Unique identifier of the event. (Sequential)

type'newblock' | 'newtransaction'

Type of the event (e.g., 'newblock', 'newtransaction').

Example response

[
  {
    "data": {
      "height": 104,
      "hash": "1f31c605c0a5d54b65fa39dc8cb4db025be63c66280279ade9338571a9e63d35",
      "previousBlockHash": "7639350b31f3ce07ff976ebae772fef1602b30a10ccb8ca69047fe0fe8b9083c",
      "cryptoCode": "BTC",
      "confirmations": 1
    }
  }
]