Open interest, funding and mark history of a perpetual

GET
/perps/{market}/history

Snapshots of one perpetual at a fixed interval — mark and oracle price, premium, open interest by side and hourly funding and borrow rates. A point whose open interest was not observed says so in oi_known.

Path Parameters

market*string

the market's address on its venue, as pair_address spells it (BTC)

Length1 <= length <= 128

Query Parameters

chain?string

chain slug or id of the perpetuals venue

Length1 <= length <= 32
Default"hyperliquid"
from?integer

window start, unix seconds UTC; defaults to the longest window served

Formatint64
Range0 <= value
to?integer

window end, unix seconds UTC; defaults to now

Formatint64
Range0 <= value
interval?string

snapshot spacing

Default"1h"

Value in

  • "5m"
  • "1h"

Header Parameters

Accept-Payment?string

payment methods the client can use, comma-separated, case-insensitive. With x402 in the list, a spent keyless budget answers 402 with the x402 challenge instead of 429.

PAYMENT-SIGNATURE?string

base64 x402 v2 payment payload for this request. A paid request skips the keyless budget and is settled only when it answers 2xx. The v1 header X-PAYMENT is accepted too.

Response Body

application/json

application/problem+json

application/problem+json

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://example.com/perps/string/history"
{  "chain": {    "slug": "hyperliquid",    "chain_id": 0  },  "market": "string",  "interval": "string",  "items": [    {      "timestamp": "string",      "mark_price": 0.1,      "oracle_price": 0.1,      "premium": 0.1,      "oi_usd": 0.1,      "oi_long_usd": 0.1,      "oi_short_usd": 0.1,      "funding_long_1h": 0.1,      "funding_short_1h": 0.1,      "borrow_long_1h": 0.1,      "borrow_short_1h": 0.1,      "oi_known": true    }  ]}