Skip to main content
The markets.candles() and markets.prices() methods give you access to historical price data for any prediction market instrument available through Molecule. Use candles() to retrieve OHLCV-formatted candlestick series suitable for charting or model inputs, and prices() to pull tick-level or interval-aggregated price history for more granular analysis.

markets.candles

Retrieve OHLCV candlestick data for a venue instrument. Each candle contains open, high, low, close, and volume values for the specified time interval. Use this for charting, backtesting, and time-series model inputs.
Endpoint: GET /v1/candles
integer
required
The venue-specific instrument ID to retrieve candles for.
string
default:"1h"
Candle interval. Common values: 1m, 5m, 15m, 1h, 4h, 1d. Defaults to 1h.
integer
default:"500"
Maximum number of candles to return. Defaults to 500. Candles are ordered from oldest to newest.
For high-frequency model inputs, use shorter intervals such as 1m or 5m with a larger limit. For strategy backtesting over longer horizons, use 1h or 1d intervals.

markets.prices

Retrieve tick-level or interval-aggregated price history for a venue instrument. Use type="ticks" to get individual price points as they occurred, or specify an interval to receive bucketed price data.
Endpoint: GET /v1/prices
integer
required
The venue-specific instrument ID to retrieve price history for.
string
default:"ticks"
Price series type. Use ticks for individual price events. Other values may represent aggregated series depending on venue support.
integer
default:"100"
Maximum number of price records to return. Defaults to 100.
string
default:"1h"
Time bucketing interval for aggregated price series. Relevant when type is not ticks.
markets.prices() and markets.candles() both provide historical price data but serve different use cases. Use candles() when you need OHLCV structure (for example, to compute indicators or render charts). Use prices() when you need raw price events or a flat time-series of values.