沪深逐笔委托队列查询
前置步骤
分配数据库服务器
查询模板
以下是沪深委托队列查询的请求模板:
http://<数据库服务器>/sql?mode=order_book&code=<股票代码>&offset=<offset>&token=<token>
查询参数说明
参数名 | 类型 | 说明 |
---|---|---|
mode | string | 查询类别,委托队列查询使用order_book |
code | string | 需要查询的证券代码 |
offset | string | 支持按队列偏移量查询,未指定则查询最新数据 |
token | string | 用户账户的认证token,用于验证请求权限 |
查询示例
- 查询最新委托列表
http://<数据库服务器>/sql?mode=order_book&code=000001&token=<token>
- 根据偏移量查询
http://<数据库服务器>/sql?mode=order_book&code=000001&offset=<offset>&token=<token>
返回参数说明
字段名 | 类型 | 说明 |
---|---|---|
offset | int | 偏移标记,用于继续查询前面的数据 |
price | float | 委托价格 |
volume | int | 档位挂单总量(股) |
type | int | 委托类型,B 表示买,S 表示卖 |
time | string | 委托时间 |
返回数据示例
{
"code": 0,
"cnt": 1,
"msg": "",
"data": {
"code": "000001",
"slice": 192,
"fields": ["offset", "price", "volume", "type", "time"],
"list": [
[
90593065,
16.97,
800,
"B",
"09:32:02"
],
...
[
90592690,
16.98,
7400,
"S",
"09:31:58"
]
]
}
}
参考地址:沪深Level2逐笔委托队列
在线测试
您可以通过以下链接进行在线测试:逐笔委托队列查询。
接口返回:
{
"code": 0,
"cnt": 43,
"msg": "",
"data": {
"code": "000553",
"slice": 192,
"fields": [
"offset",
"price",
"volume",
"type",
"time"
],
"list": [
[
20085635,
7.19,
100,
"S",
"09:58:10"
],
[
20085552,
7.19,
1000,
"S",
"09:58:10"
],
[
20066698,
7.19,
1000,
"B",
"09:58:07"
],
[
20052932,
7.16,
200,
"S",
"09:58:06"
],
[
20018359,
7.17,
900,
"B",
"09:58:02"
],
[
20008414,
7.17,
800,
"B",
"09:58:01"
],
[
19993661,
7.19,
2100,
"S",
"09:57:59"
],
[
19982569,
7.19,
200,
"S",
"09:57:57"
],
[
19953167,
7.06,
5100,
"B",
"09:57:53"
],
[
19950051,
7.19,
500,
"S",
"09:57:53"
],
[
19941533,
6.66,
1000,
"B",
"09:57:52"
],
[
19931896,
7.19,
1000,
"S",
"09:57:50"
],
[
19921481,
7.18,
1200,
"B",
"09:57:49"
],
[
19912073,
7.19,
500,
"S",
"09:57:48"
],
[
19901164,
7.19,
6600,
"S",
"09:57:46"
],
[
19874560,
7.17,
800,
"B",
"09:57:42"
],
[
19844281,
7.19,
100,
"S",
"09:57:38"
],
[
19828677,
7.19,
1300,
"B",
"09:57:36"
],
[
19823156,
7.19,
100,
"S",
"09:57:35"
],
[
19822756,
7.19,
100,
"S",
"09:57:35"
],
[
19822745,
7.19,
100,
"S",
"09:57:35"
],
[
19822742,
7.19,
100,
"S",
"09:57:35"
],
[
19822739,
7.19,
100,
"S",
"09:57:35"
],
[
19822729,
7.19,
100,
"S",
"09:57:35"
],
[
19822727,
7.19,
100,
"S",
"09:57:35"
],
[
19822726,
7.19,
100,
"S",
"09:57:35"
],
[
19822669,
7.19,
500,
"B",
"09:57:35"
],
[
19808489,
7.19,
100,
"B",
"09:57:34"
],
[
19800900,
7.19,
200,
"S",
"09:57:33"
],
[
19800898,
7.19,
200,
"S",
"09:57:33"
],
[
19800800,
7.19,
200,
"S",
"09:57:33"
],
[
19768640,
7.19,
100,
"B",
"09:57:28"
],
[
19766089,
7.19,
200,
"B",
"09:57:28"
],
[
19750186,
7.19,
300,
"B",
"09:57:26"
],
[
19714644,
7.19,
100,
"B",
"09:57:22"
],
[
19705088,
7.19,
200,
"B",
"09:57:20"
],
[
19685915,
7.19,
1500,
"S",
"09:57:18"
],
[
19635034,
7.19,
2000,
"S",
"09:57:14"
],
[
19624409,
7.11,
100,
"S",
"09:57:13"
],
[
19612485,
7.19,
300,
"S",
"09:57:12"
],
[
19572673,
7.19,
1500,
"B",
"09:57:09"
],
[
19569705,
7.19,
1500,
"B",
"09:57:09"
],
[
19552258,
7.19,
1400,
"S",
"09:57:07"
],
[
19520496,
7.19,
100,
"S",
"09:57:03"
],
[
19503489,
7.19,
400,
"B",
"09:57:01"
],
[
19484252,
7.19,
300,
"B",
"09:56:59"
],
[
19483528,
7.19,
900,
"B",
"09:56:59"
],
[
19479712,
7.19,
700,
"S",
"09:56:59"
],
[
19479655,
7.19,
1000,
"S",
"09:56:58"
],
[
19478965,
7.19,
100,
"S",
"09:56:58"
],
[
19478804,
7.19,
4700,
"S",
"09:56:58"
],
[
19474519,
7.19,
400,
"B",
"09:56:58"
],
[
19414312,
6.9,
500,
"B",
"09:56:50"
],
[
19411463,
7.19,
5000,
"S",
"09:56:50"
],
[
19410505,
7.19,
300,
"B",
"09:56:50"
],
[
19391046,
7.11,
6300,
"B",
"09:56:47"
],
[
19374850,
6.99,
2000,
"B",
"09:56:45"
],
[
19364187,
7.19,
2600,
"B",
"09:56:44"
],
[
19356958,
7.19,
1200,
"B",
"09:56:43"
],
[
19331397,
7.19,
6200,
"B",
"09:56:39"
],
[
19326963,
7.17,
800,
"B",
"09:56:39"
],
[
19326775,
7.19,
200,
"B",
"09:56:39"
],
[
19283106,
7.19,
1900,
"B",
"09:56:33"
],
[
19279170,
7.19,
7000,
"B",
"09:56:32"
],
[
19279107,
7.19,
2000,
"S",
"09:56:32"
],
[
19274169,
7.19,
700,
"S",
"09:56:31"
],
[
19273267,
7.19,
300,
"B",
"09:56:31"
],
[
19265745,
7.19,
10000,
"B",
"09:56:30"
],
[
19264099,
7.19,
1900,
"B",
"09:56:30"
],
[
19251826,
7.19,
1200,
"B",
"09:56:28"
],
[
19238458,
6.5,
5000,
"B",
"09:56:26"
],
[
19235089,
7.19,
1000,
"B",
"09:56:26"
],
[
19227706,
7.19,
1000,
"S",
"09:56:25"
],
[
19217903,
7.1,
6800,
"B",
"09:56:24"
],
[
19207410,
7.07,
200,
"B",
"09:56:22"
],
[
19204775,
6.91,
400,
"B",
"09:56:22"
],
[
19189884,
7.19,
600,
"S",
"09:56:20"
],
[
19160879,
7.19,
500,
"B",
"09:56:16"
],
[
19160679,
7.19,
200,
"S",
"09:56:16"
],
[
19153369,
7.19,
200,
"S",
"09:56:15"
],
[
19143783,
7.1,
500,
"B",
"09:56:14"
],
[
19132894,
7.11,
100,
"S",
"09:56:13"
],
[
19124699,
7.19,
1000,
"S",
"09:56:12"
],
[
19121222,
7.11,
100,
"S",
"09:56:11"
],
[
19115822,
7.19,
10000,
"S",
"09:56:11"
],
[
19112015,
7.19,
1600,
"B",
"09:56:10"
],
[
19089428,
7.19,
10700,
"B",
"09:56:08"
],
[
19073712,
7.19,
100,
"B",
"09:56:06"
],
[
19062445,
7.19,
2700,
"B",
"09:56:05"
],
[
19058502,
7.19,
10500,
"S",
"09:56:04"
],
[
19053441,
7.19,
100,
"B",
"09:56:04"
],
[
19042808,
7.19,
2100,
"S",
"09:56:03"
],
[
19038126,
7.19,
1300,
"S",
"09:56:02"
],
[
19023964,
7.19,
20000,
"S",
"09:56:01"
],
[
19004649,
7.19,
1500,
"B",
"09:55:59"
],
[
18984839,
7.19,
1400,
"B",
"09:55:56"
],
[
18980840,
7.19,
3800,
"S",
"09:55:56"
],
[
18972266,
7.19,
200,
"B",
"09:55:55"
],
[
18947113,
7.19,
500,
"S",
"09:55:53"
],
[
18931670,
7.18,
2100,
"B",
"09:55:51"
],
[
18924493,
7.19,
1300,
"B",
"09:55:51"
],
[
18908982,
7.17,
800,
"B",
"09:55:50"
],
[
18896417,
7.19,
6300,
"B",
"09:55:49"
],
[
18867665,
7.19,
5000,
"S",
"09:55:45"
],
[
18861164,
7.19,
300,
"B",
"09:55:45"
],
[
18854013,
7.19,
900,
"B",
"09:55:44"
],
[
18850687,
7.19,
100,
"S",
"09:55:43"
],
[
18850531,
7.19,
500,
"B",
"09:55:43"
],
[
18845258,
6.8,
1000,
"B",
"09:55:43"
],
[
18833900,
7.19,
1000,
"B",
"09:55:41"
],
[
18826737,
7.19,
1700,
"B",
"09:55:40"
],
[
18816340,
7.19,
1000,
"S",
"09:55:39"
],
[
18812053,
7.19,
1500,
"S",
"09:55:39"
],
[
18811741,
7.19,
500,
"B",
"09:55:39"
],
[
18809413,
7.19,
15100,
"S",
"09:55:38"
],
[
18792068,
7.19,
500,
"S",
"09:55:37"
],
[
18765733,
7.19,
4700,
"S",
"09:55:34"
],
[
18755441,
7.19,
1400,
"B",
"09:55:32"
],
[
18728410,
7.19,
1000,
"S",
"09:55:29"
],
[
18723422,
7.19,
6100,
"S",
"09:55:29"
],
[
18713668,
7.19,
90600,
"B",
"09:55:28"
],
[
18713666,
7.19,
1800,
"S",
"09:55:28"
],
[
18713640,
7.19,
116900,
"B",
"09:55:28"
],
[
18713467,
7.19,
20000,
"B",
"09:55:28"
],
[
18711613,
7.16,
200,
"B",
"09:55:27"
],
[
18702800,
7.19,
2100,
"B",
"09:55:26"
],
[
18691547,
7.19,
10100,
"B",
"09:55:25"
],
[
18685750,
7.19,
1400,
"B",
"09:55:24"
],
[
18673109,
7.19,
100,
"B",
"09:55:23"
],
[
18665529,
7.19,
500,
"S",
"09:55:22"
],
[
18663038,
7.19,
1300,
"B",
"09:55:21"
],
[
18649765,
7.19,
100,
"S",
"09:55:20"
],
[
18649565,
7.19,
500,
"B",
"09:55:20"
],
[
18649210,
7.05,
1000,
"B",
"09:55:20"
],
[
18647137,
7.19,
1200,
"B",
"09:55:20"
],
[
18626586,
7.19,
400,
"S",
"09:55:17"
],
[
18625125,
7.19,
700,
"B",
"09:55:17"
],
[
18618170,
7.19,
500,
"S",
"09:55:16"
],
[
18606212,
7.19,
800,
"B",
"09:55:15"
],
[
18603742,
7.19,
1300,
"B",
"09:55:15"
],
[
18599148,
7.1,
1100,
"B",
"09:55:14"
],
[
18586500,
7.19,
1100,
"S",
"09:55:13"
],
[
18579988,
7.19,
300,
"S",
"09:55:13"
],
[
18571345,
7.19,
2200,
"S",
"09:55:12"
],
[
18571279,
7.19,
1900,
"S",
"09:55:12"
],
[
18571278,
7.19,
500,
"S",
"09:55:12"
],
[
18571176,
7.19,
200,
"S",
"09:55:12"
],
[
18571175,
7.19,
6700,
"S",
"09:55:12"
],
[
18571168,
7.19,
300,
"S",
"09:55:12"
],
[
18571147,
7.19,
300,
"S",
"09:55:12"
],
[
18571138,
7.19,
300,
"S",
"09:55:12"
],
[
18571137,
7.19,
2400,
"S",
"09:55:12"
],
[
18571132,
7.19,
100,
"S",
"09:55:12"
],
[
18571129,
7.19,
1000,
"S",
"09:55:12"
],
[
18571125,
7.19,
400,
"S",
"09:55:12"
],
[
18571122,
7.19,
200,
"S",
"09:55:12"
],
[
18571120,
7.19,
200,
"S",
"09:55:12"
],
[
18571109,
7.19,
1900,
"S",
"09:55:12"
],
[
18571100,
7.19,
2500,
"S",
"09:55:12"
],
[
18571099,
7.19,
2200,
"S",
"09:55:12"
],
[
18571098,
7.19,
1600,
"S",
"09:55:12"
],
[
18559843,
7.19,
3000,
"B",
"09:55:11"
],
[
18557966,
7.19,
200,
"S",
"09:55:11"
],
[
18557670,
7.19,
300,
"S",
"09:55:10"
],
[
18557598,
7.19,
3300,
"S",
"09:55:10"
],
[
18557555,
7.19,
200,
"S",
"09:55:10"
],
[
18557492,
7.19,
1000,
"S",
"09:55:10"
],
[
18557488,
7.19,
400,
"S",
"09:55:10"
],
[
18552201,
7.19,
300,
"S",
"09:55:10"
],
[
18552194,
7.19,
1800,
"S",
"09:55:10"
],
[
18550586,
7.19,
300,
"B",
"09:55:10"
],
[
18544571,
7.19,
200,
"S",
"09:55:09"
],
[
18526244,
7.19,
2400,
"B",
"09:55:08"
],
[
18513751,
7.19,
1000,
"B",
"09:55:07"
],
[
18489842,
7.19,
1000,
"B",
"09:55:05"
],
[
18470664,
7,
300,
"B",
"09:55:03"
],
[
18467066,
7.1,
500,
"B",
"09:55:02"
],
[
18466584,
7.19,
1500,
"S",
"09:55:02"
],
[
18449553,
7.19,
11600,
"B",
"09:55:00"
],
[
18442354,
7.19,
700,
"B",
"09:55:00"
],
[
18441031,
7.19,
300,
"B",
"09:55:00"
],
[
18432276,
7.07,
100,
"B",
"09:54:58"
],
[
18427239,
7.19,
3000,
"S",
"09:54:58"
],
[
18416515,
7.19,
600,
"B",
"09:54:56"
],
[
18411657,
7.19,
1400,
"S",
"09:54:56"
],
[
18410744,
7.19,
1600,
"B",
"09:54:55"
],
[
18410715,
7.19,
3000,
"S",
"09:54:55"
],
[
18373245,
7.19,
76400,
"B",
"09:54:51"
],
[
18373224,
7.19,
57100,
"B",
"09:54:51"
],
[
18373219,
7.19,
85300,
"B",
"09:54:51"
],
[
18373217,
7.19,
84900,
"B",
"09:54:51"
],
[
18373205,
7.19,
54300,
"B",
"09:54:51"
]
]
}
}