Contents

Pagination & caching

Feeds come newest first in pages; time windows decide how far back; ETags make polling cheap.

Cursor pagination

Pass meta.nextCursor back as cursor until it is null. Keep every other parameter unchanged.

Read every page
# first page, then repeat with the cursor until meta.nextCursor is null
curl -s -H "Authorization: Bearer $BLOCKMETRIC_API_KEY" \
  "https://api.blockmetric.io/v1/liquidations?sinceMinutes=1440&limit=500" | jq '{n: (.data | length), next: .meta.nextCursor}'

curl -s -H "Authorization: Bearer $BLOCKMETRIC_API_KEY" \
  "https://api.blockmetric.io/v1/liquidations?sinceMinutes=1440&limit=500&cursor=<meta.nextCursor>"
  • Paginated endpoints: /liquidations, /positions/top, /whales/feed, /traders, /tape, /radar/events, /security/incidents, /security/wallets, /movements. meta.nextCursor is always present there and null on the last page.
  • Cursors are opaque and signed. Do not build or edit them: an edited cursor or one from another endpoint answers 400 invalid_param.
  • Paging stops at your plan's history. Older rows are never returned, also not through a cursor; meta.access says where your window starts.
  • limit sets the page size; values outside the allowed range are clamped and reported in meta.warnings.

Time windows

Each endpoint takes the window that fits its data. All times are ISO 8601 in UTC.

Time-window parameters
ParameterMeaningEndpoints
sinceMinutesLook back this many minutes from now./liquidations, /tape
hoursLook back this many hours from now (or from end)./liquidations/summary, /heatmap/{coin}, /heatmap/{coin}/open-interest, /orderbook/{coin}, /flow/{coin}, /exchange-flows
sinceOnly rows after this ISO 8601 time, the natural polling cursor of a feed./whales/feed, /radar/events, /movements
fromStart of a fixed window (ISO 8601)./liquidations, /candles/{coin}, /tape
toEnd of a fixed window (ISO 8601)./liquidations, /candles/{coin}, /tape
endEnd of the window instead of now (ISO 8601)./heatmap/{coin}, /heatmap/{coin}/open-interest
afterForward polling: only rows newer than this id (pass meta.nextAfter from the previous poll)./liquidations, /tape

Polling for new rows

Ask only for what is new, and let the server tell you when nothing changed.

  • Feeds: remember the newest time you have seen and pass it as since (whale feed, movements), or the newest id as after where the endpoint offers it.
  • Snapshots (liquidation map, order book, screener) change at most every minute. Poll once a minute with If-None-Match.
  • Alerts: instead of polling, receive events the moment they happen with webhooks or the live stream.

Caching with ETag

Every 200 has an ETag. Send it back as If-None-Match: while nothing changed you get 304 without a body.

Revalidate instead of downloading
# 1st call: note the ETag header
curl -si -H "Authorization: Bearer $BLOCKMETRIC_API_KEY" "https://api.blockmetric.io/v1/liqmap/BTC" | grep -i etag

# later: 304 Not Modified (no body) while nothing changed
curl -si -H "Authorization: Bearer $BLOCKMETRIC_API_KEY" \
  -H 'If-None-Match: "<etag>"' "https://api.blockmetric.io/v1/liqmap/BTC" | head -1

A 304 still counts as a request against your limits, but transfers nothing. Responses are private to your key; never cache them in a shared CDN.

Smaller answers: compression, fields and CSV

Large lists shrink a lot when you ask for compression and only the fields you need.

  • Compression: send Accept-Encoding: gzip (or br, zstd). Browsers, Node fetch, Python requests and curl with --compressed do it for you; JSON lists are often 5 to 8 times smaller.
  • fields: only the named fields of every row, e.g. ?fields=coin,mark,fundingApr. Unknown names answer 400 with the list of fields.
  • format=csv or format=ndjson: only the rows. The next page is in Link: rel="next" and X-Blockmetric-Next-Cursor; the cursor of a JSON page works too. Errors stay JSON.
Three fields of every market as CSV
# three fields of every market as CSV; --compressed asks for gzip
curl -s --compressed -H "Authorization: Bearer $BLOCKMETRIC_API_KEY" "https://api.blockmetric.io/v1/markets?fields=coin,mark,fundingApr&format=csv"

Row lists: /markets, /funding, /liquidations, /positions/top, /whales/feed, /radar/events, /coins, /candles/{coin}, /long-short, /whales, /traders, /tape, /screener, /funding/predicted, /funding/spreads, /security/incidents, /security/wallets, /movements. Your plan, its history and the licence apply exactly as for JSON; only the encoding changes.

Code snippets in these docs are licensed under MIT-0: copy them into your own code without attribution. The SDKs, CLI and MCP server will be, once published, Apache-2.0; the name Blockmetric is not licensed (forks must be renamed). Data from the API is governed by the API terms; third-party exchange data by the exchange’s terms.

LiveHyperliquid markets 10sOperationalHyperliquid positions & whales 9sOperationalLiquidation heatmap & levels 12sOperationalLighter markets & liquidations 18sOperationalLighter positions & heatmap 10sOperationalLighter RH positions & heatmap 14sOperationalBinance markets 39sOperationalBybit markets 9sOperationalBinance liquidations 18sOperationalBybit liquidations 18sOperationaldYdX positions & heatmap 11sOperationalGMX positions & heatmap 14sOperationalLong/short & open interest history 2mOperationalOrder books & trade flow 9sOperationalOn-chain transfers 10sOperationalSecurity monitor 48sOperationalBlockmetric Sentiment 9mOperationalOfficial news 8mOperationalAlert delivery 10sOperational10:06:36 UTCData: Blockmetric Research · Binance · Bybit