Skip to content

Core Events

Subscribe to core ZMQ proxy events

Core subscriptions expose bitcoind’s ZMQ event stream over WebSocket. blockd receives raw ZMQ messages from bitcoind and re-shapes them into JSON events. These are lower-level events intended for applications that need direct chain data.


SubscriptionDescription
core.hashblockNew block hash from bitcoind
core.hashtxNew transaction hash from bitcoind
core.rawblockRaw block bytes from bitcoind
core.rawtxRaw transaction bytes from bitcoind
core.sequenceMempool and chain sequence events

Fires when bitcoind broadcasts a new block hash.

{
"subscriptions": [
{
"subscribe": "core.hashblock"
}
]
}

Event:

{
"event": "bitcoind_hashblock",
"hash": "00000000590f69588b42f409796be4049ad8c4528e04f26f2fdabebbab7e0e18",
"height": 909745,
"time": 1755032952,
"sequence": 0
}

blockd automatically calls getblockheader RPC to fetch height and time and adds them to the event. If the getblockheader RPC call has not yet completed at the time of broadcast, height and time will be absent from the event.


Fires when bitcoind broadcasts a new transaction hash.

{
"subscriptions": [
{
"subscribe": "core.hashtx"
}
]
}

Event:

{
"event": "bitcoind_hashtx",
"hash": "82cb1fc54a4d891d687c3898a7ebcd54da996e7f26e1fd6f2a21dc2f655194fa",
"sequence": 0
}

Fires when bitcoind broadcasts a new block.

{
"subscriptions": [
{
"subscribe": "core.rawblock"
}
]
}

Event:

{
"event": "bitcoind_rawblock",
"data": "<hex>",
"sequence": 0
}

data is the hex-encoded raw block bytes.


Fires when bitcoind broadcasts a new transaction.

{
"subscriptions": [
{
"subscribe": "core.rawtx"
}
]
}

Event:

{
"event": "bitcoind_rawtx",
"data": "<hex>",
"sequence": 0
}

data is the hex-encoded raw transaction bytes.


Fires on bitcoind mempool and chain sequence events.

{
"subscriptions": [
{
"subscribe": "core.sequence"
}
]
}

No args subscribes to all ops. To filter by op:

{
"subscriptions": [
{
"subscribe": "core.sequence",
"args": {
"op": [
"block_connected",
"block_disconnected",
"tx_added",
"tx_removed"
]
}
}
]
}

Event:

{
"event": "bitcoind_sequence",
"op": "block_connected",
"hash": "00000000590f69588b42f409796be4049ad8c4528e04f26f2fdabebbab7e0e18",
"height": 909745,
"time": 1755032952,
"sequence": 0
}

For block_connected and block_disconnected events, blockd automatically calls getblockheader RPC to fetch height and time and adds them to the event. These fields are not present in the raw ZMQ message — blockd enriches them for you.

Fields present by op:

Ophashheighttimemempool_sequence
block_connectedblock hash
block_disconnectedblock hash
tx_addedtx hash
tx_removedtx hash

All core events include a sequence field — a monotonic counter from bitcoind’s ZMQ publisher. Gaps in the sequence indicate missed messages, which may occur under high load or during ZMQ disruptions. See zmq_outages under ZMQ monitoring.

In production, monitor for gaps and treat them as a signal that your application may have missed events. If a gap is detected, re-execute relevant workflows and verify the current block tip to ensure your local state is current.

mempool_sequence is a separate monotonic counter tracking mempool state changes, present only on tx_added and tx_removed ops.