分享l2行情接口截获行情数据的运行过程

l2行情接口截获行情数据的运行过程:

用法: ContextInfo.get_market_data(fields, stock_code = [], start_time = '', end_time = '', skip_paused = True, period = 'follow', dividend_type = 'follow', count = -1)

释义: 获取行情数据

参数:

fields:字段列表: 'open':开 'high':高 'low':低 'close':收 'volume':成交量 'amount':成交额 'settle':结算价 'quoter':分笔数据(包括历史)

'quoter'分笔数据结构:dict { lastPrice:最新价 amount:成交额 volume:成交量 pvolumn:前成交量 openInt:若是股票则openInt含义为股票状态(字段说明),非股票则是持仓量 stockStatus:股票状态 lastSettlementPrice:最新结算价 open:开盘价 high:最高价 low:最低价 settlementPrice:结算价 lastClose:昨收价 askPrice:列表,卖价五档 bidPrice:列表,买价五档 askVol:列表,卖量五档 bidVol;列表,买量五档 }

StockQuoteRecord(十档行情快照)

字段名

类型

备注

stock_exchange

uint32

证券市场,见数据字典

stock_code

string

证券代码

created_at

int64

快照日期时间戳(毫秒)

status

uint32

状态:0-开盘前,1-开盘集合竞价,2-集合竞价至连续竞价,3-连续竞价, 4-中午休市,5-收盘集合竞价,6-闭市

prev_close_price

uint32

前收盘价

open_price

uint32

开盘价

latest_price

uint32

最新价

high_price

uint32

最高价

low_price

uint32

最低价

limit_up_price

uint32

涨停价

limit_down_price

uint32

跌停价

order_quantity

uint32

成交笔数

volume

uint64

成交数量

amount

uint64

成交金额

bid_volume

uint64

委托买入数量

bid_price

uint32

委托买入加权平均价

ask_volume

uint64

委托卖出数量

ask_price

uint32

委托卖出加权平均价

bid_price_detail

repeated uint32

委托买入价格明细(十档)

bid_volume_detail

repeated uint32

委托买入数量明细(十档)

ask_price_detail

repeated uint32

委托卖出价格明细(十档)

ask_volume_detail

repeated uint32

委托卖出数量明细(十档)

返回示例:

以上就是分享l2行情接口截获行情数据的部分运行过程,就分享到这了,L2行情接口是一个不错的选择,还可提高交易的效率,在交易的过程中,也需要考虑各方面的因素,有兴趣的联系下方qq名片了解~

猜你喜欢

转载自blog.csdn.net/Q_2037696191/article/details/128581810
今日推荐