Developer docs

Move crypto in both directions with one API. Receive payments into an address per customer, send payouts and withdrawals to anyone, and sweep funds to your treasury, with every outgoing transfer signed on your own machine.

On this page

Overview

BlocksReader is a REST API at https://api.blocksreader.com/v1 for receiving and sending crypto from self-custody wallets: your wallet is created by the BlocksReader Signer on your own server, and the same signer signs your payouts. Only you can move your funds.

ReceiveAddressesOne per customer, order or invoice, tagged with your own ref. 22 networks.
ReceiveGet notifiedA signed deposit.confirmed webhook the moment funds land.
SendPayoutsWithdrawals, refunds, supplier and partner payments. Queued by API, signed by your own signer.
SendSweepsCollected funds move to your treasury automatically on rules you set.
ReceiveSend
Main callPOST /v1/addressesPOST /v1/payouts
You hear back bydeposit.confirmed webhookpayout.sent or payout.failed webhook
HistoryGET /v1/depositsGET /v1/payouts
NetworksAll 2220: every network except Sui and Aptos
Test modeSimulated depositsSimulated signer: success, failure or manual approval

Most products use both halves: customers top up through their own address, and withdraw or get paid out through payouts. You can build and test all of it for free with a test key, or let your AI coding assistant do it through the MCP server.

Quickstart

Receive a payment and send one out in about ten minutes. Everything here uses a free test key.

  1. Create your account. Sign up at app.blocksreader.com, verify your email and answer the short "Tell us about your business" questions. API keys start working once those are done.
  2. Copy your test key. Open API keys in the dashboard and copy the key starting with br_test_. Keep it on your server only.
  3. Create a test address.
    bash
    curl https://api.blocksreader.com/v1/addresses \
      -H "Authorization: Bearer br_test_..." \
      -H "Content-Type: application/json" \
      -d '{ "chain": "tron", "ref": "customer_8431" }'
    response
    {
      "success": true,
      "data": {
        "id": "adr_7Kq2mZp9XbR4tVnW",
        "chain": "tron",
        "asset": null,
        "address": "TQ4mZ8rWkX2bJ3yHn5cPq1Vd7GfS9aV7pn",
        "destination_tag": null,
        "ref": "customer_8431",
        "label": null,
        "tag": null,
        "livemode": false,
        "created_at": "2026-11-24T10:00:00.000Z"
      }
    }
  4. Register a webhook endpoint. It must be a public https URL. For local development, a tunnel such as cloudflared tunnel --url http://localhost:3000 works.
    bash
    curl https://api.blocksreader.com/v1/webhooks \
      -H "Authorization: Bearer br_test_..." \
      -H "Content-Type: application/json" \
      -d '{ "url": "https://example.com/webhooks/blocksreader", "events": ["deposit.confirmed", "payout.sent", "payout.failed"] }'
    Save the secret (whsec_...) from the response as BLOCKSREADER_WEBHOOK_SECRET. The API shows it only once.
  5. Handle the webhook. Verify the signature and credit the customer once. Copy a handler from Verify signatures.
  6. Simulate a deposit.
    bash
    curl https://api.blocksreader.com/v1/sandbox/deposits \
      -H "Authorization: Bearer br_test_..." \
      -H "Content-Type: application/json" \
      -d '{ "address_id": "adr_7Kq2mZp9XbR4tVnW", "amount": "25", "asset": "USDT" }'
    Your endpoint receives deposit.confirmed at 1 confirmation after about 5 seconds, and again at 3 confirmations about 6 seconds later, exactly like live.
  7. Send a payout. In test mode a simulated signer signs it for you.
    bash
    curl https://api.blocksreader.com/v1/payouts \
      -H "Authorization: Bearer br_test_..." \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: withdrawal-1001" \
      -d '{ "chain": "tron", "asset": "USDT", "to": "TXyz8rWkX2bJ3yHn5cPq1Vd7GfS9aV7abc", "amount": "10" }'
    It starts as pending, turns sent a few seconds later, and your endpoint receives payout.sent.
  8. Go live when you're ready: set up the BlocksReader Signer with Docker (it creates your wallet), then follow the go-live checklist.

Your wallet and signer

Going live starts here. Your wallet is created on your own server, and its keys never leave your control.

Test mode needs none of this. For live mode you run one piece of BlocksReader software, the BlocksReader Signer, with Docker on a server you control. It runs on Linux, Windows and Mac (amd64, arm64 and 32-bit ARM v7) and:

  • creates your wallet and its seed phrase, or imports one you already have,
  • adds your wallet's public keys to your account, so your addresses can be created and watched,
  • signs your payouts and sweeps automatically.

1. Set up the signer

terminal
docker run --rm -it -v blocksreader_signer_data:/app/data blocksreader/blocksreader-signer:latest init

Setup takes four steps:

  1. Seed phrase. Choose Create a new wallet. The signer shows your seed phrase once: write it on paper, then confirm you've saved it. Already have a seed phrase? Choose Type it manually instead.
  2. Passphrase. Choose a strong passphrase. It encrypts the seed phrase on this server, and the signer needs it every time it starts.
  3. API key. Paste your br_live_ key from API keys. The signer then appears under Signers & xpubs → Devices in the dashboard, where you can revoke it at any time.
  4. Options. Choose BlocksReader dashboard for fund+sweep settings (recommended). Then say yes to adding your public keys: we email you a 6-digit code, and if two-factor authentication is on you also enter your authenticator code. You get an email listing the networks that were added. From then on you can create live addresses on those networks.

