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.
/api/v1/markets/{coin}/basisEvery keyDescription
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
| Parameter | Description |
|---|---|
coinstring · pathrequired | Coin name, e.g. BTC (case-insensitive). Coins without a Hyperliquid market answer 404.e.g. BTC |
hoursinteger | Window 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 |
fromstring | Window 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 |
tfstring | 5m | 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
- 400
invalid_paramInvalid parameter - 401
unauthorizedMissing or invalid API key - 401
key_requiredKeyless trial used up: a key is required - 403
plan_requiredPlan does not include this - 403
scope_requiredKey not scoped for this API - 403
ip_not_allowedAddress not on the IP allowlist of the key - 403
origin_not_allowedKey used from a browser origin it does not allow - 403
source_restrictedExchange withheld - 403
linked_accountKey of a linked free account paused - 403
https_requiredhttps required - 404
not_foundNot found - 429
rate_limitedPer-minute limit reachedretry - 429
daily_limit_exceededDaily limit reachedretry - 429
stream_limitToo many open streamsretry - 500
internal_errorInternal errorretry
Methodology
- Premium / basis (how it is computed and its limits)
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.