Skip to main content
Single-print summary — what just executed. Cheaper than fetching the full fetch_trades tape.

Parameters

Same shape as fetch_midpoint — uses the unified MidpointRequest type.
market_id
string
required
outcome
string?
token_id
string?

Returns

LastTrade
object
price
f64
side
OrderSide
buy or sell.
size
f64
ts_ms
i64
Trade timestamp (Unix milliseconds).
Kalshi uses last_price_dollars from the market summary plus a /markets/trades?limit=1 lookup to enrich size and side. Polymarket uses CLOB GET /last-trade-price?token_id=….
use openpx::MidpointRequest;

let t = ex.fetch_last_trade_price(MidpointRequest {
    market_id: "KXBTC-25MAR14-T20000".into(),
    ..Default::default()
}).await?;
{ "price": 0.45, "side": "buy", "size": 100.0, "ts_ms": 1714000000000 }