Skipped the public keys, or added a network later? Run sync-keys (below). It only ever adds keys; it never replaces one that's already on your account.

Your seed phrase is your money. Anyone who has it can move your funds, and if you lose it, nobody can recover them, including us. BlocksReader never sees it and will never ask for it. Don't store it in email, chat, cloud notes, a screenshot or on the server itself.

2. Start the signer

Payouts you create with POST /v1/payouts are signed by the signer, and so are sweeps. Without it running, live payouts stay pending. It checks for pending payouts every 30 seconds and signs them automatically.

terminal
# save the passphrase from setup in a file only you can read
umask 077; read -rsp 'Passphrase: ' PP; printf '%s' "$PP" > signer_passphrase.txt; unset PP; echo

# start it
docker run -d --name blocksreader-signer --restart unless-stopped \
  -v blocksreader_signer_data:/app/data \
  -v "$PWD/signer_passphrase.txt:/run/secrets/signer_passphrase:ro" \
  -e SIGNER_PASSPHRASE_FILE=/run/secrets/signer_passphrase \
  blocksreader/blocksreader-signer:latest

Other signer commands

Run any of these with docker run --rm -it -v blocksreader_signer_data:/app/data blocksreader/blocksreader-signer:latest <command>.

CommandWhat it does
statusChecks the setup and the connection to BlocksReader
sync-keysAdds your wallet's public keys to your account (needs an emailed code)
export-keysPrints your public keys, to add by hand under Signers & xpubs → Add public key
change-passphraseEncrypts the stored seed phrase with a new passphrase
configureChooses where fund+sweep and address-pool settings come from: BlocksReader dashboard (edit them on the Signer settings page) or This signer (set them here; keeps working if the dashboard can't be reached)
generate-addressesAdds addresses to your Solana or TON address pool right away, for a first fill or an extra top-up. Add --chain=solana or --chain=ton and --count=100 (1–1000) to skip the questions. The running signer also tops the pool up on its own

The signer sends every pending payout. It doesn't ask anyone first. Put your limits (per withdrawal, per day, allowed destinations) in your own backend before calling POST /v1/payouts, and keep the server locked down: it holds your seed phrase, encrypted.

Authentication

Send your secret key as a Bearer token on every request:

bash
curl https://api.blocksreader.com/v1/chains \
  -H "Authorization: Bearer br_live_..."
PrefixModeWhat happens
br_test_TestSimulated addresses, deposits and payouts. Real webhooks to your test endpoints. Free.
br_live_LiveReal addresses on chain. Needs an active plan.

The key decides the mode. There is no separate test URL. Find, reveal or roll keys under API keys in the dashboard. Rolling a key stops the old one immediately, so update your servers first.

Server-side only. A live key can create addresses and queue payouts. Keep it in an environment variable or secret manager, never in a mobile app, browser code or a public repo.

Response format

Every response uses the same envelope. Lists add pagination.

json
{ "success": true, "data": { ... } }

{ "success": true, "data": [ ... ], "pagination": { "page": 1, "limit": 20, "total": 57, "pages": 3 } }

{ "success": false, "error": { "code": "INVALID_CHAIN", "message": "Unknown chain. GET /v1/chains lists the supported values." } }

Branch on error.code, which is stable. message is written for people and may change.

Conventions

  • Amounts are strings in whole coin units ("25.50" USDT, "0.0015" BTC). Never floats, wei or satoshis. Store them in an exact decimal column.
  • Chains use the id from GET /v1/chains, such as tron or bsc. Short names like btc, eth, bnb and trx are accepted on input.
  • Times are ISO 8601 in UTC.
  • IDs carry their type: adr_ address, po_ payout, whk_ webhook endpoint, evt_ event, dlv_ delivery.
  • Fields are snake_case. New fields can appear at any time, so ignore ones you don't recognise.

Test mode

With a br_test_ key every endpoint works without touching a real chain. Test mode is free, needs no plan and never expires.

Test modeLive mode
Keybr_test_...br_live_...
AddressesSimulated, on bitcoin, ethereum, bsc, tronDerived from your wallet's public keys, all 22 chains
DepositsYou trigger themReal transfers
PayoutsSimulated signerYour BlocksReader Signer
WebhooksSent to test endpoints, same format as liveSent to live endpoints
CostFreeYour plan

Test and live data are completely separate. A webhook created with a test key only ever receives test events, and a live endpoint only receives live events.

Simulate a deposit

bash
curl https://api.blocksreader.com/v1/sandbox/deposits \
  -H "Authorization: Bearer br_test_..." \
  -H "Content-Type: application/json" \
  -d '{ "address_id": "adr_7Kq2mZp9XbR4tVnW", "amount": "25", "asset": "USDT", "confirm_after_seconds": 10 }'
FieldNotes
address_id or addressA test address you created
amountString in coin units. Default "10"
assetThe native coin (default), USDT or USDC
contractFor any other token, its contract address
confirm_after_secondsDelay before the first event, 0 to 60. Default 5. The second event follows 6 seconds later

Simulate payouts

Create a payout with a test key and a simulated signer handles it. Pick the outcome with simulate:

simulateResult
sent (default)Becomes sent with a fake tx_hash after sign_after_seconds (max 60), then payout.sent fires
failedBecomes failed with a failure_reason, then payout.failed fires
manualStays pending until you approve or reject it
bash
curl https://api.blocksreader.com/v1/payouts \
  -H "Authorization: Bearer br_test_..." \
  -H "Content-Type: application/json" \
  -d '{ "chain": "tron", "asset": "USDT", "to": "TXyz8rWkX2bJ3yHn5cPq1Vd7GfS9aV7abc", "amount": "10", "simulate": "manual" }'

# act as the signer
curl -X POST https://api.blocksreader.com/v1/sandbox/payouts/po_test_8Hn2Kd4mQx7VbR1tLp9s/approve \
  -H "Authorization: Bearer br_test_..."

curl -X POST https://api.blocksreader.com/v1/sandbox/payouts/po_test_8Hn2Kd4mQx7VbR1tLp9s/reject \
  -H "Authorization: Bearer br_test_..." \
  -H "Content-Type: application/json" \
  -d '{ "reason": "Amount over daily limit" }'

Prefer clicking? The Sandbox and Payouts pages in the dashboard do the same with buttons. Switch the dashboard to Test first.

Addresses

Live addresses are derived from your wallet's public keys, so only you can spend from them. Before creating live addresses on a network, its public keys must be on your account. The signer adds them during setup, or later with sync-keys. Otherwise you get XPUB_REQUIRED.

Create an address

bash
curl https://api.blocksreader.com/v1/addresses \
  -H "Authorization: Bearer br_live_..." \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: signup-customer-8431-bsc" \
  -d '{ "chain": "bsc", "ref": "customer_8431", "label": "Jane D." }'
FieldRequiredNotes
chainyesFrom supported chains
refnoYour customer or order id (max 120). Comes back on every deposit and event for this address
labelnoDisplay name (max 120)
tagnoFree-form grouping (max 60)
  • One address per customer per chain is the usual pattern. Store it and show it on your deposit page forever.
  • One address per order also works: set ref to the order id.
  • No asset to choose. An address receives the network’s coin and every token on it (USDT, USDC and any token you add). Each deposit tells you what arrived.

XRP destination tags and TON memos

On XRP all your addresses share one account, and each customer gets their own destination_tag:

json
{ "id": "adr_3Rt8Vn2kQm7XbL4p", "chain": "xrp", "address": "rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH", "destination_tag": 104839, "ref": "customer_8431" }

Show the tag to your customer. Senders must include it. A payment without the tag can't be matched to a customer. Deposits that use a TON comment carry it as memo.

Balances

GET /v1/addresses/balances?chain=tron returns the addresses on that network that hold funds, with the coin and each token. Addresses not listed hold nothing. Live mode only; refreshed about every 30 seconds.

response
{
  "success": true,
  "data": [
    {
      "address": "TQ4mZ8rWkX2bJ3yHn5cPq1Vd7GfS9aV7pn",
      "native": { "asset": "TRX", "amount": "12.5" },
      "tokens": [ { "symbol": "USDT", "contract": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t", "amount": "250.75" } ],
      "updated_at": "2026-11-24T10:02:11.000Z"
    }
  ]
}

List and find

bash
# all Tron addresses for one customer
curl "https://api.blocksreader.com/v1/addresses?chain=tron&ref=customer_8431" -H "Authorization: Bearer br_live_..."

# look up by on-chain address
curl "https://api.blocksreader.com/v1/addresses?address=TQ4mZ8rWkX2bJ3yHn5cPq1Vd7GfS9aV7pn" -H "Authorization: Bearer br_live_..."

# one address by id
curl https://api.blocksreader.com/v1/addresses/adr_7Kq2mZp9XbR4tVnW -H "Authorization: Bearer br_live_..."

Deposits

Webhooks tell you about deposits in real time. GET /v1/deposits gives you the history, for your UI and for a catch-up job. A live key returns real deposits, a test key returns test deposits.

bash
curl "https://api.blocksreader.com/v1/deposits?chain=tron&status=confirmed&limit=50" \
  -H "Authorization: Bearer br_live_..."
response
{
  "success": true,
  "data": [
    {
      "id": "6741f0c2a9e1b8d4c3f2a1b0",
      "tx_hash": "9f3c1e...a07b",
      "chain": "tron",
      "address": "TQ4mZ8rWkX2bJ3yHn5cPq1Vd7GfS9aV7pn",
      "from_address": "TFj2...",
      "to_address": "TQ4mZ8rWkX2bJ3yHn5cPq1Vd7GfS9aV7pn",
      "destination_tag": null,
      "address_id": "adr_7Kq2mZp9XbR4tVnW",
      "ref": "customer_8431",
      "amount": "25",
      "asset": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
      "type": "token",
      "symbol": "USDT",
      "confirmations": 19,
      "status": "confirmed",
      "livemode": true,
      "created_at": "2026-11-24T10:02:11.000Z"
    }
  ],
  "pagination": { "page": 1, "limit": 50, "total": 1, "pages": 1 }
}
FieldMeaning
typenative (the chain's coin) or token
assetFor native deposits, the coin symbol (BTC, ETH, TRX). For tokens, the token contract (lowercase 0x on EVM, base58 on Tron and Solana)
symbolHuman symbol such as USDT, when known
amountAlready in coin units, as a string
statuspending, confirmed (check confirmations if you wait for more than 1) or failed

The catch-up job

Webhooks can be missed during a deploy or an outage on your side. Run a job every few minutes that pages through GET /v1/deposits?status=confirmed (newest first), goes back over a fixed window such as the last 48 hours, and passes every deposit through the same idempotent path as your webhook handler. Don't stop at the first deposit you've already credited: an older one may still be missing.

Credit exactly once. Use (chain, tx_hash, address) as the key, with a unique constraint in your database, and credit inside the same transaction that inserts the row. That one rule makes repeated webhooks, retries and the catch-up job all safe. A transaction that pays the same address more than once is rare, but only the first payment is credited under this key, so compare credited totals with your balances regularly.

Tokens

Popular tokens such as USDT and USDC are detected out of the box on the chains that carry them (TRC-20, BEP-20, ERC-20, SPL, Jettons and more). To detect another token, add it with a live key. Tokens aren't available on Bitcoin, Litecoin, Dogecoin or XRP.

bash
# built-in and custom tokens on a chain (any key)
curl "https://api.blocksreader.com/v1/assets?chain=bsc" -H "Authorization: Bearer br_live_..."

# add a custom token (live key, active plan)
curl https://api.blocksreader.com/v1/assets \
  -H "Authorization: Bearer br_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "chain": "bsc", "contract": "0x...", "symbol": "ABC", "name": "ABC Token" }'

# pause or resume detection
curl -X PATCH https://api.blocksreader.com/v1/assets/bsc/0x... \
  -H "Authorization: Bearer br_live_..." -H "Content-Type: application/json" -d '{ "enabled": false }'

# remove it
curl -X DELETE https://api.blocksreader.com/v1/assets/bsc/0x... -H "Authorization: Bearer br_live_..."

decimals is read from the contract when you leave it out. The contract format depends on the chain: a contract address on EVM and Tron, the mint on Solana, the jetton master on TON, and the coin type on Sui and Aptos.

Payouts

Send crypto to any address: customer withdrawals, refunds, supplier and partner payments, payroll, or moving funds between your own wallets.

A payout never moves on our say-so. Your server asks, your own signer signs:

  1. Your server calls POST /v1/payouts. The payout is pending.
  2. Your BlocksReader Signer picks it up within about 30 seconds and signs it on your server, from the from address.
  3. The signed transaction is broadcast, the payout becomes sent with a tx_hash, and payout.sent fires.

Keep your signer running. Live payouts stay pending until the BlocksReader Signer signs them, so run it on a server that stays up. The sending address needs the funds plus the network fee.

Create a payout

Payouts are created with the API. The dashboard lists them and shows their status.

bash
curl https://api.blocksreader.com/v1/payouts \
  -H "Authorization: Bearer br_live_..." \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: withdrawal-55102" \
  -d '{
    "chain": "tron",
    "asset": "USDT",
    "from": "TQ4mZ8rWkX2bJ3yHn5cPq1Vd7GfS9aV7pn",
    "to": "TXyz8rWkX2bJ3yHn5cPq1Vd7GfS9aV7abc",
    "amount": "125.50"
  }'
response
{
  "success": true,
  "data": {
    "id": "po_6afc8279cc8a87f039265e17",
    "object": "payout",
    "livemode": true,
    "chain": "tron",
    "type": "token",
    "asset": "USDT",
    "amount": "125.50",
    "to": "TXyz8rWkX2bJ3yHn5cPq1Vd7GfS9aV7abc",
    "from": "TQ4mZ8rWkX2bJ3yHn5cPq1Vd7GfS9aV7pn",
    "contract": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
    "decimals": 6,
    "memo": null,
    "destination_tag": null,
    "status": "pending",
    "tx_hash": null,
    "failure_reason": null,
    "created_at": "2026-11-24T10:05:00.000Z",
    "updated_at": "2026-11-24T10:05:00.000Z"
  }
}
FieldRequiredNotes
chainyesAny supported chain except sui and aptos
toyesDestination address
amountyesCoin units as a string, such as "125.50"
assetnoWhat to send: the chain's coin (the default, for example TRX) or a token symbol such as USDT. For tokens we fill in the contract and decimals from GET /v1/assets
contract, decimalsnoOnly when the symbol is ambiguous or the token isn't in GET /v1/assets
typenonative or token. Worked out from asset and contract
fromlive: yesThe address of yours that holds the funds (on XRP, your XRP account address). Your signer signs with that address's key. Optional in test mode
memonoTON comment, when the receiver (often an exchange) asks for one
destination_tagnoXRP tag the receiver asked for

Always send an Idempotency-Key. Use your own withdrawal id. If the request times out, retry with the same key within 24 hours, one attempt at a time, and you get the original payout back. After 24 hours the same key creates a new payout, and a 5xx response isn't remembered. In both cases, check GET /v1/payouts for the same address and amount before you send again.

Statuses

statusMeaning
pendingWaiting for your signer
signedSigned, about to be broadcast
sentBroadcast. tx_hash is set. payout.sent fires
failedNot sent, see failure_reason. No funds left your wallet. payout.failed fires
bash
# one payout
curl https://api.blocksreader.com/v1/payouts/po_6afc8279cc8a87f039265e17 -H "Authorization: Bearer br_live_..."

# everything still waiting for your signer
curl "https://api.blocksreader.com/v1/payouts?status=pending" -H "Authorization: Bearer br_live_..."

Both events carry payout_id, so you can match them to your own withdrawal record. A payout that stays pending for a long time usually means your signer is offline.

Customer withdrawals

If your customers hold a balance with you (an exchange, wallet, game or marketplace), this is the pattern that keeps balances correct whatever happens on the network:

  1. Reserve the funds first. In one database transaction, check the balance, subtract the amount (plus any fee you charge) and create a withdrawals row with status processing.
  2. Create the payout with Idempotency-Key set to that row's id, and store the returned po_ id on the row. Lock the row so only one attempt runs at a time. If the call times out, retry with the same key within 24 hours. After a 5xx error, or later than that, check GET /v1/payouts first so you never pay twice.
  3. Mark it complete on payout.sent, saving the tx_hash so you can show the customer a link to the transaction.
  4. Refund on failure. On payout.failed, put the amount back on the customer's balance and tell them. As a safety net, a job can also check processing withdrawals with GET /v1/payouts/{id} in case a webhook was missed.

Validate before you send. Check the address format for the chain, ask for the XRP destination tag or TON memo when the receiver is an exchange, and set your own limits (per withdrawal, per day) before calling the API. A sent transaction can't be reversed.

Sweeps and gas

With one address per customer, received funds are spread across many addresses. A sweep collects them into one wallet you choose, ready for payouts or cold storage.

Sweeps run automatically with the BlocksReader Signer, around the clock.

Automatic sweeps are set up in the dashboard under Signer settings (two-factor authentication required), per network:

  • Receiver address: where swept funds go. You can set a different receiver per asset.
  • Assets to sweep and the minimum amount worth sweeping for each.
  • Gas tank (funder) address: moving tokens such as USDT needs a little of the chain's coin for the network fee. Your signer tops up addresses that hold tokens from this address before sweeping them, using the minimum balance and top-up amount you set.
  • How often it runs, from every minute to every hour, and a switch to stop sweeping at any time.

Your signer picks up the new settings on its next run.

Either way, every sweep is signed with your own keys, on your own machine.

Webhooks

Add endpoints in the dashboard under Webhooks, or with the API:

bash
curl https://api.blocksreader.com/v1/webhooks \
  -H "Authorization: Bearer br_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://example.com/webhooks/blocksreader", "events": ["deposit.confirmed", "payout.sent"], "description": "Production" }'
  • The response contains secret (whsec_...) once. You can view it again in the dashboard, or replace it with POST /v1/webhooks/{id}/roll-secret.
  • URLs must be https and resolve to a public address. Redirects are not followed.
  • Up to 10 endpoints per mode. Leave out events, or send ["*"], to receive everything.
  • Pause an endpoint with PATCH /v1/webhooks/{id} and { "enabled": false }.

Event types

TypeWhen
deposit.confirmedA deposit reached 1 confirmation, and again when it reaches 3. This is the event to credit on.
payout.sentYour signer signed and broadcast a payout. Sent once per payout. Mark the withdrawal complete now.
payout.failedA payout couldn't be sent (see failure_reason). No funds left your wallet. Refund the withdrawal.
deposit.pendingReserved. You can subscribe to it, but it isn't sent today. Use deposit.confirmed

The request

http
POST /webhooks/blocksreader HTTP/1.1
Content-Type: application/json
User-Agent: BlocksReader-Webhooks/1.0
BR-Webhook-Signature: t=1795516630,v1=5f2b9c0d...e81a
BR-Webhook-Id: evt_2Lm8Qx4nRt7VbW1k
BR-Webhook-Type: deposit.confirmed

{
  "id": "evt_2Lm8Qx4nRt7VbW1k",
  "type": "deposit.confirmed",
  "livemode": true,
  "created_at": "2026-11-24T10:02:11.000Z",
  "data": {
    "chain": "tron",
    "address": "TQ4mZ8rWkX2bJ3yHn5cPq1Vd7GfS9aV7pn",
    "from_address": "TFj2...",
    "to_address": "TQ4mZ8rWkX2bJ3yHn5cPq1Vd7GfS9aV7pn",
    "tx_hash": "9f3c1e...a07b",
    "amount": "25",
    "asset": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
    "type": "token",
    "confirmations": 1,
    "address_id": "adr_7Kq2mZp9XbR4tVnW",
    "ref": "customer_8431",
    "amount_usd": "25.00"
  }
}

Deposit data always has chain, address, tx_hash, amount, asset, type and confirmations. It adds from_address, to_address, address_id, ref and tag when known, destination_tag on XRP, memo for TON comments, and amount_usd (2 decimals) when a price is available. As with deposits, a token's asset is its contract: map it to a symbol with GET /v1/assets.

payout.sent and payout.failed data: payout_id, status, chain, type, asset, contract, amount, to, from, memo, destination_tag, tx_hash (sent) and failure_reason (failed).

payout.sent
{
  "id": "evt_9Pq3Lm7xKt2VbW8n",
  "type": "payout.sent",
  "livemode": true,
  "created_at": "2026-11-24T10:05:41.000Z",
  "data": {
    "payout_id": "po_6afc8279cc8a87f039265e17",
    "chain": "tron",
    "asset": "USDT",
    "amount": "125.50",
    "to": "TXyz8rWkX2bJ3yHn5cPq1Vd7GfS9aV7abc",
    "from": "TQ4mZ8rWkX2bJ3yHn5cPq1Vd7GfS9aV7pn",
    "tx_hash": "4be1a9...c33d"
  }
}

Two events per deposit, credit once. Each deposit sends deposit.confirmed twice (at 1 and 3 confirmations), each with its own event id. Deduplicate on (chain, tx_hash, address), not on the event id. Events can also arrive out of order or more than once after retries.

Responding and retries

  • Answer with any 2xx within 10 seconds. Do slow work in a background job after replying.
  • Anything else (non-2xx, timeout, connection or TLS error) is retried with growing delays, 11 attempts over about a day. After the last one the delivery is marked failed.
  • Re-send a delivery any time with POST /v1/webhooks/deliveries/{id}/retry or from the dashboard.

Debugging

  • POST /v1/webhooks/{id}/test sends a sample deposit.confirmed (with "test": true in data).
  • GET /v1/webhooks/{id}/deliveries shows every attempt: your HTTP status, response time and error. Kept for 90 days.
  • GET /v1/events lists every event (filter with ?type=) so you can catch up after downtime.
  • Most failures are one of: replying with something other than 2xx, taking longer than 10 seconds, re-serialising the JSON before checking the signature, using the secret of a different endpoint, or a test-key webhook waiting for live deposits.

Verify signatures

BR-Webhook-Signature looks like t=<unix seconds>,v1=<hex>. v1 is HMAC-SHA256 of "<t>.<raw request body>" keyed with your endpoint secret.

  1. Read the raw body bytes. Don't parse and re-serialise the JSON first.
  2. Compute the HMAC and compare in constant time.
  3. Reject if t is more than 300 seconds away from now.
Express
import crypto from 'node:crypto';
import express from 'express';

const app = express();
const SECRET = process.env.BLOCKSREADER_WEBHOOK_SECRET; // whsec_...

app.post('/webhooks/blocksreader', express.raw({ type: 'application/json' }), async (req, res) => {
  const header = String(req.get('BR-Webhook-Signature') || '');
  const parts = Object.fromEntries(header.split(',').map((p) => p.split('=')));
  const t = Number(parts.t);
  if (!t || Math.abs(Date.now() / 1000 - t) > 300) return res.sendStatus(401);

  const expected = crypto.createHmac('sha256', SECRET).update(`${t}.${req.body}`).digest('hex');
  const got = String(parts.v1 || '');
  if (got.length !== expected.length ||
      !crypto.timingSafeEqual(Buffer.from(got), Buffer.from(expected))) return res.sendStatus(401);

  const event = JSON.parse(req.body);

  if (event.type === 'deposit.confirmed') {
    // INSERT ... ON CONFLICT (chain, tx_hash, address) DO NOTHING,
    // and credit event.data.ref only if a row was inserted.
  } else if (event.type === 'payout.sent') {
    // mark the withdrawal with event.data.payout_id completed, save tx_hash
  } else if (event.type === 'payout.failed') {
    // refund the withdrawal with event.data.payout_id
  }
  // reply once it's saved, within 10 seconds (an error reply is retried); do slow work in a background job
  res.sendStatus(200);
});

Build with AI: the MCP server

Connect your AI coding assistant (Claude Code, Cursor, VS Code, Claude and others) to BlocksReader through the Model Context Protocol. It can read this guide, create test addresses, simulate deposits, create and approve test payouts, register webhooks and read delivery logs, then write and test both your deposit flow and your withdrawal flow for your stack.

Server URLhttps://api.blocksreader.com/mcp
TransportStreamable HTTP
Sign-inAuthorization: Bearer br_test_... header, or OAuth (you paste your key on a BlocksReader sign-in page)

Safe by design. The server acts with your API key and can only do what that key can. It cannot create live payouts: those always need your own signer. A test key only sees test data and sandbox tools, so start there.

Connect your tool

Copy your test key from API keys in the dashboard, then add the server:

Claude Code

terminal
claude mcp add --transport http blocksreader https://api.blocksreader.com/mcp \
  --header "Authorization: Bearer br_test_YOUR_KEY"

Or leave out --header and run /mcp in Claude Code to sign in through the browser.

Claude (claude.ai and desktop)

  1. Open Settings → Connectors → Add custom connector.
  2. Name it BlocksReader and paste https://api.blocksreader.com/mcp as the URL.
  3. Click Connect. A BlocksReader page opens: paste your API key and continue.

Any other app that supports remote MCP servers with OAuth sign-in works the same way.

Cursor

.cursor/mcp.json
{
  "mcpServers": {
    "blocksreader": {
      "url": "https://api.blocksreader.com/mcp",
      "headers": { "Authorization": "Bearer br_test_YOUR_KEY" }
    }
  }
}

VS Code

.vscode/mcp.json
{
  "servers": {
    "blocksreader": {
      "type": "http",
      "url": "https://api.blocksreader.com/mcp",
      "headers": { "Authorization": "Bearer br_test_YOUR_KEY" }
    }
  }
}

Other clients (stdio only)

terminal
npx -y mcp-remote https://api.blocksreader.com/mcp \
  --header "Authorization:Bearer br_test_YOUR_KEY"

Keep keys out of git. Project files like .cursor/mcp.json are often committed. Add them to .gitignore, or use your tool's user-level config instead. Rolling your API key disconnects every OAuth session made with it.

Tools and commands

The tools you see depend on the key you connect with.

ToolWhat it doesTestLive
get_integration_guideThe integration guide by topic (overview, webhooks, deposits, addresses, sandbox, payouts, tokens, errors, all), with signature code✓✓
whoamiWhich mode the connected key is in✓✓
list_chains, get_pricesSupported chains, current USD prices✓✓
create_address, list_addresses, get_addressDeposit addresses✓✓
list_deposits, list_eventsDeposit history and generated events✓✓
list_payouts, get_payoutPayout status (read only)✓✓
list_webhooks, create_webhook, update_webhook, delete_webhook, roll_webhook_secretManage endpoints✓✓
test_webhook, get_webhook_deliveries, retry_webhook_deliverySend a test event, read the delivery log, re-send✓✓
list_tokensBuilt-in and custom tokens✓✓
add_token, set_token_enabled, remove_tokenCustom token detection✓
sandbox_simulate_depositFake a deposit to a test address✓
sandbox_create_payout, sandbox_resolve_payoutTest payouts and act as the signer✓

Ready-made commands

The server ships guided prompts. For withdrawals, ask in your own words as in the examples below. In Claude Code they appear as slash commands (the middle part is the name you gave the server); other tools list them as prompts.

CommandWhat it does
/mcp__blocksreader__integrate_depositsAdds the receiving side to your project end to end: data model, address creation, signed webhook handler with credit-once logic, catch-up job, env config, tests, then proves it in the sandbox. Optional arguments: stack, chains, assets
/mcp__blocksreader__debug_webhooksFinds out why webhooks fail or don't arrive, using the delivery log and your handler code, and fixes it
/mcp__blocksreader__go_live_checklistReviews your integration against the go-live checklist with file references

Things to ask

  • "Add BlocksReader USDT deposits on Tron and BNB Chain to this app. Verify webhook signatures, credit each user once, and add a catch-up job using /v1/deposits."
  • "Create a test Tron address for user 42 and simulate a 25 USDT deposit. Did my endpoint answer 200?"
  • "Add USDT withdrawals: reserve the balance, create a payout with the withdrawal id as Idempotency-Key, complete it on payout.sent and refund it on payout.failed. Test success, failure and manual approval in the sandbox."
  • "My webhook isn't firing. Check the delivery log and tell me why."

All endpoints

Base URL https://api.blocksreader.com. All accept a test or live key unless noted.

EndpointPurpose
GET/v1/chainsSupported chains (no key needed)
GET/v1/pricesCurrent USD prices
POST/v1/addressesCreate an address. Idempotency-Key supported
GET/v1/addressesList. Filters chain, ref, address, destination_tag
GET/v1/addresses/{id}One address
GET/v1/addresses/balancesFunded addresses on a network, with coin and token balances (live)
GET/v1/depositsDeposit history. Filters chain, status
POST/v1/payoutsQueue a payout for your signer. Idempotency-Key supported
GET/v1/payoutsList. Filters status, chain
GET/v1/payouts/{id}One payout
GET/v1/webhooksList endpoints
POST/v1/webhooksCreate. Returns the secret once
PATCH/v1/webhooks/{id}Change url, events, description, enabled
DELETE/v1/webhooks/{id}Delete
POST/v1/webhooks/{id}/roll-secretNew secret. The old one stops working at once
POST/v1/webhooks/{id}/testSend a sample event
GET/v1/webhooks/{id}/deliveriesDelivery log
POST/v1/webhooks/deliveries/{id}/retryRe-send one delivery
GET/v1/eventsAll events. Filter type
GET/v1/assetsTokens. Filter chain
POST/v1/assetsAdd a custom token (live key, plan)
PATCH/v1/assets/{chain}/{contract}Enable or disable (live key)
DELETE/v1/assets/{chain}/{contract}Remove (live key)
POST/v1/sandbox/depositsSimulate a deposit (test key)
POST/v1/sandbox/payouts/{id}/approveApprove a manual test payout (test key)
POST/v1/sandbox/payouts/{id}/rejectReject a manual test payout (test key)

API keys and billing are managed in the dashboard only.

Errors

Errors use normal HTTP status codes and a stable error.code.

HTTPcodeWhat to do
400INVALID_INPUTA field is missing or malformed. See message
400INVALID_CHAINUse an id from GET /v1/chains
400INVALID_AMOUNTSend a positive number string, such as "25.50"
400INVALID_ASSETUnknown or ambiguous token for this chain. Pass contract, or add it with POST /v1/assets
400INVALID_URLWebhook URL must be public https
400INVALID_EVENTSUse the event types above
400INVALID_JSONCheck Content-Type and the body
400INVALID_IDEMPOTENCY_KEYKeep it under 200 characters
400LIMIT_REACHED10 webhook endpoints already exist in this mode
400XPUB_REQUIREDRun sync-keys on your signer to add the network's public keys
401UNAUTHORIZEDSend Authorization: Bearer br_...
401INVALID_API_KEYKey is wrong or was rolled. Copy the current one
402PLAN_REQUIREDChoose a plan on the Billing page
402BILLING_SUSPENDEDRenew or settle on the Billing page
403ONBOARDING_REQUIREDSign in to the dashboard and finish the setup questions
403ACCOUNT_SUSPENDEDContact support
403PLAN_LIMIT_REACHEDYour plan's address or webhook limit. Upgrade
403TEST_ONLY / LIVE_ONLYUse the other key
403DASHBOARD_ONLYDo it in the dashboard
404NOT_FOUNDCheck the id, and that you're using the right mode's key
409IDEMPOTENCY_KEY_REUSEDUse a new key per operation
409PAYOUT_NOT_PENDINGThe test payout was already resolved
502UPSTREAM_ERRORTemporary. Retry with backoff and the same Idempotency-Key
503ACCOUNT_NOT_READYNew account still being set up. Retry in a minute
500INTERNAL_ERRORRetry. If it continues, contact support

A 404 for an id you know exists usually means you used the other mode's key: objects belong to one mode.

Pagination and retries

Pagination

List endpoints take page (default 1) and limit (default 20, max 100), and return newest first. total and pages can be null when a count isn't available: keep paging until a page has fewer items than limit.

Idempotency

Send an Idempotency-Key header on POST /v1/addresses and POST /v1/payouts. Repeating the request with the same key within 24 hours returns the original response with Idempotent-Replayed: true, and nothing new is created.

  • Use a value unique to the operation, such as your withdrawal id or a UUID. Max 200 characters.
  • Keys are per mode. Reusing one on a different endpoint returns 409 IDEMPOTENCY_KEY_REUSED.
  • Server errors (5xx) aren't stored, so a retry after one runs again. For payouts, check GET /v1/payouts first.
  • Send one attempt at a time: two requests with the same key at the same moment aren't guaranteed to be merged.

Retrying safely

Retry 5xx errors and timeouts with exponential backoff (for payouts, check GET /v1/payouts before each retry). Don't retry 4xx errors without changing the request.

Supported chains

Use the id wherever the API asks for chain. GET /v1/chains always has the current list.

idChainnative_assetDepositsPayouts
bitcoinBitcoinBTC✓✓
ethereumEthereumETH✓✓
bscBNB ChainBNB✓✓
tronTronTRX✓✓
baseBaseBASE✓✓
tonTONTON✓✓
xrpXRP LedgerXRP✓✓
litecoinLitecoinLTC✓✓
dogecoinDogecoinDOGE✓✓
solanaSolanaSOL✓✓
polygonPolygonPOL✓✓
arbitrumArbitrumARB✓✓
optimismOptimismOP✓✓
avalancheAvalancheAVAX✓✓
suiSuiSUI✓
aptosAptosAPT✓
celoCeloCELO✓✓
lineaLineaLINEA✓✓
opbnbopBNBopBNB✓✓
plasmaPlasmaXPL✓✓
hyperliquidHyperliquidHYPE✓✓
robinhoodRobinhood ChainHOOD✓✓

Short names accepted on input: btc, eth, bnb, trx, sol, matic/pol, arb, op, avax, ltc, doge, apt.

Pricing and billing

Test mode is free with no time limit, for receiving and sending. Live addresses, payouts and custom tokens need a plan, chosen on the Billing page. Until then, live calls return 402 PLAN_REQUIRED.

  • Pay as you go: 0.5% of the US dollar value of incoming live deposits. Each deposit's value is fixed when it's first priced. Payouts and sweeps carry no BlocksReader fee (you only pay the network fee), and transfers between your own addresses aren't charged. Fees settle every 14 days, and a cycle under US$1 is waived.
  • Other plans on offer, including monthly ones, are listed on the Billing page with their prices and limits.
  • Fees come from a prepaid billing wallet in your account: USDT on BNB Chain (BEP-20) only. Every top-up and fee is emailed to you.
  • If the balance can’t cover a fee, you keep full service for 2 days. After that, live access pauses until you settle on the Billing page:
    • Live API calls return 402 BILLING_SUSPENDED.
    • Your signer stops too: payouts stay pending and sweeps don’t run until you settle.
    • We keep watching your addresses. Deposit webhooks from the pause are held and delivered as soon as you settle, so nothing is lost.
    • Your funds are never locked: they’re controlled by your seed phrase, not by us.
    • Test mode is never paused.

Full terms are at blocksreader.com/terms.

Go-live checklist

  1. Set up the BlocksReader Signer with Docker on a server that stays online. Setup creates your wallet, you write the seed phrase on paper, and it adds your public keys to your account. See Wallet and signer.
  2. Start the signer and leave it running. Without it, live payouts and sweeps never go out.
  3. Choose a plan on the Billing page and top up the billing wallet.
  4. Swap to your br_live_ key in your server's environment. It is read only on the server and never logged.
  5. Register your production webhook with the live key. Test-key endpoints never receive live deposits. Put that endpoint's secret in production config.
  6. Check the handler: raw-body signature check, 300-second window, 2xx within 10 seconds, credit once per (chain, tx_hash, address) in a transaction, exact decimals.
  7. Run the catch-up job on a schedule and alert if it ever credits something (that means a webhook was missed).
  8. Show destination tags and memos to customers on XRP and TON.
  9. For payouts: make sure your signer is running, keep the sending wallet funded (plus gas for tokens), reserve balances before creating a payout, use your withdrawal id as the Idempotency-Key, and refund withdrawals on payout.failed.

Using an AI assistant? Run /mcp__blocksreader__go_live_checklist and it checks all of this against your code.

Questions: contact us or email hello@blocksreader.com.