# Option Market Statistics

get_option_market_statistic(option_market, data_type, begin_time=None, end_time=None, page_req_key=None)

  • Description

    Get option market statistics (volume/open interest), returns call, put, and total values by trading day granularity, with pagination support.

  • Parameters

    Parameter Type Description
    option_market OptionMarket Option market type
    data_type OptionStatisticDataType Data type
    begin_time str Start date, format 'YYYY-MM-DD'
    end_time str End date, format 'YYYY-MM-DD'
    page_req_key bytes Pagination request key
  • Returns

    Parameter Type Description
    ret RET_CODE Interface call result
    data pandas.DataFrame When ret == RET_OK, returns statistics data
    str When ret != RET_OK, returns error description
    page_req_key bytes Next page key, None indicates no more data
    • Returned DataFrame fields:

      Field Type Description
      time str Trading day time string
      timestamp float Trading day timestamp (Unix seconds)
      call_value int Call option total value
      put_value int Put option total value
      total_value int Total value (call_value + put_value)
      ratio float Put/Call ratio
  • Example

from futu import *

quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)

ret, data, page_req_key = quote_ctx.get_option_market_statistic(
    OptionMarket.US_SECURITY,
    OptionStatisticDataType.VOLUME,
    begin_time='2026-06-01',
    end_time='2026-06-15'
)
if ret == RET_OK:
    print(data)
else:
    print('error:', data)

quote_ctx.close()
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  • Output
         time     timestamp  call_value  put_value  total_value     ratio
0  2026-06-12  1.781237e+09    45658870   28723978     74382848  0.629100
1  2026-06-11  1.781150e+09    38303062   30520043     68823105  0.796804
2  2026-06-10  1.781064e+09    35371830   30180004     65551834  0.853221
3  2026-06-09  1.780978e+09    42880655   36646152     79526807  0.854608
4  2026-06-08  1.780891e+09    35442266   25811533     61253799  0.728270
5  2026-06-05  1.780632e+09    52362998   44023321     96386319  0.840733
6  2026-06-04  1.780546e+09    38082169   24572137     62654306  0.645240
7  2026-06-03  1.780459e+09    36858233   23035404     59893637  0.624973
8  2026-06-02  1.780373e+09    36822706   21026201     57848907  0.571012
9  2026-06-01  1.780286e+09    42932185   24084036     67016221  0.560979
1
2
3
4
5
6
7
8
9
10
11

Rate Limit

  • Maximum 60 requests per 30 seconds for the option market statistics interface (for paginated interfaces, only the first call counts)