betting_combat.trading.market_data
Book tops and recent traded volume for the decision engine.
The WebSocket mirror answers when it is current; otherwise a REST snapshot is
taken on the spot. Either way a book is “as of” a moment the exchange confirmed
it, and a market that cannot be read is simply absent (the engine records
book_missing) — a data problem can cost a trade, never cause a wrong one.
Classes
MarketData
books
books(tickers: Sequence[str], max_age_s: float) -> dict[str, BookTop]prints
prints(ticker: str, since: dt.datetime, until: dt.datetime) -> list[Print] | NoneThe market’s trades in (since, until], oldest first; None when unknown.
volume
volume(tickers: Sequence[str], since: dt.datetime, until: dt.datetime) -> float | NoneContracts traded on tickers in (since, until]; None when unknown.