betting_combat.trading.traders
The venue side of a live order (Kalshi).
Each adapter only translates. The at-most-once protocol (write-ahead, no
re-send, reconcile) lives once, in executors.LiveExecutor.
Classes
KalshiTrader
Kalshi V2 orders: an IOC limit buy of YES or NO at the order’s limit price, keyed
by our client_order_id (Kalshi refuses a second order with the same id). A NO
buy’s average price is taken from its fills (each fill says which side it is on).
fills
fills(order_id: str, since: dt.datetime, outcome: str | None = None) -> list[VenueFill]The order’s fills, each priced as the side the ORDER bought (outcome): YES at
the trade’s YES price, NO at 1 - it. A buy of the side opposite a holding nets against
it (the joint execution’s sells) and Kalshi may report such a fill as a sale of the
held side; the order’s own side keeps its cost right either way.
find
find(order: OrderRecord, since: dt.datetime) -> VenueAck | Nonesubmit
submit(order: OrderRecord) -> VenueAck