# 获取期权快照

get_option_quote(combo_leg_list)

  • 介绍

    根据组合腿列表获取期权快照行情,适用于多腿策略的批量报价查询。

  • 参数

    参数 类型 说明
    combo_leg_list list 组合腿列表
  • 返回

    参数 类型 说明
    ret RET_CODE 接口调用结果
    data pd.DataFrame 当 ret == RET_OK,返回期权快照数据
    str 当 ret != RET_OK,返回错误描述
    • DataFrame 字段说明:

      字段 类型 说明
      price float 组合价格
      change_val float 涨跌额
      change_rate float 涨跌幅
      volume str 成交量
      turnover str 成交额
      high_price str 最高价
      low_price str 最低价
      mid_price str 中间价
      open_price str 开盘价
      last_close_price float 昨收价
      open_interest str 持仓量
      premium str 溢价
      implied_volatility str 隐含波动率
      delta float Delta
      gamma float Gamma
      vega float Vega
      theta float Theta
      rho float Rho
      option_type str 期权类型
      expire_time str 到期日
      strike_price str 行权价
      contract_size float 合约规模
      contract_multiplier float 合约乘数
      exercise_type str 行权方式
      days_to_expiry int 距到期天数
      net_open_interest str 净未平仓合约数
      contract_value str 合约价值
      equal_underlying str 等价标的
      index_option_type str 指数期权类型
      intrinsic_value float 内在价值
      time_value float 时间价值
      breakeven_point list 盈亏平衡点
      dist_to_breakeven list 距盈亏平衡点距离
      prob_of_profit float 盈利概率
      seller_roi str 卖方收益率
      mark_price float 标记价格
      leverage_ratio str 杠杆比率
      effective_gearing str 有效杠杆
  • Example

from futu import *

quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)
ret, data = quote_ctx.get_option_strategy(code='HK.00700', option_strategy=OptionStrategyType.STRADDLE)
if ret == RET_OK:
    index=0
    print(data['legs'][index])
    ret2,data2 = quote_ctx.get_option_quote(data['legs'][index])
    if ret2 == RET_OK:
        print(data2)
    else:
        print("get_analysis,error:",data2)
else:
    print('error:', data)

quote_ctx.close() # 结束后记得关闭当条连接,防止连接条数用尽
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  • Output
[OptionStrategyLeg(code=HK.TCH260522P330000, action=BUY, quantity=1.0), OptionStrategyLeg(code=HK.TCH260522C330000, action=BUY, quantity=1.0)]
    price  change_val  change_rate volume turnover high_price low_price mid_price open_price  last_close_price open_interest premium implied_volatility     delta     gamma      vega     theta       rho option_type expire_time strike_price  contract_size  contract_multiplier exercise_type  days_to_expiry net_open_interest contract_value equal_underlying index_option_type  intrinsic_value  time_value   breakeven_point             dist_to_breakeven  prob_of_profit seller_roi  mark_price leverage_ratio effective_gearing
0  131.65         0.0          0.0    N/A      N/A        N/A       N/A       N/A        N/A            131.65           N/A     N/A                N/A  0.974369  0.000797  0.019825 -0.785757  0.016246         N/A  2026-05-22          N/A          100.0                100.0           N/A               2               N/A            N/A              N/A               N/A            125.2        6.45  [199.56, 460.44]  [255.64, -5.240000000000009]        0.315418        N/A       130.4            N/A               N/A
1
2
3

接口限制

  • 每 30 秒内最多请求 120 次。