Blockchain API

Blockchain API for Bitcoin, Ethereum and EVM Chains

The Blockchain API does two things:

  • Lookups: ask the chain a question and get JSON back right away, such as a wallet's balance, its transaction history, a transaction's status, token balances or current fees.
  • Webhooks: watch a wallet and get a POST to your URL every time money moves.

Base URL: https://blockchainapi.qoest.com. These paths have no /v1 prefix.

#Supported Chains

Chain Path Native coin Lookups Webhooks
Bitcoin /btc BTC yes yes
Ethereum /eth ETH yes, with ERC-20 tokens yes, with ERC-20 transfers
Polygon /polygon POL yes yes
BNB Smart Chain /bnb BNB yes yes
Arbitrum One /arbitrum ETH yes yes
Base /base ETH yes yes
OP Mainnet /optimism ETH yes yes

All are mainnets. Testnets are not supported.

#Lookups

Endpoint Returns Credits
GET /btc/address/{address} Balance, USD value, totals, transaction count 1
GET /btc/address/{address}/transactions Transaction history from the address's side 1
GET /btc/tx/{hash} Status, confirmations, inputs, outputs, fee 1
GET /btc/fees Fee estimates in sat/vB 1
GET /{chain}/address/{address} Native balance and USD value 1
GET /{chain}/address/{address}/transactions Transactions or token transfers 1
GET /{chain}/address/{address}/tokens Token balances (USDT, USDC and more) 2
GET /{chain}/tx/{hash} Status, confirmations, fee, token transfers 1
GET /{chain}/gas Gas price estimates in gwei 1

{chain} is one of eth, polygon, bnb, arbitrum, base or optimism. See Bitcoin Lookups and Ethereum and EVM Lookups.

#Webhooks

Endpoint What it does
POST /btc/webhooks Watch a Bitcoin address
POST /{chain}/webhooks Watch an address on Ethereum or another EVM chain (native coin and ERC-20)
GET /btc/webhooks, GET /{chain}/webhooks List your webhooks on that chain, 10 per page
GET /btc/webhooks/{id}, GET /{chain}/webhooks/{id} Get one of your webhooks
DELETE /btc/webhooks/{id}, DELETE /{chain}/webhooks/{id} Stop watching

See Watch a Bitcoin Address, Watch an Ethereum Address and Webhook Payloads.

#Quick Examples

Check a wallet's balance:

curl https://blockchainapi.qoest.com/eth/address/0x2222222222222222222222222222222222222222 \
  -H "Authorization: Bearer your-token"

Watch a Bitcoin wallet:

curl -X POST https://blockchainapi.qoest.com/btc/webhooks \
  -H "Authorization: Bearer your-token" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Cold wallet",
    "address": "bc1qexampleaddress000000000000000000000000",
    "webhook_url": "https://example.com/hooks/btc"
  }'

#How Webhooks Work

  • Each webhook is checked about once a minute.
  • Only transactions made after you create the webhook are sent.
  • Each transaction is sent once per webhook.
  • A delivery succeeds when your URL answers with any 2xx. A failed delivery is retried about once a minute, up to 5 attempts in total.
  • Amounts come with their USD and USDT value at the time of delivery.

#Errors

Status When Credits
401 Missing or wrong token none
403 Insufficient credits. none
404 Unknown chain, or the address or transaction is not on the chain none
422 Invalid address, hash or parameter none
503 The chain data provider did not answer. Try again after the Retry-After seconds none

See Pricing for packages and what each call costs.