EasyFut

获取实时行情(隐性订阅)

GET /quote/{quote_symbol}

传参:

字段名类型是否必传字段说明
quote_symbolstr合约标识,不传默认获取所有隐性订阅过的合约,支持多个,多个用英文逗号分割

响应参数(参考TqSdk官方文档: http://doc.shinnytech.com/tqsdk/latest/reference/tqsdk.objs.html#tqsdk.objs.Quote)

字段名类型字段说明
datetimestr行情从交易所发出的时间(北京时间), 格式为 "2017-07-26 23:04:21.000001"
ask_price1float卖一价
ask_volume1int卖一量
bid_price1float买一价
bid_volume1int买一量
ask_price2float卖二价
ask_volume2int卖二量
bid_price2float买二价
bid_volume2int买二量
ask_price3float卖三价
ask_volume3int卖三量
bid_price3float买三价
bid_volume3int买三量
ask_price4float卖四价
ask_volume4int卖四量
bid_price4float买四价
bid_volume4int买四量
ask_price5float卖五价
ask_volume5int卖五量
bid_price5float买五价
bid_volume5int买五量
last_pricefloat最新价
highestfloat当日最高价
lowestfloat当日最低价
openfloat开盘价
closefloat收盘价
averagefloat当日均价
volumeint成交量
amountfloat成交额
open_interestfloat持仓量
settlementfloat结算价
upper_limitfloat涨停价
lower_limitfloat跌停价
pre_open_interestint昨持仓量
pre_settlementfloat昨结算价
pre_closefloat昨收盘价
price_tickfloat合约价格变动单位
price_decsint合约价格小数位数
volume_multipleint合约乘数
max_limit_order_volumeint最大限价单手数
max_market_order_volumeint最大市价单手数
min_limit_order_volumeint最小限价单手数
min_market_order_volumeint最小市价单手数
underlying_symbolstr标的合约
strike_pricefloat行权价
ins_classstr合约类型
instrument_idstr交易所内的合约代码
instrument_namestr合约中文名
exchange_idstr交易所代码
expiredbool合约是否已下市
trading_timeobject交易时间段
expire_datetimefloat到期具体日,以秒为单位的 timestamp 值
delivery_yearint期货交割日年份,只对期货品种有效。期权推荐使用最后行权日年份
delivery_monthint期货交割日月份,只对期货品种有效。期权推荐使用最后行权日月份
last_exercise_datetimefloat期权最后行权日,以秒为单位的 timestamp 值
exercise_yearint期权最后行权日年份,只对期权品种有效。
exercise_monthint期权最后行权日月份,只对期权品种有效。
option_classstr期权方向
exercise_typestr期权行权方式,美式:'A',欧式:'E'
product_idstr品种代码
iopvfloatETF实时单位基金净值
public_float_share_quantityint日流通股数,只对证券产品有效。
stock_dividend_ratioarray除权表 ["20190601,0.15","20200107,0.2"…]
cash_dividend_ratioarray除息表 ["20190601,0.15","20200107,0.2"…]
expire_rest_daysint距离到期日的剩余天数(自然日天数),正数表示距离到期日的剩余天数,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": "操作成功!"
}