Real-Time Charts
Load immutable chart history from the manifest, then the unfinished tail from chart bars
Chart history is keyed by venueMarketOutcomeId. The same path as Market-data API: GET /charts/history/manifest returns authorized references to immutable CDN chunks, then GET /charts/bars returns the unfinished tail.
The manifest returns at most eight CDN chunks. Fetch those URLs yourself, then fetch the tail with /charts/bars. The API does not merge candles.
const manifest = await client.getChartHistoryManifest({
venueMarketOutcomeId,
to,
});
const tail = await client.getChartBars({
venueMarketOutcomeId,
to,
});to is Unix milliseconds and is required on both calls. History references are Get versioned chart history references. The tail is Get chart bars.
mergeCandles() in @agg-build/sdk is a client-side volume-weighted merge of candle objects the caller already has. It is not a chart API parameter, and the API does not merge candles.
Supported resolutions
The SDK takes the human-readable form and translates it. REST uses resolution. There is no interval parameter. Sending interval does not choose a bar size. Omit resolution and the call uses the default 5 (5 minutes). A resolution other than 1, 5, 60, or 1D is rejected.
| Bar size | SDK (resolution) | REST (?resolution=) |
|---|---|---|
| 1 minute | "1m" | 1 |
| 5 minutes | "5m" | 5 |
| 1 hour | "1h" | 60 |
| 1 day | "1d" | 1D |
Live orderbook and trade frames, if you draw a forming bar yourself, are on WebSocket Protocol. There is no midpoint channel.