Data Model
Schema references for API objects and ClickHouse storage.
| Field | Type | Description |
|---|
| conditionId | string | Unique market identifier (hex string) |
| category | string | Market category — crypto, sports, economics, weather |
| subcategory | string | Specific sub-type — BTC, NBA, FOMC, NYC, etc. |
| label | string | Human-readable market name |
| tokenIds | string[] | Array of token IDs (replaces tokenIdUp/tokenIdDown) |
| outcomes | string[] | Outcome labels — ["UP","DOWN"], ["Yes","No"], etc. |
| configId | string | Category configuration reference |
| slug | string | Human-readable identifier (e.g., btc-updown-5m-1772799300) |
| endDate | string | When the market resolves (ISO 8601) |
| expired | boolean | Whether the market has expired |
| expiresIn | number | Milliseconds until expiry |
| Column | Type | Description |
|---|
| crypto | LowCardinality(String) | BTC, ETH, SOL, XRP |
| timeframe | LowCardinality(String) | 5m, 15m, 1h, 1d |
| market_id | String | Polymarket conditionId |
| token_id | String | CLOB token ID |
| token_side | Enum8 | UP or DOWN |
| timestamp | DateTime64(3, 'UTC') | Millisecond precision |
| crypto_price | Float64 | Spot price at capture time |
| best_bid | Float64 | Top of book bid |
| best_ask | Float64 | Top of book ask |
| mid_price | Float64 | (bid + ask) / 2 |
| spread | Float64 | ask - bid |
| bid_depth_total | Float64 | Total bid depth |
| ask_depth_total | Float64 | Total ask depth |
| bids | Array(Tuple(Float64, Float64)) | Full bid book [price, size] |
| asks | Array(Tuple(Float64, Float64)) | Full ask book [price, size] |