跳到正文
QMT

ContextInfo.get_full_tick

获取最新分笔数据

提示

不能用于回测 只能取最新的分笔,不能取历史分笔

原型

ContextInfo.get_full_tick(stock_code=[])

释义

获取最新分笔数据

参数

名称 类型 描述
stock_code list[str] 合约代码列表,如['600000.SH','600036.SH'],不指定时为当前主图合约。

返回值 根据stock_code返回一个dict,该字典的key值是股票代码,其值仍然是一个dict,在该dict中存放股票代码对应的最新的数据。该字典数据key值参考tick字段在新窗口打开

示例

示例

# coding:gbk
import pandas as pd
import numpy as np

def init(C):
	C.stock_list = ["000001.SZ","600519.SH", "510050.SH"]
	
def handlebar(C):
	tick = C.get_full_tick(C.stock_list)
	print(tick["510050.SH"])

返回值

{'timetag': '20231106 15:00:04', 'lastPrice': 2.533, 'open': 2.528, 'high': 2.5380000000000003, 'low': 2.521, 'lastClose': 2.513, 'amount': 1442588037.0, 'volume': 5701929, 'pvolume': 5701929, 'stockStatus': 5, 'openInt': 15, 'settlementPrice': 0.0, 'lastSettlementPrice': 0.0, 'askPrice': [2.533, 2.5340000000000003, 2.535, 2.536, 2.537], 'bidPrice': [2.532, 2.531, 2.5300000000000002, 2.529, 2.528], 'askVol': [2615, 19753, 24334, 16932, 35835], 'bidVol': [5662, 24808, 11876, 11472, 14966]}

官方来源

QMT 官方文档:获取全推数据。网页核对日期:2026-10-11。

本页目录