Skip to content

betting_combat.store.dashboards

The tables Grafana reads, in monitoring.betting_combat (Grafana’s Postgres datasource is the monitoring database). Every row is a latest-state snapshot, upserted on its key; the column lists mirror sql/betting_combat_monitoring.sql.

Classes

DashboardStore

data_health

data_health(rows: Sequence[dict[str, Any]]) -> None

decision_log

decision_log(rows: Sequence[dict[str, Any]]) -> None

fight_night

fight_night(rows: Sequence[dict[str, Any]]) -> None

model_registry

model_registry(rows: Sequence[dict[str, Any]]) -> None

open_ledger

open_ledger(since: dt.date) -> list[str]

The orders the ledger still shows unresolved on cards since since: open (filled, no result) or a live order in error (its fate looked up again by the catch-up settlement): the catch-up brings them up to date.

session_status

session_status(rows: Sequence[dict[str, Any]]) -> None

settle_ledger

settle_ledger(settled: Sequence[dict[str, Any]]) -> int

Ledger rows still unresolved marked with their order’s settlement (client_order_id, status ‘won’ / ‘lost’ / ‘void’, pnl, settled_at, and the order’s filled_contracts, avg_price, stake, fees); the rows updated. The card run writes its own settlements; this is the catch-up settlement’s (2026-10-10 Camilo vs Herbert: settled the next day, still shown open).

trade_ledger

trade_ledger(rows: Sequence[dict[str, Any]]) -> None

write

write(table: str, rows: Sequence[dict[str, Any]]) -> None

Upsert latest state. A value the writer does not know (None) never erases one a previous writer knew (a relaunched run re-writes orders it restored).

Functions

shape

shape(table: str, rows: Sequence[dict[str, Any]]) -> list[dict[str, Any]]

Exactly the table’s columns, floats as floats, JSON as text.