Guide

Funding rate and open interest API: endpoints and examples

Which Blockmetric API endpoints return funding rates, predicted funding, open interest and long/short per venue, with requests, fields and history.

Blockmetric ResearchUpdated 5 min read

On this page
  1. Which endpoint answers which question
  2. Authentication and the first request
  3. Funding: current, predicted and across venues
  4. Open interest and long/short
  5. Live updates and history
  6. Limits of the data

Six endpoints of the Blockmetric API cover funding and positioning: /markets for the full market state of one venue, /funding for funding across venues, /funding/predicted for the next settlement, /funding/spreads for the gap between venues, /long-short for who is positioned which way and /screener for all of it in one sortable row per coin. This guide shows which one answers which question, what the fields mean and where history comes from.

The concepts behind the numbers are explained elsewhere: funding rate, predicted funding, open interest and the long/short ratio. For liquidations, the companion guide is Crypto liquidation data API.

Which endpoint answers which question

QuestionEndpointWhat comes back
What is the current state of every market on one venue?/marketsMark, oracle, hourly and annualised funding, open interest, 24h volume, premium and max leverage per coin
How does funding of one coin differ between venues?/fundingOne row per coin, funding per venue, the APR spread between venues and the largest absolute APR
What will the next funding payment be?/funding/predictedHourly and annualised predicted rate, funding interval and next funding time per venue
Where is the gap between venues widest?/funding/spreadsHighest and lowest venue per coin, the spread per year and per day, the thinner leg's open interest
Who is long and who is short?/long-shortHyperliquid long and short USD and wallet counts from tracked positions, plus the exchanges' published ratios
Which coins stand out right now?/screenerPrice change, open interest and its change, current and predicted funding, long/short, liquidations, RSI and volatility per coin

All six return one row per coin. Every endpoint except /markets accepts coin to narrow the answer to one market, and /markets takes venue instead. Parameters, error codes and real example responses are in the API reference.1

Authentication and the first request

Requests go to https://api.blockmetric.io/v1 with a key in the Authorization: Bearer header or in x-api-key. Keys start with bm_live_ and are created in your account; a key in a query parameter is refused.

export BLOCKMETRIC_API_KEY="bm_live_..."
curl -s -H "Authorization: Bearer $BLOCKMETRIC_API_KEY" \
  "https://api.blockmetric.io/v1/funding?coin=BTC"

The same calls are wrapped in our SDKs: npm install blockmetric for JavaScript and TypeScript, pip install blockmetric for Python. They read the key from BLOCKMETRIC_API_KEY; the free key works.

To try the API without an account, send the header X-Blockmetric-Access: public instead of a key. Keyless access gets the free tier with 24 hours of history, a low per-address rate limit and no commercial use. The developer overview has the quickstart, and the API explorer runs requests in the browser.

Every answer has the same envelope: data with the rows and meta with the plan, the newest timestamp (meta.updatedAt), the sources and the licence of the response.

Funding: current, predicted and across venues

Funding fields come in pairs. fundingHourly is the rate per hour as a fraction of the position's value; fundingApr is the same rate annualised, also as a fraction. A positive rate means longs pay shorts.

/funding puts the venues next to each other. Each row has byVenue with the rate, open interest and mark of every venue that quotes the coin, plus aprSpread (highest minus lowest annualised rate) and maxAbsApr. It answers "is this coin's funding unusual everywhere, or only on one venue?"

/funding/predicted looks one settlement ahead. For each venue it returns the predicted hourly and annualised rate, intervalHours (venues settle at different intervals, so the hourly figure is what makes them comparable) and nextFundingTime. The values come from Hyperliquid's predicted fundings and are refreshed every five minutes.

/funding/spreads ranks coins by the difference between their highest and lowest venue, either on current rates or with basis=predicted. Add minOiUsd to drop coins whose thinner leg has little open interest:

