Skip to main content
Cheaper than fetch_orderbook when only the mark price is needed.

Parameters

market_id
string
required
Native market identifier — Kalshi ticker or Polymarket condition ID / token.
outcome
string?
Outcome label (e.g. "yes", "no"). Defaults to YES on Kalshi.
token_id
string?
Polymarket CLOB token ID. When set, takes precedence over market_id + outcome. On Kalshi this field is treated as an alternate ticker.

Returns

midpoint
f64
(best_bid + best_ask) / 2 for the requested side.
Kalshi derives this from the market summary endpoint — no native /midpoint exists. Polymarket uses CLOB GET /midpoint?token_id=….
use openpx::MidpointRequest;

let req = MidpointRequest {
    market_id: "KXBTC-25MAR14-T20000".into(),
    outcome: Some("yes".into()),
    ..Default::default()
};
let mid = ex.fetch_midpoint(req).await?;
0.44