Skip to main content
GET
/
api
/
v1
/
markets
/
{market_id}
/
ohlcv
Get OHLCV candles
curl --request GET \
  --url https://api.allium.so/api/v1/markets/{market_id}/ohlcv \
  --header 'X-API-KEY: <api-key>'
{
  "items": [
    {
      "market_id": "<string>",
      "open_time": 123,
      "close_time": 123,
      "open": "<string>",
      "high": "<string>",
      "low": "<string>",
      "close": "<string>",
      "volume": "<string>",
      "trade_count": 123
    }
  ]
}
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 historical OHLCV candles for a market at a chosen interval.

Notes

  • Query window is capped at 7 days per request. Walk from forward to page through longer windows.
  • Last bucket is mutable. If to is “now”, the most recent candle keeps updating until its interval closes. Clients polling live data should refresh or discard the last bucket.
  • Empty buckets are omitted. Zero-volume intervals are not padded; interpolate client-side if you need a dense series.
  • volume is base-asset volume, not USD notional.

Coming soon

volume_quote — quote-denominated (USD) volume — is not yet returned. For now, approximate it as volume × mid. To request prioritization, reach out to your account manager.

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

Candle 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 candles to return (1–5000).

Required range: 1 <= x <= 5000

Response

200 - application/json

Candles, ascending by time.

items
object[]
required