curl -s -H "Authorization: Bearer $BLOCKMETRIC_API_KEY" \
  "https://api.blockmetric.io/v1/funding/spreads?basis=predicted&minOiUsd=1000000&limit=20"

A spread is a difference between published rates, not a return anyone can earn: fees, price moves and different settlement times sit between the two. The guide Funding rates and funding arbitrage explains why.

Open interest and long/short

Open interest appears in three places. /markets?venue=hyperliquid gives openInterestUsd per coin together with volume24hUsd, which keeps the stock of open positions and the flow of trading apart. /screener adds the change of open interest over the last hour and the last 24 hours, so you can sort by oiChange24h. And /heatmap/{coin}/open-interest shows where open interest was added or removed on the exchanges, per price band, from five-minute changes.

/long-short describes positioning in two different ways, and the difference matters:

  • Hyperliquid comes from the positions of tracked wallets: longUsd, shortUsd, the number of long and short accounts and ratio = longUsd / shortUsd.
  • Exchanges publish their own ratios (all accounts, top accounts or top positions). Those count accounts or positions, not dollars, so a ratio above one can mean more long accounts while more dollars sit short.

The altcoin long/short post shows how far the two views can drift apart.

Live updates and history

Polling. The rows carry an updatedAt per venue. Funding and open interest change over minutes, so a poll every minute or so follows them closely without spending requests.

Streaming. On API Pro, GET /stream?channel=markets sends a snapshot of every market on connect and then only the markets whose values changed, at most every five seconds. The same stream runs over a WebSocket.

Events. Webhooks and the stream can deliver radar events, and three of them belong here: funding_extreme (an unusually high absolute rate on a coin with meaningful open interest), funding_flip (the sign of funding changed) and oi_spike (open interest rose fast within a short window).

History. These endpoints return the current state. For daily funding and open interest per coin, the History tab of every coin has one row per UTC day, for example BTC historical data, with CSV downloads on paid plans. Where each dataset starts, per venue, is listed on historical data. The guide Crypto historical data walks through the options.

Limits of the data

  • Exchange data as collected. Per-exchange rows of Binance and Bybit (their funding rates, ratios and tickers) are returned as collected, without warranty. We may withhold a venue at any time: asking for it then answers 403 source_restricted, meta.restricted names it, and our own aggregates stay, which is why a spread can be listed with null legs.
  • Tracked wallets. Hyperliquid long/short comes from the positions we poll, which covers large wallets far better than small ones.
  • Rates as published. Funding is shown as each venue publishes it. Venues differ in their formulas, caps and intervals, which the guide How funding rates are calculated covers.
  • Plan limits. Requests per minute and per day, history depth and commercial use depend on the plan; the API pricing page lists them. A 429 carries Retry-After, and every authenticated answer reports X-RateLimit-Remaining.

The funding page and the BTC positioning tab show the same data as charts, which is a quick way to check what an endpoint returns before writing code against it.

Sources

  1. Blockmetric API reference (accessed 2026-11-11)Back to text

How we collect and check the data: Data & methodology.

See today’s numbersThe live pages update continuously.

Get an API key
LiveHyperliquid markets 19sOperationalHyperliquid positions & whales 17sOperationalLiquidation heatmap & levels 24sOperationalLighter markets & liquidations 36sOperationalLighter positions & heatmap 18sOperationalLighter RH positions & heatmap 22sOperationalBinance markets 1mOperationalBybit markets 26sOperationalBinance liquidations 34sOperationalBybit liquidations 34sOperationaldYdX positions & heatmap 30sOperationalGMX positions & heatmap 31sOperationalLong/short & open interest history 1mOperationalOrder books & trade flow 17sOperationalOn-chain transfers 26sOperationalSecurity monitor 18sOperationalBlockmetric Sentiment 1mOperationalAgency releases 6mOperationalAlert delivery 23sOperationalDataset files 7mOperational16:14:29 UTCData: Blockmetric Research