getInfo - Bitcoin

Returns the indexer's identity and sync state, together with the backend node version. Use it as a connection health check and to confirm the indexer has caught up to the chain tip before trusting an address query.

Parameters

This method takes no parameters. Send an empty params object.

Message

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

# then send:
{
    "id": "getblock.io",
    "method": "getInfo",
    "params": {}
}

Response

json{
    "id": "getblock.io",
    "data": {
        "name": "Bitcoin",
        "shortcut": "BTC",
        "network": "BTC",
        "decimals": 8,
        "version": "unknown",
        "bestHeight": 967487,
        "bestHash": "000000000000000000017cfd38e8af73159da4d9ab4c3f82ae183659f7b09793",
        "block0Hash": "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f",
        "testnet": false,
        "backend": {
            "version": "310100",
            "subversion": "/Satoshi:31.1.0/"
        }
    }
}

Response Fields

FieldTypeDescription
namestringCoin name
shortcutstringCoin ticker
networkstringNetwork identifier
decimalsintegerDecimal places in the coin's base unit
versionstringBlockbook indexer version
bestHeightintegerHeight of the best block the indexer has processed
bestHashstringHash of the best block the indexer has processed
block0HashstringGenesis block hash, used to confirm the expected chain
testnetbooleanTrue when the endpoint serves a test network
backendobjectBackend node version and subversion

Use Cases

  • Health Checks: Confirm the connection and the indexer are live
  • Sync Verification: Compare bestHeight against an independent source before trusting a balance
  • Network Assertion: Check block0Hash and testnet to confirm the endpoint serves the expected chain
  • Diagnostics: Report indexer and backend versions in support requests

Error Handling

ErrorMessageDescription
403 / RBAC: access deniedAccess deniedThe GetBlock access token is missing or incorrect