# Prediction-market candles at the requested frequency
curl --compressed "https://api.coinmetrics.io/v4/timeseries/market-candles?markets=kalshi-KXBTCD-*&type=event_contract&frequency=1m&paging_from=start&api_key=<your_key>"{
"data": [
{
"time": "2020-06-08T20:45:00.000000000Z",
"market": "coinbase-btc-usd-spot",
"price_open": "9705.07999999999993",
"price_close": "9705.01000000000022",
"price_high": "9706.19000000000051",
"price_low": "9705",
"vwap": "9705.1686505895068",
"volume": "16.8066639099999975",
"candle_usd_volume": "16.806663910",
"candle_trades_count": "212",
"twap": "9705.512345679"
},
{
"time": "2020-06-08T20:50:00.000000000Z",
"market": "coinbase-btc-usd-spot",
"price_open": "9705",
"price_close": "9696.27000000000044",
"price_high": "9705",
"price_low": "9695.71999999999935",
"vwap": "9698.38894423754937",
"volume": "14.7672128699999963",
"candle_usd_volume": "14.767212870",
"candle_trades_count": "215",
"twap": "9699.825"
}
],
"next_page_token": "0.MjAyMC0wNi0wOFQyMDo0NTowMFo",
"next_page_url": "https://api.coinmetrics.io/v4/timeseries/market-candles?markets=coinbase-btc-usd-spot&api_key=<your_key>&pretty=true&page_size=2&frequency=5m&next_page_token=0.MjAyMC0wNi0wOFQyMDo0NTowMFo"
}Market candles
Returns candles for specified markets.
Results are ordered by tuple (market, time).
To fetch the next page of results use next_page_url JSON response field.
Coin Metrics derives candles directly from trades. Candles are only generated if there are trades in the underlying interval. Therefore, gaps in candles data through time are normal and to be expected. To construct gapless candles, the client should fill forward candles through time, setting the open, high, low, and close to the close of the previous candle, setting the vwap to the vwap of the previous candle, and setting the volume to zero. With type=event_contract, only prediction markets are selected. Selectors must name an exchange and may use prefix wildcards. Prediction results traverse (normalized exchange, raw symbol, time) in C order; paging_from=end returns each page in ascending order after traversing backward. Only standard 1m, 5m, 10m, 15m, 30m, 1h, 4h, and 1d frequencies are supported; custom daily offsets and non-UTC 1d are not supported.
# Prediction-market candles at the requested frequency
curl --compressed "https://api.coinmetrics.io/v4/timeseries/market-candles?markets=kalshi-KXBTCD-*&type=event_contract&frequency=1m&paging_from=start&api_key=<your_key>"{
"data": [
{
"time": "2020-06-08T20:45:00.000000000Z",
"market": "coinbase-btc-usd-spot",
"price_open": "9705.07999999999993",
"price_close": "9705.01000000000022",
"price_high": "9706.19000000000051",
"price_low": "9705",
"vwap": "9705.1686505895068",
"volume": "16.8066639099999975",
"candle_usd_volume": "16.806663910",
"candle_trades_count": "212",
"twap": "9705.512345679"
},
{
"time": "2020-06-08T20:50:00.000000000Z",
"market": "coinbase-btc-usd-spot",
"price_open": "9705",
"price_close": "9696.27000000000044",
"price_high": "9705",
"price_low": "9695.71999999999935",
"vwap": "9698.38894423754937",
"volume": "14.7672128699999963",
"candle_usd_volume": "14.767212870",
"candle_trades_count": "215",
"twap": "9699.825"
}
],
"next_page_token": "0.MjAyMC0wNi0wOFQyMDo0NTowMFo",
"next_page_url": "https://api.coinmetrics.io/v4/timeseries/market-candles?markets=coinbase-btc-usd-spot&api_key=<your_key>&pretty=true&page_size=2&frequency=5m&next_page_token=0.MjAyMC0wNi0wOFQyMDo0NTowMFo"
}Authorizations
Query Parameters
Selects prediction-market candles. event_contract uses the prediction-market namespace and returns only markets with candles at the requested frequency. Without this parameter, prediction markets are excluded. ignore_unsupported_errors skips unsupported event-contract exchanges and explicit markets; ignore_forbidden_errors skips exchanges absent from the entitled AMS result. Neither flag ignores malformed or mixed-type selectors.
event_contract Start of the time interval.
This field refers to the time field in the response.
Multiple formats of ISO 8601 are supported: 2006-01-20T00:00:00Z, 2006-01-20T00:00:00.000Z, 2006-01-20T00:00:00.123456Z, 2006-01-20T00:00:00.123456789Z, 2006-01-20, 20060120.
Inclusive by default.
UTC timezone by default. Z suffix is optional and timezone parameter has a priority over it.
If start_time is omitted, response will include time series from the earliest time available.
End of the time interval.
This field refers to the time field in the response.
Multiple formats of ISO 8601 are supported: 2006-01-20T00:00:00Z, 2006-01-20T00:00:00.000Z, 2006-01-20T00:00:00.123456Z, 2006-01-20T00:00:00.123456789Z, 2006-01-20, 20060120.
Inclusive by default.
UTC timezone by default. Z suffix is optional and timezone parameter has a priority over it.
If end_time is omitted, response will include time series up to the latest time available.
Timezone name for start_time and end_time timestamps.
This parameter does not modify the output times, which are always UTC.
Format is defined by TZ database.
"America/New_York"

