Skip to content

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.

Functions

card_deps

card_deps(db: Databases, settings: Settings) -> AsyncIterator[SessionDeps]

utcnow

utcnow() -> dt.datetime