Market history: oracle, premium, impact prices
Mark, oracle price, premium, funding and open interest of one Hyperliquid market over time.
/api/v1/markets/{coin}/historyEvery keyThe same data on the website, no key needed: BTC positioning.
Description
Market history of one coin on one venue, oldest first: per bucket the mark, funding (hourly rate), open interest and the long/short ratio; on Hyperliquid (the default venue, main dex and HIP-3) also the oracle price, the premium and the impact bid / ask. venue (API 1.42.0): hyperliquid, lighter, binance, bybit, gate, htx, kucoin, aster; data.venue names it. Binance and Bybit: funding reaches back to the listing of the contract (before our own collection one bucket per settlement, the settled rate divided by the venue's settlement interval; mark is null there), open interest before our own collection is the exchange's open-interest history (openInterestUnit USDT, hourly buckets; our own samples are USD), longShortRatio is long accounts / short accounts of all accounts (Binance also topAccountRatio and topPositionRatio of its top traders). Hyperliquid: longShortRatio = longUsd / shortUsd of the wallets we track. Lighter: mark, funding and open interest. A field a venue does not have is null. Pages: a response holds the newest limit buckets of the window; meta.nextCursor / meta.nextUrl lead to the older ones (null when nothing older is stored; a page can hold fewer buckets than limit). oracle: Hyperliquid oracle price: the index price Hyperliquid computes from external spot sources and uses for funding; not a trade price. On HIP-3 markets (names like xyz:TSLA, data.oracleSetBy deployer) the market's deployer sets the oracle price. premium: the premium Hyperliquid reports in the market context (the funding input from the impact prices against the oracle). impactBid / impactAsk: average fill price of a market sell / buy of the venue impact size, not the best bid / ask. Every value is the last sample of the bucket that had it (funding on hourly buckets: the last sample of the hour, which is the rate settled at the end of that hour); we read the market context about every 30 seconds (HIP-3 markets too; every 2 minutes during an outage of our WebSocket feed), Hyperliquid updates the oracle about every 3 seconds, so a bucket shows our last reading, not every update. oracle, premium and the impact prices are recorded from the release of this endpoint (API 1.31.0) on and are null on older buckets; mark, funding and open interest reach back as far as the stored market history. Nothing is interpolated: a bucket without a sample is missing. closed: false marks the bucket still forming. from is clamped to the plan history, to to now minus the feed delay.
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, e.g. BTC or xyz:TSLA (case-insensitive). 404 when the venue has no market of it (an exchange-only coin with the default venue hyperliquid).e.g. BTC |
venuestring | hyperliquid (default) | lighter | binance | bybit | gate | htx | kucoin | aster. A switched-off venue answers 400. Binance / Bybit: 403 source_restricted only while that exchange is withheld (meta.restricted).one of hyperliquid, lighter, binance, bybit, gate, htx, kucoin, aster · default hyperliquid |
tfstring | 5m or 1h (default, UTC aligned). 5m reaches back up to 90 days (5-minute buckets are kept that long, then hourly) and follows the 5m heatmap columns, open on every plan and keyless; the window is the plan history.one of 5m, 1h · default 1h |
intervalstringdeprecated | Deprecated (API 1.56.0): the earlier name of `tf`, accepted with the same meaning until v2; use tf. Send one of the two.one of 5m, 1h · default 1h |
fromstring | Start (ISO 8601, optional; default: `limit` buckets before `to`). Clamped to the plan history (meta.warnings says so).ISO 8601 (UTC), e.g. 2026-10-23T12:00:00Z or 2026-10-23 |
tostring | End, exclusive (ISO 8601, optional; default now).ISO 8601 (UTC), e.g. 2026-10-23T12:00:00Z or 2026-10-23 |
limitinteger | Number of items, default 500, clamped to 1–5000.1–5000 · default 500 · e.g. 24 |
cursorstring | Older buckets: the value of meta.nextCursor from the previous response (keep the other parameters unchanged). Cursors are signed: an edited cursor answers 400.e.g. the value of meta.nextCursor |
fieldsstring | Comma-separated fields of every data.points item to return, e.g. t,fundingHourly,openInterestUsd,longShortRatio (case-insensitive). All other fields are left out, so large lists get much smaller; an unknown name answers 400 with the list of fields. Default: every field.e.g. t,mark,oracle |
formatstring | json (default: the { data, meta } envelope) | csv (the rows with a header line; /funding and /funding/predicted one line per coin and venue with the column venue, /long-short and /funding/spreads with nested objects as columns such as hl_longUsd; other nested values as JSON text) | ndjson (one JSON object per row and line). csv and ndjson carry the meta block in headers: Link rel="next" and X-Blockmetric-Next-Cursor (next page), X-Blockmetric-Next-After (forward polling), X-Blockmetric-Updated-At, X-Blockmetric-Warnings, X-Blockmetric-License. Errors stay JSON. csv and ndjson need a plan that downloads files on the website (Pro, Desk, API Dev, API Pro); keyless access and free keys answer 403 plan_required (param format).one of json, csv, ndjson · default json |
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.
venuestring (enum)The venue of this history (the venue parameter, default hyperliquid). API 1.42.0.
tf"5m" | "1h"Bucket interval: 5m or 1h.
dexstring · nullableHIP-3 dex of the market (the part before the colon, e.g. xyz); null on the main dex and on other venues.
oracleSetBy"hyperliquid" | "deployer" · nullableWho sets the oracle price: hyperliquid (main-dex perps, from external spot sources) or deployer (HIP-3: the market's deployer). null on other venues (no oracle price is stored for them).
points[]array of objectsOldest → newest; a bucket without a sample is missing (nothing interpolated).
Show the 15 fields of
points[]points[].tstring (ISO 8601)Bucket start (UTC).points[].marknumber · nullableMark price, last sample of the bucket.points[].oraclenumber · nullableHyperliquid oracle price: the index price Hyperliquid computes from external spot sources and uses for funding; not a trade price. On HIP-3 markets the market's deployer sets it. Last sample of the bucket; null before we recorded it.points[].premiumnumber · nullablePremium as Hyperliquid reports it in the market context (fraction): the funding input from the impact prices against the oracle. Last sample of the bucket.points[].impactBidnumber · nullableAverage fill price of a market sell of the venue impact notional (not the best bid). Last sample of the bucket that had the impact prices.points[].impactAsknumber · nullableAverage fill price of a market buy of the venue impact notional (not the best ask). Same sample as impactBid.points[].fundingHourlynumber · nullableHourly funding rate, fraction (0.0001 = 0.01 %/h): last sample of a 5-minute bucket; on hourly buckets the last sample of the hour, which is the rate settled at the end of that hour.points[].openInterestUsdnumber · nullableOpen interest, last sample of the bucket, in the unit openInterestUnit names (USD for our own samples).points[].openInterestUnit"USD" | "USDT" · nullableUnit of openInterestUsd: USD = our own samples (exchange values converted with the USDT rate); USDT = the exchange’s own history for the time before our own collection (Binance, Bybit, Gate, HTX; hourly buckets), values unchanged. null without open interest. API 1.42.0.points[].longShortRationumber · nullableLong/short ratio, last value of the bucket. Hyperliquid: longUsd / shortUsd of the wallets we track. Binance, Bybit: long accounts / short accounts of all accounts on the exchange. null on Lighter and where nothing is stored. API 1.42.0.points[].topAccountRationumber · nullableBinance, Gate, HTX: long / short accounts of the top traders. null elsewhere. API 1.42.0.points[].topPositionRationumber · nullableBinance, Gate, HTX: long / short positions of the top traders. null elsewhere. API 1.42.0.points[].longUsdnumber · nullableHyperliquid only: tracked long notional. null elsewhere. API 1.42.0 (USD).points[].shortUsdnumber · nullableHyperliquid only: tracked short notional. null elsewhere. API 1.42.0 (USD).points[].closedbooleanfalse: the bucket is still forming and its values can change.
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.