async fn fetch_price_history(
req: PriceHistoryRequest,
) -> Result<Vec<Candlestick>, OpenPxError>
Parameters
Outcome label. Kalshi infers Yes/No from the market.
Polymarket condition ID for OI enrichment.
interval
PriceHistoryInterval
required
1m, 1h, 6h, 1d, 1w, or max.
Returns
Candlestick[].
Example
use openpx::{PriceHistoryRequest, PriceHistoryInterval};
let candles = ex.fetch_price_history(PriceHistoryRequest {
market_id: "KXBTC-25MAR14-T20000".into(),
interval: PriceHistoryInterval::Hour,
..Default::default()
}).await?;