GET /api/series/<metric>
History for one metric: compact time/value arrays, auto-picking the coarsest table that covers the requested range.
| Param | In | Required | Default | Description |
|---|---|---|---|---|
metric | path | required | — | One of the metric names or aliases in the table below, e.g. oi, funding, price, volume, liquidations, long-short, taker-flow, cvd, basis. |
base | query | one of base/market | — | Coin, e.g. BTC. Give exactly one of base or market. |
market | query | one of base/market | — | venue:perp|spot:SYMBOL, e.g. binance:perp:BTCUSDT. |
range | query | optional | 1d | How far back, e.g. 6h, 30d, 12w, 1y (max 730d). Ignored if start is given. |
start | query | optional | — | Epoch ms. Needs end unless range is also given. |
end | query | optional | now | Epoch ms. |
step | query | optional | auto | One of 1m, 5m, 15m, 1h, 4h, 1d; raised automatically so the response stays under 1500 points. |
venue | query | optional | — | binance, bybit or hyperliquid. |
type | query | optional | perp | perp, spot or all (market_id metrics only). |
kind | query | optional | accounts | accounts or top_pos (long-short only). |
curl 'https://swolecharts.com/api/series/oi?base=BTC&range=7d&step=1h'
Open a live example response →
Example response (trimmed)
{
"metric": "oi",
"step": 3600000,
"start": 1758931200000,
"end": 1759536000000,
"source": "market_1h",
"fields": [
"v"
],
"t": [
1758931200000,
1758934800000,
1758938400000
],
"v": [
16123456789.0,
16205000000.0,
16090000000.0
],
"gaps": [],
"db": true,
"base": "BTC",
"market": null,
"venue": null,
"type": "perp"
}
Always 200: bad input is a 400 with {"error": ...}; a missing or unreachable database still returns 200 with empty arrays and "db": false or "error": "unavailable". "gaps" marks the parts of the range the engine was not recording, so a chart can shade them instead of implying zero activity.