| license: mit | |
| language: | |
| - zh | |
| - en | |
| tags: | |
| - AShare | |
| - stock | |
| size_categories: | |
| - 1K<n<10K | |
| # Mirro-Ex Shanghai/Shenzhen L1 and L2 Market Data | |
| <details open> | |
| <summary>中文</summary> | |
| ## 数据集简介 | |
| 本数据集包含上海、深圳 A 股市场的 L2 逐笔数据和对应的 L1 五档行情快照,可用于市场回放、订单簿重建、L1/L2 对齐验 | |
| 证和高频数据研究。 | |
| 数据按交易日期和证券代码组织,证券代码使用统一格式: | |
| - `.XSHG` 表示上海证券交易所 | |
| - `.XSHE` 表示深圳证券交易所 | |
| ## 数据内容 | |
| 本数据集包含两类数据: | |
| 1. **L2 逐笔数据** | |
| - 包括逐笔委托和逐笔成交数据。 | |
| - 可用于按消息序号或时间顺序重建订单簿。 | |
| - 逐笔委托记录订单提交、撤单等事件。 | |
| - 逐笔成交记录成交价格、成交数量、买卖方订单编号和成交类型等信息。 | |
| 2. **L1 五档行情快照** | |
| - 包含买一到买五、卖一到卖五的价格和数量。 | |
| - 每行代表一个行情快照。 | |
| - 可作为订单簿重建结果的参考基准,用于一致性分析和误差检查。 | |
| ## 覆盖范围 | |
| 当前数据覆盖 2026-05-06 至 2026-05-29 之间的 18 个交易日。 | |
| 包含证券: | |
| - `000651.XSHE` | |
| - `001896.XSHE` | |
| - `300274.XSHE` | |
| - `600410.XSHG` | |
| - `600900.XSHG` | |
| - `601899.XSHG` | |
| ## L1 字段示例 | |
| - `ts`: 毫秒级 Unix 时间戳 | |
| - `code`: 标准化证券代码 | |
| - `source_seq`: L1 源数据序号 | |
| - `ask1_price` 到 `ask5_price`: 卖一至卖五价格 | |
| - `ask1_size` 到 `ask5_size`: 卖一至卖五数量 | |
| - `bid1_price` 到 `bid5_price`: 买一至买五价格 | |
| - `bid1_size` 到 `bid5_size`: 买一至买五数量 | |
| ## 使用场景 | |
| - A 股市场回放 | |
| - L2 订单簿重建 | |
| - L1 与 L2 数据对齐 | |
| - 高频交易研究 | |
| - 模拟撮合与模拟交易 | |
| - 市场微观结构分析 | |
| ## 注意事项 | |
| L1 五档快照和 L2 逐笔数据来自不同数据口径。L1 是已经生成好的行情快照,L2 是逐笔事件流。使用 L2 重建出的订单簿状 | |
| 态不一定能在每个时间点与 L1 快照完全一致,差异可能来自快照发布时间、事件排序、集合竞价规则、撤单处理和数据源口径 | |
| 差异。 | |
| </details> | |
| <details> | |
| <summary>English</summary> | |
| ## Dataset Description | |
| This dataset contains Shanghai and Shenzhen A-share L2 tick-by-tick market data together with corresponding L1 | |
| five-level order book snapshots. It can be used for market replay, order book reconstruction, L1/L2 alignment, | |
| and high-frequency market data research. | |
| Data is organized by trading date and instrument code. Instrument codes use the following suffixes: | |
| - `.XSHG`: Shanghai Stock Exchange | |
| - `.XSHE`: Shenzhen Stock Exchange | |
| ## Data Contents | |
| The dataset contains two types of data: | |
| 1. **L2 tick-by-tick data** | |
| - Includes order events and transaction events. | |
| - Can be used to reconstruct order books by message sequence or event time. | |
| - Order records represent order submissions and cancellations. | |
| - Transaction records include trade price, trade volume, buy/sell order IDs, and trade type. | |
| 2. **L1 five-level market snapshots** | |
| - Contains top-five bid and ask prices and sizes. | |
| - Each row represents one market snapshot. | |
| - Can be used as a reference for validating reconstructed order books from L2 data. | |
| ## Coverage | |
| The current dataset covers 18 trading days from 2026-05-06 to 2026-05-29. | |
| Included instruments: | |
| - `000651.XSHE` | |
| - `001896.XSHE` | |
| - `300274.XSHE` | |
| - `600410.XSHG` | |
| - `600900.XSHG` | |
| - `601899.XSHG` | |
| ## Example L1 Fields | |
| - `ts`: Unix timestamp in milliseconds | |
| - `code`: normalized instrument code | |
| - `source_seq`: source sequence number from the L1 feed | |
| - `ask1_price` to `ask5_price`: ask level 1 to 5 prices | |
| - `ask1_size` to `ask5_size`: ask level 1 to 5 sizes | |
| - `bid1_price` to `bid5_price`: bid level 1 to 5 prices | |
| - `bid1_size` to `bid5_size`: bid level 1 to 5 sizes | |
| ## Use Cases | |
| - A-share market replay | |
| - L2 order book reconstruction | |
| - L1/L2 data alignment | |
| - High-frequency trading research | |
| - Simulated matching and paper trading | |
| - Market microstructure analysis | |
| ## Notes | |
| L1 five-level snapshots and L2 tick-by-tick event streams use different market data representations. L1 data | |
| consists of already published market snapshots, while L2 data consists of individual order and transaction | |
| events. An order book reconstructed from L2 data may not match the L1 snapshot exactly at every timestamp due to | |
| snapshot publication timing, event ordering, call auction logic, cancellation handling, and vendor-specific data | |
| conventions. | |
| </details> |