How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Blockchain.com WebSocket APIs

Real-time WebSocket APIs covering two distinct surfaces — the Bitcoin / blockchain.info explorer socket (unconfirmed transactions, new blocks, per-address activity) and the Blockchain.com Exchange mercury-gateway socket (heartbeat, ticker, L2/L3 order books, prices, symbols, trades, plus authenticated balances and trading).

This event API exposes 33 operations across 17 channels, and defines 37 schemas. It is described by AsyncAPI 2.6.0, at version 1.0.0.

The API connects through 2 servers: ws.blockchain.info/inv (wss), ws.blockchain.info/mercury-gateway/v1/ws (wss).

33 operations 17 channels 37 schemas

Metadata

The identity and technical contract details declared by the specification.

Specification
AsyncAPI 2.6.0
API Version
1.0.0
Base URL
wss://ws.blockchain.info
Resource Areas
1

Channels & Operations 33

Across 17 channels, the API surfaces 33 operations. Each is listed below with its action, channel, parameters, and response codes.

Channels 33
SUB
/inv#unconfirmed_sub
Receive utx events for newly seen unconfirmed transactions.
receiveUnconfirmedTx body
PUB
/inv#unconfirmed_sub
Subscribe / unsubscribe to all unconfirmed transactions.
subscribeUnconfirmed body
SUB
/inv#blocks_sub
Receive block events for each newly mined block.
receiveBlock body
PUB
/inv#blocks_sub
Subscribe / unsubscribe to new block notifications.
subscribeBlocks body
SUB
/inv#addr_sub
Receive utx events for transactions involving the subscribed address.
receiveAddressTx 1 param body
PUB
/inv#addr_sub
Subscribe / unsubscribe to transactions for a specific Bitcoin address.
subscribeAddress 1 param body
SUB
/inv#op_return_sub
Receive utx events for transactions that include OPRETURN data.
receiveOpReturnTx body
PUB
/inv#op_return_sub
Subscribe to transactions containing OPRETURN outputs.
subscribeOpReturn body
SUB
/inv#ping_tx
Receive the latest utx message in response to pingtx.
receivePingTx body
PUB
/inv#ping_tx
Request the most recently seen transaction.
pingTx body
SUB
/inv#ping_block
Receive the latest block message in response to pingblock.
receivePingBlock body
PUB
/inv#ping_block
Request the most recently seen block.
pingBlock body
PUB
/inv#ping
Keep the connection alive.
pingConnection body
SUB
/mercury-gateway/v1/ws#heartbeat
Receive periodic heartbeat updates.
receiveHeartbeat body
PUB
/mercury-gateway/v1/ws#heartbeat
Subscribe / unsubscribe to heartbeats.
subscribeHeartbeat body
SUB
/mercury-gateway/v1/ws#l2
Receive L2 snapshot and incremental updates.
receiveL2 body
PUB
/mercury-gateway/v1/ws#l2
Subscribe / unsubscribe to L2 order book updates for a symbol.
subscribeL2 body
SUB
/mercury-gateway/v1/ws#l3
Receive L3 snapshot and incremental updates.
receiveL3 body
PUB
/mercury-gateway/v1/ws#l3
Subscribe / unsubscribe to L3 order book updates for a symbol.
subscribeL3 body
SUB
/mercury-gateway/v1/ws#prices
Receive OHLCV candle updates.
receivePrices body
PUB
/mercury-gateway/v1/ws#prices
Subscribe / unsubscribe to candlestick updates.
subscribePrices body
SUB
/mercury-gateway/v1/ws#symbols
Receive symbol snapshot and status updates.
receiveSymbols body
PUB
/mercury-gateway/v1/ws#symbols
Subscribe / unsubscribe to symbol status updates.
subscribeSymbols body
SUB
/mercury-gateway/v1/ws#ticker
Receive ticker snapshot and updates.
receiveTicker body
PUB
/mercury-gateway/v1/ws#ticker
Subscribe / unsubscribe to ticker updates for a symbol.
subscribeTicker body
SUB
/mercury-gateway/v1/ws#trades
Receive trade execution updates.
receiveTrades body
PUB
/mercury-gateway/v1/ws#trades
Subscribe / unsubscribe to trade execution updates for a symbol.
subscribeTrades body
SUB
/mercury-gateway/v1/ws#auth
Authentication result.
receiveAuth body
PUB
/mercury-gateway/v1/ws#auth
Submit credentials to authenticate the connection.
subscribeAuth body
SUB
/mercury-gateway/v1/ws#balances
Receive user balance snapshots.
receiveBalances body
PUB
/mercury-gateway/v1/ws#balances
Subscribe / unsubscribe to balance snapshots.
subscribeBalances body
SUB
/mercury-gateway/v1/ws#trading
Receive order snapshots, execution reports and admin events.
receiveTrading body
PUB
/mercury-gateway/v1/ws#trading
Subscribe to or interact with the trading channel.
tradingActions body

Messages & Schemas 37

The contract defines 37 schemas that model the data carried by its messages. The most detailed is ExchangeOrder (24 properties). Each schema is shown below with its type and property counts.

BitcoinOpPing
message
BitcoinOpPingTx
message
BitcoinOpPingBlock
message
BitcoinOpUnconfirmedSub
message
BitcoinOpUnconfirmedUnsub
message
BitcoinOpBlocksSub
message
BitcoinOpBlocksUnsub
message
BitcoinOpAddrSub
message
BitcoinOpAddrUnsub
message
BitcoinOpOpReturnSub
message
BitcoinUtxMessage
message
BitcoinBlockMessage
message
ExchangeSubscribeAction
message
ExchangeSubscribeSymbolAction
message
ExchangeSubscribePricesAction
message
ExchangeAdminEvent
message
ExchangeHeartbeatUpdate
message
ExchangeL2Event
message
ExchangeL3Event
message
ExchangePricesUpdate
message
ExchangeSymbolsSnapshot
message
ExchangeSymbolUpdate
message
ExchangeTickerSnapshot
message
ExchangeTradeUpdate
message
ExchangeAuthSubscribe
message
ExchangeAuthSubscribed
message
ExchangeAuthRejected
message
ExchangeBalancesSnapshot
message
ExchangeTradingSubscribe
message
ExchangeNewOrderSingle
message
ExchangeCancelOrderRequest
message
ExchangeOrderMassCancelRequest
message
ExchangeOrderMassStatusRequest
message
ExchangeTradingSnapshot
message
ExchangeExecutionReport
message
ExchangeTradingRejected
message
ExchangeOrder
object
Order / execution-report payload using FIX 4.2 field names. Returned in trading channel snapshots and updates.
24 properties

Specification

The full machine-readable AsyncAPI contract behind this narrative.

Source

blockchain-com-asyncapi.yml Raw ↑
Where this information came from

This is an independent, third-party profile of Blockchain.com WebSocket APIs, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.