/api/v1/open-interestStartup tier+ · 80 req/minCross-exchange open interest — totals, top coins, or per-coin time series.
Open interest tells you how much capital is sitting in derivatives positions right now. Without a `coin`, this returns the aggregate dashboard view (totals + top 20). With a `coin`, you get a bucketed time series across every source, plus a per-source breakdown so you can chart Binance vs Bybit OI side-by-side. Buckets are 5-minute aggregates to match the on-page chart.
Query parameters
All query parameters are optional unless marked required.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| coin | string | optional | — | Base asset. When supplied, you get history + per-source split. When omitted, aggregate totals + top 20. |
| source | string | optional | — | Only honoured when `coin` is supplied. Narrows the per-source breakdown to a single exchange. |
| window | enum | optional | 24h | Trailing lookback window. 1h24h7d |
Response shape
Always wrapped in the standard envelope. Nullable fields are explicitly marked — treat missing numeric data as a real data-source gap, not as an error.
// Wrapped in the standard envelope:
// {
// data: /* shape below */,
// meta?: { total?: number; limit?: number; offset?: number; ... }
// }
// Aggregate (no coin):
{
totals: { total: number; byKind: Record<string, number> };
topCoins: Array<{ base: string; oiUsd: number }>;
}
// Per-coin (coin supplied):
{
base: string;
window: { label: "1h" | "24h" | "7d"; hours: number };
history: Array<{ ts: number; oiUsd: number }>;
perSource: Record<string, Array<{ ts: number; oiUsd: number }>>;
}Example
Copy the curl, replace YOUR_KEY with a real key from your dashboard, and run.
curl -sS "http://localhost:3000/api/v1/open-interest?coin=BTC&window=24h" \
-H "Authorization: Bearer cg_live_YOUR_KEY"{
"data": {
"base": "BTC",
"window": { "label": "24h", "hours": 24 },
"history": [
{ "ts": 1744820400000, "oiUsd": 28453120000 },
{ "ts": 1744820700000, "oiUsd": 28511002100 }
],
"perSource": {
"binance_futures": [
{ "ts": 1744820400000, "oiUsd": 12410200000 }
],
"bybit": [
{ "ts": 1744820400000, "oiUsd": 8210100000 }
]
}
},
"meta": { "total": 2, "window": "24h" }
}Notes
- Buckets of 5 minutes are hard-coded server-side; smaller resolutions require a custom enterprise feed.
- `topCoins` caps at 20 — upgrade tier doesn't widen this; it's a product-level design choice.
Next
Check the error code reference, or get an API key to try the request against your own account.