02 / 字段02 / SCHEMA
让每一行数据的含义先于模型。Know what each row means before it enters a model.
这是 Polymarket BTC 5分钟 / 15分钟盘口回测常用的四类数据表字段参考。字段名沿用频道发布的数据格式。A compact reference for the four tables used in a typical Polymarket BTC 5m / 15m order-book backtest. Field names follow the published collection format.
Ticks / 最佳报价Ticks / best quotes
当四个最佳报价都存在且至少一个发生变化时写入 ticks 行。它是事件驱动数据,不是固定频率采样。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.
| 字段Field | 含义Meaning |
|---|---|
ts / ts_sec / datetime | 本地采集时间的多种便捷格式。Local collection timestamp in multiple convenient forms. |
event_slug | 市场事件键,例如 btc-updown-5m-1782930000。Market event key, for example btc-updown-5m-1782930000. |
poly_up_bid / ask | UP token 的最佳买价和卖价。Best bid and ask for the UP token. |
poly_down_bid / ask | DOWN token 的最佳买价和卖价。Best bid and ask for the DOWN token. |
up_mid / down_mid | 由对应最佳买卖价计算出的中间价。Midpoint derived from the corresponding best bid and ask. |
up_spread / down_spread | 最佳卖价减最佳买价。Best ask minus best bid. |
window_start_ts / window_end_ts | 市场窗口边界;5分钟使用 300 秒,15分钟使用 900 秒。Market window boundaries; 5m uses 300 seconds and 15m uses 900 seconds. |
offset_s | 相对于市场窗口开始时间的秒数。Seconds relative to the market window start. |
Depth / 盘口档位Depth / order-book levels
Depth 行描述某个 outcome、某个 side 上的价格档位。完整快照最多可以包含两个 outcome × 两个 side × 20 个档位。Depth rows describe price levels for one outcome and one side. A complete snapshot can contain two outcomes × two sides × up to 20 levels.
| 字段Field | 含义Meaning |
|---|---|
event_slug | 用于关联市场元数据和结算结果的市场键。Market key used to join metadata and outcomes. |
outcome | UP 或 DOWN。UP or DOWN. |
side | BID 或 ASK。BID or ASK. |
level | 从 1 开始的盘口档位;level 1 是当前最佳档位。1-based book level; level 1 is the best available level. |
price | 该档位展示的 token 价格。Displayed token price at this level. |
size | 该档位展示的可用 token 数量,不保证实际成交。Displayed available token size, not guaranteed execution volume. |
window_start_ts / window_end_ts | 市场窗口边界。Market window boundaries. |
offset_s | 相对于市场窗口开始时间的秒数。Seconds relative to the market window start. |
结算结果与市场元数据Outcomes and market metadata
market_outcomes 包含事件结束后的标签:winner_side 和 target,其中 UP 映射为 1,DOWN 映射为 0。market_outcomes contains post-event labels: winner_side and target, where UP maps to 1 and DOWN maps to 0.
seen_markets 包含 market_id、condition_id、UP/DOWN asset ID 和连接事件与市场记录所需的窗口时间。seen_markets contains the market_id, condition_id, UP/DOWN asset IDs, and the window timing needed to connect an event to its market records.
不要把 winner_side 或 target 当作预测特征。它们是市场结算后才可获得的标签。Do not use winner_side or target as a predictive feature. They are labels available only after the market resolves.