Skip to main content
Latency win for portfolio-wide PnL marks — single round-trip instead of N calls to fetch_midpoint.

Parameters

market_ids
string[]
required
Kalshi: market tickers (max 1000). Polymarket: CLOB token IDs.

Returns

midpoints
Map<string, f64>
Map keyed by the input identifier (token_id on Polymarket, ticker on Kalshi). Markets without a two-sided book are omitted from the response.
let mids = ex
    .fetch_midpoints_batch(vec![
        "KXBTC-25MAR14-T20000".into(),
        "KXBTC-25MAR14-T25000".into(),
    ])
    .await?;
for (id, mid) in &mids {
    println!("{id}: {mid}");
}
{
  "KXBTC-25MAR14-T20000": 0.44,
  "KXBTC-25MAR14-T25000": 0.21
}