GET /quote/{quote_symbol}
传参:
| 字段名 | 类型 | 是否必传 | 字段说明 |
|---|---|---|---|
| quote_symbol | str | 否 | 合约标识,不传默认获取所有隐性订阅过的合约,支持多个,多个用英文逗号分割 |
响应参数(参考TqSdk官方文档: http://doc.shinnytech.com/tqsdk/latest/reference/tqsdk.objs.html#tqsdk.objs.Quote):
| 字段名 | 类型 | 字段说明 |
|---|---|---|
| datetime | str | 行情从交易所发出的时间(北京时间), 格式为 "2017-07-26 23:04:21.000001" |
| ask_price1 | float | 卖一价 |
| ask_volume1 | int | 卖一量 |
| bid_price1 | float | 买一价 |
| bid_volume1 | int | 买一量 |
| ask_price2 | float | 卖二价 |
| ask_volume2 | int | 卖二量 |
| bid_price2 | float | 买二价 |
| bid_volume2 | int | 买二量 |
| ask_price3 | float | 卖三价 |
| ask_volume3 | int | 卖三量 |
| bid_price3 | float | 买三价 |
| bid_volume3 | int | 买三量 |
| ask_price4 | float | 卖四价 |
| ask_volume4 | int | 卖四量 |
| bid_price4 | float | 买四价 |
| bid_volume4 | int | 买四量 |
| ask_price5 | float | 卖五价 |
| ask_volume5 | int | 卖五量 |
| bid_price5 | float | 买五价 |
| bid_volume5 | int | 买五量 |
| last_price | float | 最新价 |
| highest | float | 当日最高价 |
| lowest | float | 当日最低价 |
| open | float | 开盘价 |
| close | float | 收盘价 |
| average | float | 当日均价 |
| volume | int | 成交量 |
| amount | float | 成交额 |
| open_interest | float | 持仓量 |
| settlement | float | 结算价 |
| upper_limit | float | 涨停价 |
| lower_limit | float | 跌停价 |
| pre_open_interest | int | 昨持仓量 |
| pre_settlement | float | 昨结算价 |
| pre_close | float | 昨收盘价 |
| price_tick | float | 合约价格变动单位 |
| price_decs | int | 合约价格小数位数 |
| volume_multiple | int | 合约乘数 |
| max_limit_order_volume | int | 最大限价单手数 |
| max_market_order_volume | int | 最大市价单手数 |
| min_limit_order_volume | int | 最小限价单手数 |
| min_market_order_volume | int | 最小市价单手数 |
| underlying_symbol | str | 标的合约 |
| strike_price | float | 行权价 |
| ins_class | str | 合约类型 |
| instrument_id | str | 交易所内的合约代码 |
| instrument_name | str | 合约中文名 |
| exchange_id | str | 交易所代码 |
| expired | bool | 合约是否已下市 |
| trading_time | object | 交易时间段 |
| expire_datetime | float | 到期具体日,以秒为单位的 timestamp 值 |
| delivery_year | int | 期货交割日年份,只对期货品种有效。期权推荐使用最后行权日年份 |
| delivery_month | int | 期货交割日月份,只对期货品种有效。期权推荐使用最后行权日月份 |
| last_exercise_datetime | float | 期权最后行权日,以秒为单位的 timestamp 值 |
| exercise_year | int | 期权最后行权日年份,只对期权品种有效。 |
| exercise_month | int | 期权最后行权日月份,只对期权品种有效。 |
| option_class | str | 期权方向 |
| exercise_type | str | 期权行权方式,美式:'A',欧式:'E' |
| product_id | str | 品种代码 |
| iopv | float | ETF实时单位基金净值 |
| public_float_share_quantity | int | 日流通股数,只对证券产品有效。 |
| stock_dividend_ratio | array | 除权表 ["20190601,0.15","20200107,0.2"…] |
| cash_dividend_ratio | array | 除息表 ["20190601,0.15","20200107,0.2"…] |
| expire_rest_days | int | 距离到期日的剩余天数(自然日天数),正数表示距离到期日的剩余天数,0表示到期日当天,负数表示距离到期日已经过去的天数 |
请求示例:
curl http://127.0.0.1:8888/quote/SHFE.rb2210
响应示例:
{
"code": 10000,
"data": {
"SHFE.rb2210": {
"datetime": "2022-09-22 14:59:59.500002",
"ask_price1": 3945.0,
"ask_volume1": 10,
"bid_price1": 3944.0,
"bid_volume1": 31,
"ask_price2": 3948.0,
"ask_volume2": 17,
"bid_price2": 3943.0,
"bid_volume2": 40,
"ask_price3": 3949.0,
"ask_volume3": 118,
"bid_price3": 3942.0,
"bid_volume3": 10,
"ask_price4": 3950.0,
"ask_volume4": 809,
"bid_price4": 3941.0,
"bid_volume4": 1,
"ask_price5": 3951.0,
"ask_volume5": 15,
"bid_price5": 3940.0,
"bid_volume5": 1,
"last_price": 3945.0,
"highest": 3949.0,
"lowest": 3860.0,
"open": 3860.0,
"close": 3945.0,
"average": 3908.27,
"volume": 107338,
"amount": 4195054430.0,
"open_interest": 196349,
"settlement": 3908.0,
"upper_limit": 4280.0,
"lower_limit": 3431.0,
"pre_open_interest": 223775,
"pre_settlement": 3856.0,
"pre_close": 3864.0,
"price_tick": 1.0,
"price_decs": 0,
"volume_multiple": 10.0,
"max_limit_order_volume": 500,
"max_market_order_volume": 0,
"min_limit_order_volume": 0,
"min_market_order_volume": 0,
"underlying_symbol": "",
"strike_price": 0.0,
"ins_class": "FUTURE",
"instrument_id": "SHFE.rb2210",
"instrument_name": "螺纹2210",
"exchange_id": "SHFE",
"expired": false,
"trading_time": {
"day": [
["09:00:00", "10:15:00"],
["10:30:00", "11:30:00"],
["13:30:00", "15:00:00"]
],
"night": [
["21:00:00", "23:00:00"]
]
},
"expire_datetime": 1665990000.0,
"delivery_year": 2022,
"delivery_month": 10,
"last_exercise_datetime": 0.0,
"exercise_year": 0,
"exercise_month": 0,
"option_class": "",
"exercise_type": "",
"product_id": "rb",
"iopv": 0.0,
"public_float_share_quantity": 0,
"stock_dividend_ratio": [],
"cash_dividend_ratio": [],
"expire_rest_days": 25,
"margin": 3084.8,
"commission": 3.86
}
},
"msg": "操作成功!"
}