For the complete documentation index, see llms.txt. This page is also available as Markdown.

Bitcoin Blockbook (WebSocket) API

GetBlock provides fast and reliable access to Bitcoin nodes via the Blockbook WebSocket API. Connect to the Bitcoin network without running your own infrastructure.

The Blockbook indexer WebSocket interface for Bitcoin: request/response queries (status, account info, UTXOs, transactions, broadcast, fee estimation) plus subscriptions to new blocks and address activity over a persistent connection.

Blockbook (REST) and Blockbook (WebSocket) are provisioned as separate interfaces with their own endpoint URLs. Enabling one does not enable the other. A project that watches an address as well as querying it needs both.

Use WebSocket when subscriptions are required, and REST for one-off queries. A standard Bitcoin JSON-RPC endpoint does not support Blockbook methods.

Base URL

wss://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>

Quickstart

Every request carries an id chosen by the client, a method, and a params object. The server echoes the same id on the matching response, so replies can be correlated on a multiplexed connection.

wscat -c wss://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>

# then send:
{
    "id": "getblock.io",
    "method": "getInfo",
    "params": {}
}
{
    "id": "getblock.io",
    "data": {
        "name": "Bitcoin",
        "shortcut": "BTC",
        "network": "BTC",
        "decimals": 8,
        "version": "unknown",
        "bestHeight": 967494,
        "bestHash": "00000000000000000000890e285e32408f9da4f2d58b620b5703839448b9c70c",
        "block0Hash": "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f",
        "testnet": false,
        "backend": {
            "version": "310100",
            "subversion": "/Satoshi:31.1.0/"
        }
    }
}

Methods

Method
Description

Indexer and backend status

Address or xpub balance and transaction history

Unspent outputs for an address, xpub, or descriptor

Normalized transaction by txid

Broadcast a signed, serialized transaction

Fee estimate for one or more confirmation targets

Subscribe to new blocks as they are connected

Subscribe to activity on a set of addresses

Support

Last updated

Was this helpful?