# Option Underlying Rank

get_option_underlying_rank(option_market, sort_type, sort_direction=None, count=None, trading_date=None, filter_list=None, page=None)

  • Description

    Get option underlying ranking. Ranks option underlyings (stocks/ETFs/indices) by the specified dimension, with support for multi-dimensional filtering and pagination.

  • Parameters

    Parameter Type Description
    option_market OptionMarket Option market type
    sort_type UnderlyingRankSortType Sort field
    sort_direction int Sort direction
    count int Page size
    trading_date str Trading date
    filter_list list[UnderlyingRankFilter] Filter conditions list
    page str Pagination cursor
  • Filter (UnderlyingRankFilter)

    Build filter conditions with UnderlyingRankFilter; multiple conditions use AND logic.

    UnderlyingRankFilter(indicator_type, value_list=None, interval_min=None, interval_max=None,
                         min_inclusive=True, max_inclusive=True, security_list=None)
    
    1
    2
    Parameter Type Description
    indicator_type UnderlyingRankIndicatorType Filter indicator type
    value_list list Exact value list (enum values or integers)
    interval_min float Interval lower bound
    interval_max float Interval upper bound
    min_inclusive bool Whether lower bound is inclusive, default True
    max_inclusive bool Whether upper bound is inclusive, default True
    security_list list[str] Security code list
    • Filter indicators (full enum list see UnderlyingRankIndicatorType), grouped by filter mode:

      Filter mode Parameter Applicable indicators Semantics
      security_list security_list OWNER_LIST Only specified underlyings
      value_list value_list STOCK_CATEGORY Match category enum
      Range interval_min / interval_max IV, IV_RANK, IV_PERCENTILE, IV_CHANGE, HV, HV_CHANGE, VOLUME, OPEN_INTEREST, VOLUME_RATIO, OI_RATIO, MARKET_CAP Fall within interval
  • Returns

    Parameter Type Description
    ret RET_CODE Interface call result
    data pandas.DataFrame When ret == RET_OK, returns ranking data
    str When ret != RET_OK, returns error description
    next_page str Next page cursor string, None indicates no more pages
    all_count int Total count of records matching the filter conditions
    • data DataFrame fields:

      Field Type Description
      code str Underlying stock code
      name str Underlying name
      total_volume int Total option volume
      total_open_interest int Total option open interest
      volume_ratio float Put/Call volume ratio (percentage)
      open_interest_ratio float Put/Call open interest ratio (percentage)
      iv float Implied volatility (percentage)
      iv_rank float IV rank percentile (percentage)
      iv_percentile float IV percentile (percentage)
      price float Underlying latest price
      change_ratio float Underlying price change ratio (decimal)
      iv_change float IV change rate (percentage)
      hv float Historical volatility (percentage)
      hv_change float HV change rate (percentage)
      market_cap float Market capitalization
      trading_date str Trading date of the ranking data
      trading_timestamp float Trading date timestamp of the ranking data (Unix seconds)
  • Example

from futu import *

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

# Filter usage guide (uncomment as needed, build then pass to filter_list, multiple conditions use AND logic):
# # ① Owner list filter — only specified underlyings
# f_owner = UnderlyingRankFilter(UnderlyingRankIndicatorType.OWNER_LIST,
#                                security_list=['US.TSLA', 'US.AAPL', 'US.NVDA'])
# # ② Exact value filter — only ETF underlyings
# f_cat = UnderlyingRankFilter(UnderlyingRankIndicatorType.STOCK_CATEGORY,
#                              value_list=[StockCategory.ETF])
# # ③ Range filter — IV Rank > 50% (decimal 0.5), OI P/C ratio > 1 (bearish)
# f_ivrank = UnderlyingRankFilter(UnderlyingRankIndicatorType.IV_RANK, interval_min=0.5)
# f_pcr = UnderlyingRankFilter(UnderlyingRankIndicatorType.OI_RATIO, interval_min=1.0)

ret, data, next_page, all_count = quote_ctx.get_option_underlying_rank(
    option_market=OptionMarket.US_SECURITY,
    sort_type=UnderlyingRankSortType.VOLUME,
    count=5
    # filter_list=[f_cat, f_ivrank]   # AND of multiple conditions, pass filters built above
)
if ret == RET_OK:
    print(data)
    print('all_count:', all_count)
else:
    print('error:', data)

quote_ctx.close()
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
  • Output
      code                        name  total_volume  total_open_interest  volume_ratio  open_interest_ratio      iv  iv_rank  iv_percentile   price  change_ratio  iv_change      hv  hv_change    market_cap trading_date  trading_timestamp
0   US.SPY               标普500ETF-SPDR      14228830             19909256       0.97899              1.93868  17.675   27.143         61.111  741.75      0.540826     -8.261  15.031     -0.057  7.814945e+11   2026-06-12       1.781237e+09
1   US.QQQ  纳指100ETF-Invesco QQQ Trust       8239190             12964422       0.99417              1.49888  27.652   62.918         91.269  721.34      0.588465     -8.332  26.196     -0.644  4.765533e+11   2026-06-12       1.781237e+09
2  US.TSLA                         特斯拉       3623504              7088459       0.64872              0.69633  55.053   39.265         64.285  406.43      1.823876     -0.629  49.359     -1.194  1.526439e+12   2026-06-12       1.781237e+09
3  US.NVDA                         英伟达       3157331             16744961       0.59428              0.84085  41.975   27.062         42.460  205.19      0.156197     -7.002  45.921     -1.972  4.965598e+12   2026-06-12       1.781237e+09
4   US.IWM           罗素2000ETF-iShares       2840729             11791964       0.79034              2.78276  24.857   33.930         64.285  292.95      0.874626     -6.744  24.802      0.522  8.061984e+10   2026-06-12       1.781237e+09
all_count: 6017
1
2
3
4
5
6
7

Rate Limit

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