02 / SCHEMA

Know what each row means before it enters a model.

A compact field reference for the four tables used in a typical Polymarket BTC 5m / 15m order-book backtest.

Ticks / best quotes

A ticks row is written when all four best quotes exist and at least one best quote changes. It is event-driven, not a fixed-frequency sample.

FieldMeaning
ts / ts_sec / datetimeCollection timestamp in multiple convenient forms.
event_slugMarket event key used to join all related records.
poly_up_bid / askBest bid and ask for the UP token.
poly_down_bid / askBest bid and ask for the DOWN token.
up_mid / down_midMidpoint derived from the corresponding best bid and ask.
up_spread / down_spreadBest ask minus best bid.
window_start_ts / window_end_tsMarket window boundaries; 5m uses 300 seconds and 15m uses 900 seconds.
offset_sSeconds relative to the market window start.

Depth / order-book levels

Depth rows describe one outcome and one side at one price level. A complete snapshot can contain two outcomes × two sides × up to 20 levels.

FieldMeaning
event_slugMarket key used to join metadata and outcomes.
outcomeUP or DOWN.
sideBID or ASK.
level1-based book level; level 1 is the best available level.
priceDisplayed token price at this level.
sizeDisplayed token size, not guaranteed execution volume.
window_start_ts / window_end_tsMarket window boundaries.
offset_sSeconds relative to the market window start.

Outcomes and market metadata

market_outcomes contains post-event labels: winner_side and target, where UP maps to 1 and DOWN maps to 0.

seen_markets contains market_id, condition_id, UP/DOWN asset IDs, and the window timing needed to connect an event to its market records.

Do not use winner_side or target as a predictive feature. They are labels available only after the market resolves.