L2快照 (cn_stock_level2_snapshot)

数据描述: 记录了每三秒一次的截面快照行情,包含买卖10档盘口数据。

文档
数据简介

## 数据简介 L2快照行情数据数据是金融市场上最精细、最底层的交易数据之一,它忠实记录了每三秒一次的截面快照行情,包含买卖10档的盘口数据。 * 起始时间:2018-01-01 * 更新频率:每个交易日 ## 表主键如下: | 关键字 | 释意 | | --- | --- | | date | 日期 | | instrument | 股票代码 | ## 注意事项 * L2快照行情包含买卖10档行情数据。 * L2快照行情时间间隔为3秒。 * L2数据底层是按照股票进行分区存储。

用例
* 获取单只股票指定时间周期的逐笔委托数据 ``` import dai df = dai.query(""" SELECT * FROM cn_stock_level2_snapshot """, filters={ "date": ["2025-09-02 10:00:00", "2025-09-02 10:05:00"], "instrument": ["000002.SZ"] }).df() df.head() ``` * 计算卖5档总量 ``` import dai df = dai.query(""" SELECT date, instrument, (ask_volume1+ask_volume2+ask_volume3+ask_volume4+ask_volume5) as total_volume FROM cn_stock_level2_snapshot """, filters={ "date": ["2025-09-02 10:00:00", "2025-09-02 10:05:00"], "instrument": ["000002.SZ"] }).df() df.head() ```
表结构
字段 字段类型 字段描述
pre_close float 前收盘
open float 开盘价
ask_price2 float 2档委卖价
ask_price3 float 3档委卖价
ask_price4 float 4档委卖价
ask_price5 float 5档委卖价
ask_price6 float 6档委卖价
ask_price7 float 7档委卖价
ask_price8 float 8档委卖价
ask_price9 float 9档委卖价
bid_price1 float 1档委买价
bid_price2 float 2档委买价
bid_price3 float 3档委买价
bid_price4 float 4档委买价
bid_price5 float 5档委买价
bid_price6 float 6档委买价
date timestamp[ns] 时间
time int32 时间(HHMMSSmmm)
bid_price9 float 9档委买价
instrument string 标的
num_trades int32 成交笔数
ask_price10 float 10档委卖价
ask_volume1 int64 1档委卖量
ask_volume2 int32 2档委卖量
ask_volume3 int32 3档委卖量
ask_volume4 int32 4档委卖量
ask_volume5 int32 5档委卖量
ask_volume6 int32 6档委卖量
ask_volume7 int32 7档委卖量
ask_volume8 int32 8档委卖量
ask_volume9 int32 9档委卖量
bid_price10 float 10档委买价
bid_volume1 int64 1档委买量
bid_volume2 int32 2档委买量
bid_volume3 int32 3档委买量
bid_volume4 int32 4档委买量
bid_volume5 int32 5档委买量
trading_day int32 交易日期
amount double 当日成交额(元)
price float 成交价
total_bid_volume int64 委买总量
total_ask_volume int64 委卖总量
bid_num_orders10 int32 卖10档委托笔数
ask_num_orders10 int32 买10档委托笔数
bid_num_orders9 int32 卖9档委托笔数
bid_num_orders8 int32 卖8档委托笔数
bid_num_orders7 int32 卖7档委托笔数
bid_num_orders6 int32 卖6档委托笔数
bid_num_orders5 int32 卖5档委托笔数
bid_num_orders4 int32 卖4档委托笔数
bid_num_orders3 int32 卖3档委托笔数
bid_price7 float 7档委买价
bid_num_orders1 int32 卖1档委托笔数
bid_price8 float 8档委买价
ask_price1 float 1档委卖价
bid_volume6 int32 6档委买量
high float 最高价
low float 最低价
bid_volume7 int32 7档委买量
bid_volume8 int32 8档委买量
bid_volume9 int32 9档委买量
ask_volume10 int32 10档委卖量
bid_volume10 int32 10档委买量
__PARTITION__ int64 -
ask_avg_price float 加权平均委卖价
bid_avg_price float 加权平均委买价
ask_num_orders1 int32 买1档委托笔数
ask_num_orders2 int32 买2档委托笔数
ask_num_orders3 int32 买3档委托笔数
ask_num_orders4 int32 买4档委托笔数
ask_num_orders5 int32 买5档委托笔数
ask_num_orders6 int32 买6档委托笔数
ask_num_orders7 int32 买7档委托笔数
ask_num_orders8 int32 买8档委托笔数
ask_num_orders9 int32 买9档委托笔数
volume int64 当日累计成交量
bid_num_orders2 int32 卖2档委托笔数

表名cn_stock_level2_snapshot

起始时间:

最近更新时间: