Skip to content

betting_combat.schemas.tables.market_data

market_data.py — what the venues print, on our market ids: every trade, every book level we received, every minute. No venue keeps book history, so books is ours alone.

TradesTable trades (market_id, trade_id) one public trade: a ``Trade``
BooksTable books (row_id) one book level: a ``BookChange``
PricesMinuteTable prices_1m (market_id, minute) one market's minute: a ``PriceMinute``
MarketReadsTable market_reads (market_id) how far a build read it: a ``MarketRead``

books is append-only (common-db’s append: a COPY, no conflict machinery); a card’s rows roll to the parquet archive after it.

Classes

BooksTable

Bases: Stored

One book level as we received it.

MarketReadsTable

Bases: Stored

How far a build has read one market’s history (a build’s resume: what is final).

PricesMinuteTable

Bases: Stored

One market’s minute on its venue.

TradesTable

Bases: Stored

One trade a venue printed.