AsyncAPI description of Bitquery's real-time blockchain data streams, delivered as GraphQL subscriptions over WebSocket. The same V2 GraphQL schema served from the HTTP endpoint (`https://streaming.bitquery.io/graphql`) is also available as a push stream over WebSocket, with each new block, transaction, transfer, DEX trade, instruction, or event matching the subscription's `where` filter pushed to the client as it is observed onchain (or in the mempool). Bitquery supports both of the standard GraphQL-over-WebSocket subprotocols: - `graphql-ws` (legacy "subscriptions-transport-ws" protocol, message types `connection_init` / `connection_ack` / `start` / `data` / `ka` / `complete` / `error`) - `graphql-transport-ws` (modern protocol, message types `connection_init` / `connection_ack` / `subscribe` / `next` / `ping` / `pong` / `complete` / `error`) Authentication uses an OAuth bearer token (`ory_at_...`) appended to the WebSocket URL as a `?token=` query string parameter. The `Sec-WebSocket-Protocol` header MUST be set to `graphql-ws` or `graphql-transport-ws` to negotiate the subprotocol. Bitquery's WebSocket server does not honor `stop` messages from the client - the only reliable way to terminate a single subscription is to send a `complete` frame for its `id`, and the only reliable way to end a session is to close the WebSocket. Supported networks across the V2 streaming endpoint include Ethereum, BSC, Base, Solana, Arbitrum, Optimism, Tron, and Polygon (Matic). The legacy Early Access Program endpoint (`wss://streaming.bitquery.io/eap`) continues to be honored for existing customers; all chains that lived on EAP (Solana, Matic, and others) have been migrated to the V2 endpoint for new users.
View SpecView on GitHubBlockchain DataGraphQLStreamingIndexerDEXNFTCryptoWeb3AsyncAPIWebhooksEvents
Channels
/
publishsendClientFrames
Client-to-server GraphQL protocol frames.
The single GraphQL-over-WebSocket channel exposed by Bitquery. All subscription operations (DEX trades, transfers, blocks, transactions, mempool transactions, contract events, balance updates, etc.) are multiplexed over this one channel using GraphQL protocol envelopes. The actual data shape is determined by the GraphQL document sent in the `subscribe` (or `start`) message payload.
Messages
✉
ConnectionInit
Connection Init (client -> server)
First frame the client sends after the WebSocket opens.
✉
ConnectionAck
Connection Ack (server -> client)
Server acknowledgement that the connection is initialised.
Starts a new GraphQL subscription, identified by `id`.
✉
Start
Start (client -> server, graphql-ws legacy)
Legacy `subscriptions-transport-ws` form of `subscribe`. Identical payload, different `type`.
✉
Next
Next (server -> client, graphql-transport-ws)
A subscription result pushed to the client.
✉
Data
Data (server -> client, graphql-ws legacy)
Legacy form of `next`.
✉
KeepAlive
Keep-alive (server -> client, graphql-ws legacy)
Periodic keep-alive frame the server emits on the `graphql-ws` subprotocol so clients can detect a silent disconnect.
✉
Ping
Ping (client -> server, graphql-transport-ws)
Optional ping frame.
✉
Pong
Pong (server -> client, graphql-transport-ws)
Pong frame, emitted in response to a `ping` or as a heartbeat to keep the connection alive on the `graphql-transport-ws` subprotocol.
✉
Complete
Complete (bidirectional)
Terminates a single subscription identified by `id`. Sent by the server when the subscription naturally ends or by the client to stop it. Bitquery does not acknowledge legacy `stop` messages, so clients should send `complete` (and/or close the WebSocket) to end a subscription.
✉
Error
Error (server -> client)
Subscription-scoped GraphQL error frame.
Servers
wss
production-eustreaming.bitquery.io/graphql
Europe and nearby V2 streaming GraphQL WebSocket endpoint. Default regional endpoint for `wss://streaming.bitquery.io/graphql`.
wss
production-usus.streaming.bitquery.io/graphql
United States V2 streaming GraphQL WebSocket endpoint (`wss://us.streaming.bitquery.io/graphql`).
wss
production-asiaasia.streaming.bitquery.io/graphql
Asia V2 streaming GraphQL WebSocket endpoint (`wss://asia.streaming.bitquery.io/graphql`).
wss
early-accessstreaming.bitquery.io/eap
Early Access Program (EAP) WebSocket endpoint. Existing customers can continue using `wss://streaming.bitquery.io/eap` without changes; new users should prefer the V2 `graphql` endpoint.