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| 5 |
+
- en
|
| 6 |
+
tags:
|
| 7 |
+
- AShare
|
| 8 |
+
- stock
|
| 9 |
+
size_categories:
|
| 10 |
+
- 1K<n<10K
|
| 11 |
---
|
| 12 |
+
|
| 13 |
+
# Mirro-Ex Shanghai/Shenzhen L1 and L2 Market Data
|
| 14 |
+
|
| 15 |
+
<details open>
|
| 16 |
+
<summary>中文</summary>
|
| 17 |
+
|
| 18 |
+
## 数据集简介
|
| 19 |
+
|
| 20 |
+
本数据集包含上海、深圳 A 股市场的 L2 逐笔数据和对应的 L1 五档行情快照,可用于市场回放、订单簿重建、L1/L2 对齐验
|
| 21 |
+
证和高频数据研究。
|
| 22 |
+
|
| 23 |
+
数据按交易日期和证券代码组织,证券代码使用统一格式:
|
| 24 |
+
|
| 25 |
+
- `.XSHG` 表示上海证券交易所
|
| 26 |
+
- `.XSHE` 表示深圳证券交易所
|
| 27 |
+
|
| 28 |
+
## 数据内容
|
| 29 |
+
|
| 30 |
+
本数据集包含两类数据:
|
| 31 |
+
|
| 32 |
+
1. **L2 逐笔数据**
|
| 33 |
+
- 包括逐笔委托和逐笔成交数据。
|
| 34 |
+
- 可用于按消息序号或时间顺序重建订单簿。
|
| 35 |
+
- 逐笔委托记录订单提交、撤单等事件。
|
| 36 |
+
- 逐笔成交记录成交价格、成交数量、买卖方订单编号和成交类型等信息。
|
| 37 |
+
|
| 38 |
+
2. **L1 五档行情快照**
|
| 39 |
+
- 包含买一到买五、卖一到卖五的价格和数量。
|
| 40 |
+
- 每行代表一个行情快照。
|
| 41 |
+
- 可作为订单簿重建结果的参考基准,用于一致性分析和误差检查。
|
| 42 |
+
|
| 43 |
+
## 覆盖范围
|
| 44 |
+
|
| 45 |
+
当前数据覆盖 2026-05-06 至 2026-05-29 之间的 18 个交易日。
|
| 46 |
+
|
| 47 |
+
包含证券:
|
| 48 |
+
|
| 49 |
+
- `000651.XSHE`
|
| 50 |
+
- `001896.XSHE`
|
| 51 |
+
- `300274.XSHE`
|
| 52 |
+
- `600410.XSHG`
|
| 53 |
+
- `600900.XSHG`
|
| 54 |
+
- `601899.XSHG`
|
| 55 |
+
|
| 56 |
+
## L1 字段示例
|
| 57 |
+
|
| 58 |
+
- `ts`: 毫秒级 Unix 时间戳
|
| 59 |
+
- `code`: 标准化证券代码
|
| 60 |
+
- `source_seq`: L1 源数据序号
|
| 61 |
+
- `ask1_price` 到 `ask5_price`: 卖一至卖五价格
|
| 62 |
+
- `ask1_size` 到 `ask5_size`: 卖一至卖五数量
|
| 63 |
+
- `bid1_price` 到 `bid5_price`: 买一至买五价格
|
| 64 |
+
- `bid1_size` 到 `bid5_size`: 买一至买五数量
|
| 65 |
+
|
| 66 |
+
## 使用场景
|
| 67 |
+
|
| 68 |
+
- A 股市场回放
|
| 69 |
+
- L2 订单簿重建
|
| 70 |
+
- L1 与 L2 数据对齐
|
| 71 |
+
- 高频交易研究
|
| 72 |
+
- 模拟撮合与模拟交易
|
| 73 |
+
- 市场微观结构分析
|
| 74 |
+
|
| 75 |
+
## 注意事项
|
| 76 |
+
|
| 77 |
+
L1 五档快照和 L2 逐笔数据来自不同数据口径。L1 是已经生成好的行情快照,L2 是逐笔事件流。使用 L2 重建出的订单簿状
|
| 78 |
+
态不一定能在每个时间点与 L1 快照完全一致,差异可能来自快照发布时间、事件排序、集合竞价规则、撤单处理和数据源口径
|
| 79 |
+
差异。
|
| 80 |
+
|
| 81 |
+
</details>
|
| 82 |
+
|
| 83 |
+
<details>
|
| 84 |
+
<summary>English</summary>
|
| 85 |
+
|
| 86 |
+
## Dataset Description
|
| 87 |
+
|
| 88 |
+
This dataset contains Shanghai and Shenzhen A-share L2 tick-by-tick market data together with corresponding L1
|
| 89 |
+
five-level order book snapshots. It can be used for market replay, order book reconstruction, L1/L2 alignment,
|
| 90 |
+
and high-frequency market data research.
|
| 91 |
+
|
| 92 |
+
Data is organized by trading date and instrument code. Instrument codes use the following suffixes:
|
| 93 |
+
|
| 94 |
+
- `.XSHG`: Shanghai Stock Exchange
|
| 95 |
+
- `.XSHE`: Shenzhen Stock Exchange
|
| 96 |
+
|
| 97 |
+
## Data Contents
|
| 98 |
+
|
| 99 |
+
The dataset contains two types of data:
|
| 100 |
+
|
| 101 |
+
1. **L2 tick-by-tick data**
|
| 102 |
+
- Includes order events and transaction events.
|
| 103 |
+
- Can be used to reconstruct order books by message sequence or event time.
|
| 104 |
+
- Order records represent order submissions and cancellations.
|
| 105 |
+
- Transaction records include trade price, trade volume, buy/sell order IDs, and trade type.
|
| 106 |
+
|
| 107 |
+
2. **L1 five-level market snapshots**
|
| 108 |
+
- Contains top-five bid and ask prices and sizes.
|
| 109 |
+
- Each row represents one market snapshot.
|
| 110 |
+
- Can be used as a reference for validating reconstructed order books from L2 data.
|
| 111 |
+
|
| 112 |
+
## Coverage
|
| 113 |
+
|
| 114 |
+
The current dataset covers 18 trading days from 2026-05-06 to 2026-05-29.
|
| 115 |
+
|
| 116 |
+
Included instruments:
|
| 117 |
+
|
| 118 |
+
- `000651.XSHE`
|
| 119 |
+
- `001896.XSHE`
|
| 120 |
+
- `300274.XSHE`
|
| 121 |
+
- `600410.XSHG`
|
| 122 |
+
- `600900.XSHG`
|
| 123 |
+
- `601899.XSHG`
|
| 124 |
+
|
| 125 |
+
## Example L1 Fields
|
| 126 |
+
|
| 127 |
+
- `ts`: Unix timestamp in milliseconds
|
| 128 |
+
- `code`: normalized instrument code
|
| 129 |
+
- `source_seq`: source sequence number from the L1 feed
|
| 130 |
+
- `ask1_price` to `ask5_price`: ask level 1 to 5 prices
|
| 131 |
+
- `ask1_size` to `ask5_size`: ask level 1 to 5 sizes
|
| 132 |
+
- `bid1_price` to `bid5_price`: bid level 1 to 5 prices
|
| 133 |
+
- `bid1_size` to `bid5_size`: bid level 1 to 5 sizes
|
| 134 |
+
|
| 135 |
+
## Use Cases
|
| 136 |
+
|
| 137 |
+
- A-share market replay
|
| 138 |
+
- L2 order book reconstruction
|
| 139 |
+
- L1/L2 data alignment
|
| 140 |
+
- High-frequency trading research
|
| 141 |
+
- Simulated matching and paper trading
|
| 142 |
+
- Market microstructure analysis
|
| 143 |
+
|
| 144 |
+
## Notes
|
| 145 |
+
|
| 146 |
+
L1 five-level snapshots and L2 tick-by-tick event streams use different market data representations. L1 data
|
| 147 |
+
consists of already published market snapshots, while L2 data consists of individual order and transaction
|
| 148 |
+
events. An order book reconstructed from L2 data may not match the L1 snapshot exactly at every timestamp due to
|
| 149 |
+
snapshot publication timing, event ordering, call auction logic, cancellation handling, and vendor-specific data
|
| 150 |
+
conventions.
|
| 151 |
+
|
| 152 |
+
</details>
|