Basis (perp vs index and spot)

How far the perpetual trades above or below its index or spot price, now per venue and over time.

GET/api/v1/markets/{coin}/basisEvery key

Description

Basis of one coin: how far the perpetual trades above or below its spot reference, as fractions (0.001 = 0.1 %), never annualised (a perpetual has no expiry). now: per venue the mark price against the venue's reference price (Hyperliquid's oracle price, the index price of each exchange), basis = (mark - reference) ÷ reference, from the newest market reading (not older than 30 minutes). series: over the window, Hyperliquid perp against its oracle price (kind index, 5-minute rows for 90 days, hourly beyond) and perp against spot on the same exchange where we record spot trades (kind spot: the last trade of each bar on both markets), each with mean, lowest, highest and last value. The exchanges' index price is stored as a current value without history, so they have no index line over time. termStructure is null: our collectors read perpetual contracts, no dated futures, so there is no curve by expiry (meta.warnings says so). Window: hours, default 24, within the plan history (free key 30 days, keyless 24 h, Pro / API Dev 365 days, Desk / API Pro 1095 days). Exchange data: values per exchange of Binance, Bybit, Gate, HTX, KuCoin and Aster are returned (single liquidations, prints, order books, tickers, funding and ratios per exchange, exchange candles, sums per venue), as collected and without warranty. We may withhold a venue at any time: then its rows and its own sums are left out, asking for it answers 403 source_restricted, meta.restricted lists it, and sums over several venues stay. meta.restricted is absent while nothing is withheld.

Who can call it

Available with every key and keyless (X-Blockmetric-Access: public). Keys of Free accounts get free-tier data (real-time feeds, 30 days of history, heatmap over time for every coin over the last 30 days, liquidation levels now for every coin, the same as the free web plan); Pro and Desk keys the data of their plan; API Dev / API Pro raise the limits. Paid keys read the plan's history, the same on monthly and yearly billing: GET /me states the days.

No key
24 h
Free
30 days
Pro
1 year
Desk
3 years
API Dev
1 year
API Pro
3 years

History window per plan. Limits: Authentication & limits.

Parameters

Parameters of /markets/{coin}/basis
ParameterDescription
coinstring · pathrequiredCoin name, e.g. BTC (case-insensitive). Coins without a Hyperliquid market answer 404.e.g. BTC
hoursintegerWindow in hours, default 24, clamped to 1 year and to the plan history (free key 30 days, keyless 24 h, Pro / API Dev 365 days, Desk / API Pro 1095 days). Also as 24h, 7d or 30d.1–8760 · default 24 · e.g. 24
fromstringWindow start (ISO 8601 or a plain date), instead of hours: the window is the whole hours from it to now, rounded up. Send from or hours, not both. Clamped like hours (meta.warnings names from).ISO 8601 (UTC), e.g. 2026-10-23T12:00:00Z or 2026-10-23
tfstring5m | 1h (default 5m up to 7 days, 1h beyond). 5m reaches 90 days.one of 5m, 1h

Response fields

Every success is { data, meta }; these are the fields of data. meta is the same on every endpoint.

    • coinstringCoin name as on Hyperliquid (BTC, kPEPE, HIP-3 names like xyz:TSLA).
    • hoursintegerWindow in hours as applied.
    • tf"5m" | "1h"Bucket of the series.
    • fromstring (ISO 8601)Window start.
    • tostring (ISO 8601)Window end.
    • now[]array of objectsPer venue now (readings not older than 30 minutes), largest open interest first.
    Show the 5 fields of now[]
    • now[].venuestringTrading venue the row comes from.
    • now[].marknumberMark price of the perpetual.
    • now[].indexnumberThe venue's reference price: Hyperliquid's oracle price, an exchange's index price.
    • now[].basisnumber(mark - index) ÷ index, fraction.
    • now[].updatedAtstring (ISO 8601)Time of the market reading.
    • series[]array of objectsBasis over the window per venue and kind.
    Show the 12 fields of series[]
    • series[].venuestringTrading venue the row comes from.
    • series[].kind"index" | "spot"index: Hyperliquid mark against its oracle price; spot: last perp trade against last spot trade of the same exchange per bucket.
    • series[].statsobject · nullableOver the points of the series; null without points.
    • series[].stats.meannumberMean basis (fraction).
    • series[].stats.minnumberLowest basis.
    • series[].stats.maxnumberHighest basis.
    • series[].stats.lastnumberNewest basis.
    • series[].points[]array of objectsOldest first; a bucket without both prices is missing.
    • series[].points[].tstring (ISO 8601)Bucket start.
    • series[].points[].perpnumberPerpetual price (mark or last trade).
    • series[].points[].refnumberReference price (oracle or last spot trade).
    • series[].points[].basisnumber(perp - ref) ÷ ref, fraction.
    • termStructurenullAlways null: no dated futures are collected, so there is no curve by expiry.
    • termStructureNotestringWhy termStructure is null.

Errors

Methodology

Code snippets in these docs are licensed under MIT-0: copy them into your own code without attribution. The SDKs, CLI and MCP server are 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 4sOperationalHyperliquid positions & whales 3sOperationalLiquidation heatmap & levels 6sOperationalLighter markets & liquidations 21sOperationalLighter positions & heatmap 13sOperationalLighter on Robinhood Chain: positions & heatmap 10sOperationalAster markets 8sOperationalBinance markets 59sOperationalBybit markets 39sOperationalGate markets 5sOperationalHTX markets 11sOperationalKuCoin markets 9sOperationalBinance liquidations 19sOperationalBybit liquidations 19sOperationalGate liquidations 19sOperationalHTX liquidations 19sOperationaldYdX positions & heatmap 6sOperationalGMX positions & heatmap 4sOperationalLong/short & open interest history 7sOperationalOrder books & trade flow 21sOperationalOn-chain transfers 1sOperationalSecurity monitor 1mOperationalBlockmetric Sentiment 13mOperationalAgency releases 6mOperationalAlert delivery 5sOperationalDataset files 20mOperational07:27:55 UTC