Blockchair
- provider
- create("blockchair")
- auth
- optional BLOCKCHAIR_API_KEY
- chains
- Bitcoin, Ethereum, eCash
- capabilities
- balance, history, tx detail, block
- endpoint
- api.blockchair.com
- default chain
- ethereum
Address it
const blockchair = await create("blockchair"); // BLOCKCHAIR_API_KEY is optional
await blockchair.getBalance("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", "bitcoin");
The key is optional. Set BLOCKCHAIR_API_KEY and Blockchair joins the configured tier of provider selection; leave it unset and it stays a keyless candidate that shows up in the fallback pass, after Mempool on Bitcoin.
What it reads
/{chain}/dashboards/address/:address for balance and history, /{chain}/dashboards/transaction/:hash for one transaction, /{chain}/dashboards/block/:number for a block. Balances, history, details and blocks; no contracts, tokens or gas.
Gotchas
- The data format differs between the UTXO chains and Ethereum, and the provider maps both. eCash amounts are satoshis at two decimals, so 100 satoshis is 1 XEC.
- The dashboard answer carries
context.state, the chain height when it was built, and that is whatBalance.blockNumbershows. Every other provider's balance endpoint says nothing about a block. fundedandspentare the address's cumulative received and spent totals, in satoshis.
Where it lives
src/providers/blockchair.ts.
Blockscout
Keyless and complete on ten EVM chains, one host per chain. The backstop when nothing else serves a chain and the first stop when there are no keys.
Mempool
mempool.space for Bitcoin, litecoinspace.org for Litecoin, peppool.space for Pepecoin. Fee recommendations in sat/vB, OP_RETURN payloads decoded, no key.