Skip to main content
GET
/
api
/
v1
/
markets
/
{market_id}
/
perps
/
open_interest
Get open interest
curl --request GET \
  --url https://api.allium.so/api/v1/markets/{market_id}/perps/open_interest \
  --header 'X-API-KEY: <api-key>'
{
  "items": [
    {
      "market_id": "<string>",
      "ts": "<string>",
      "oi_base": "<string>",
      "oi_quote_usd": "<string>"
    }
  ]
}
Alpha — The Market Data API is in alpha. Schema and response format may change. To request access, contact us or reach out to your account manager.
Returns the open interest timeseries for a perpetual market. Open interest is a stock variable, so each bucket reports the last sample within it (“OI as of the end of the bucket”). Perp markets only.
The query window is currently capped at 7 days per request.

Authorizations

X-API-KEY
string
header
required

Path Parameters

market_id
string
required

Canonical market slug, {venue}:{instrument_type}:{pair}.

Query Parameters

interval
enum<string>
required

Bucket interval.

Available options:
1m,
5m,
15m,
1h,
4h,
1d
from
string
required

Start of the window (ISO 8601; naive datetimes treated as UTC).

to
string
required

End of the window (ISO 8601).

limit
integer
default:500

Maximum rows to return (1–5000).

Required range: 1 <= x <= 5000

Response

200 - application/json

Open interest samples.

items
object[]
required