betting_combat.trading.wiring
Builds a card run’s dependencies from the environment, and closes them after.
Kalshi is always connected (its public data and live feed need no key; the
WebSocket mirror and live orders do). The desk gets a live executor only when the
credentials are present — the session refuses to run live without one. The live round
statistics (Cito) are connected when CITO_API_KEY is set: a row on the primary’s ‘stats’
variant reads them; without the key its breaks price on ‘no_stats’.
Functions
card_deps
card_deps(db: Databases, settings: Settings) -> AsyncIterator[SessionDeps]utcnow
utcnow() -> dt.datetime