# Stock Screening V2

get_stock_screen(request)

  • Description

    Stock screening V2. Compared with the legacy get_stock_filter, this API covers a wider range of factors (11 categories, 244+ factors), accepts raw values for all numeric inputs (OpenD performs magnification conversion automatically), supports single-field or multi-field sorting, requires explicit declaration of retrieve fields, and returns each result through sval / ival / aval / dval according to its value_type.

  • Parameters

    Parameter Type Description
    request StockScreenRequest Stock screening request object, built via builder methods
    • StockScreenRequest fields:

      Field Type Description
      page_from int Pagination start position
      page_count int Maximum results per page
    • Filter builder methods (each call appends one filter condition; all numeric fields accept raw values, OpenD performs magnification automatically):

      Method Description
      add_simple_field(field, values) Filter by enum field such as market / exchange / index / watchlist
      add_plate(plate_ids, parent_plate_id=None) Plate filter
      add_simple_property(name, lower=None, upper=None) Simple property interval filter
      add_cumulative_property(name, days=1, lower=None, upper=None) Cumulative property
      add_financial_property(name, term=None, year=None, lower=None, upper=None, ...) Financial property
      add_indicator_positional(first_indicator_name, period_type, position, second_indicator=None, ...) Indicator position relation
      add_indicator_pattern(name, period_type, ...) Indicator pattern (gold cross, dead cross, divergence, etc.)
      add_featured_property(name, intervals=None, value_set=None, period=None, range_period=None, first_custom_param=None) Featured indicator (chip, hotness, analyst rating, capital flow, etc.)
      add_broker_holdings(name, days=None, param=None, intervals=None) Broker holding factor
      add_kline_shape(name, period=None, value_set=None) K-line shape (double bottom, head & shoulders, etc.)
      add_option(name, intervals=None, param=None, period=None) Option indicator (underlying IV, HV, etc.)
    • Retrieve builder methods (declare which fields to return; if not declared, only stock_id is returned):

      Method Description
      add_retrieve_basic(name) Code / name / industry
      add_retrieve_simple(name) Simple property
      add_retrieve_cumulative(name, days=1, period_average=None) Cumulative property
      add_retrieve_financial(name, term=None, year=None, ...) Financial property
      add_retrieve_indicator(name, period=None, indicator_params=None) Indicator
      add_retrieve_featured(name, period=None, range_period=None, first_custom_param=None) Featured property
      add_retrieve_broker(name, days=None, param=None) Broker
      add_retrieve_option(name, param=None, period=None) Option property
      add_retrieve_kline_shape(name, period=None) K-line shape
    • Sort builder methods:

      Method Description
      set_sort(direction, property_type, property_params) Single-field sort
      add_sort(direction, property_type, property_params) Multi-field sort
  • Returns

    Parameter Type Description
    ret RET_CODE API result
    data tuple When ret == RET_OK, returns (last_page, all_count, items)
    str When ret != RET_OK, an error description is returned
    • Returned tuple fields:

      Field Type Description
      last_page bool Whether this is the last page
      all_count int Total number of records matching the conditions
      items list[dict] Result list for the current page; each element has the structure {'stock_id': int, 'results': [result, ...]}
    • Single result structure:

      Field Type Description
      type str Property type
      property dict Corresponding property descriptor (contains name / days / term, etc.)
      value_type int Value type
      sval str String value (present when value_type=1)
      ival int Integer value (present when value_type=2)
      aval list[int] Integer array value (present when value_type=3)
      dval float Floating-point value (present when value_type=4)
      enum_type_name str When ival is an enum code, the corresponding enum type name (e.g. 'KlineShapeType')
      enum_name str When ival is an enum code, the decoded enum name returned by OpenD/SDK (e.g. 'DOUBLE_BOTTOMS', 'NONE')
      end_time int Financial report end timestamp
  • Example

from futu import OpenQuoteContext, RET_OK, StockScreenRequest
from futu.quote.stock_screen_const import (
    ScrMarket, ScrSortDir, SimpleField, SimpleProperty,
    CumulativeProperty, FinancialProperty, Term,
    Indicator, Period, Position, Pattern,
    BasicProperty, KlineShapeProperty, KlineShapeType,
)

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

# Example 1: HK large-cap stocks + MACD golden cross
req = StockScreenRequest()
req.add_simple_field(field=SimpleField.MARKET, values=[ScrMarket.HK])
req.add_simple_property(name=SimpleProperty.PRICE, lower=10.0)                   # Last price >= 10
req.add_simple_property(name=SimpleProperty.MARKET_CAP, lower=10_000_000_000.0)  # Market cap >= 10 billion
req.add_simple_property(name=SimpleProperty.PE_TTM, lower=10.0, upper=50.0)      # PE(TTM) 10~50
req.add_indicator_pattern(name=Pattern.MACD_GOLD_CROSS, period_type=Period.DAY)  # MACD golden cross
# Retrieve fields
req.add_retrieve_basic(name=BasicProperty.CODE)
req.add_retrieve_basic(name=BasicProperty.NAME)
req.add_retrieve_simple(name=SimpleProperty.PRICE)
req.add_retrieve_simple(name=SimpleProperty.MARKET_CAP)
req.add_retrieve_simple(name=SimpleProperty.PE_TTM)
# Sort
req.set_sort(direction=ScrSortDir.DESC, property_type='simple',
             property_params={'name': int(SimpleProperty.MARKET_CAP)})
req.page_count = 50

ret, data = quote_ctx.get_stock_screen(req)
if ret == RET_OK:
    last_page, all_count, items = data
    print(f"Total {all_count}, returned {len(items)} this page")
    for it in items[:3]:
        print(it['stock_id'], it['results'])
else:
    print('error: ', data)

# Example 2: Financial factor + cumulative change ratio
req = StockScreenRequest()
req.add_simple_field(field=SimpleField.MARKET, values=[ScrMarket.HK])
req.add_cumulative_property(name=CumulativeProperty.PRICE_CHANGE_PCT,
                            days=5, lower=-0.05, upper=0.05)                     # 5-day change ratio -5%~5% (decimal)
req.add_financial_property(name=FinancialProperty.NET_PROFIT,
                           term=Term.ANNUAL, lower=0.0)                          # Annual net profit > 0
req.add_retrieve_basic(name=BasicProperty.CODE)
req.add_retrieve_simple(name=SimpleProperty.PRICE)
req.page_count = 200
ret, data = quote_ctx.get_stock_screen(req)

# Example 3: K-line shape (double bottom + head-and-shoulders bottom)
req = StockScreenRequest()
req.add_simple_field(field=SimpleField.MARKET, values=[ScrMarket.HK])
req.add_kline_shape(name=KlineShapeProperty.SHAPE_TYPE, period=Period.DAY,
                    value_set=[KlineShapeType.DOUBLE_BOTTOMS,
                               KlineShapeType.HEAD_SHOULDERS_BOTTOM])
req.add_retrieve_basic(name=BasicProperty.CODE)
req.add_retrieve_kline_shape(name=KlineShapeProperty.SHAPE_TYPE, period=Period.DAY)
ret, data = quote_ctx.get_stock_screen(req)

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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
  • Output
Total 1, returned 1
54047868453564 [{'type': 'basic', 'property': {'name': 1101}, 'value_type': 1, 'sval': '00700'},
                {'type': 'basic', 'property': {'name': 1102}, 'value_type': 1, 'sval': 'Tencent Holdings'},
                {'type': 'simple', 'property': {'name': 2201}, 'value_type': 4, 'dval': 460.0},
                {'type': 'simple', 'property': {'name': 2301}, 'value_type': 4, 'dval': 4194280264040.0},
                {'type': 'simple', 'property': {'name': 2303}, 'value_type': 4, 'dval': 15.75126}]
1
2
3
4
5
6
  • Per-field examples (by category)

    All examples below target the HK market: first req = StockScreenRequest(), then req.add_simple_field(field=SimpleField.MARKET, values=[ScrMarket.HK]), stack the filter / retrieve / sort conditions from each section, and finally quote_ctx.get_stock_screen(req) to obtain (last_page, all_count, items). The measured head expands the corresponding property values inside the results array (code/name come from BasicProperty.CODE/NAME; factor column names are the lower-cased SDK field names).

    # Simple market property (SimpleProperty)

    Passed via add_simple_property(name, lower, upper). lower/upper take the raw value (currency/shares/percentage 5% as 5.0)

    # PRICE(id=2201 · simple · SimpleProperty) Latest price

    Unit: in currency; lower/upper take the raw price, OpenD applies the multiplier automatically

    req.add_simple_property(name=SimpleProperty.PRICE, lower=10.0)
    req.add_retrieve_simple(name=SimpleProperty.PRICE)
    req.set_sort(direction=ScrSortDir.DESC, property_type='simple',
                 property_params={'name': int(SimpleProperty.PRICE)})
    
    1
    2
    3
    4

    Measured response (HK · all_count=485, 5 rows matched, head top 5):

          stock_id   code    name   price
    47704201761008  04336  应用材料-T  1620.0
    87836376173009  02513      智谱  1097.0
    47704201761005  04333    思科-T   750.0
    86839943761574  03750    宁德时代   672.5
    87840671141778  03986    兆易创新   653.5
    
    1
    2
    3
    4
    5
    6
    # MARKET_CAP(id=2301 · simple · SimpleProperty) Market cap

    Unit: in currency; lower=10 billion as 10_000_000_000

    req.add_simple_property(name=SimpleProperty.MARKET_CAP, lower=10_000_000_000.0)
    req.add_retrieve_simple(name=SimpleProperty.MARKET_CAP)
    req.set_sort(direction=ScrSortDir.DESC, property_type='simple',
                 property_params={'name': int(SimpleProperty.MARKET_CAP)})
    
    1
    2
    3
    4

    Measured response (HK · all_count=591, 5 rows matched, head top 5):

          stock_id   code    name        market_cap
    54047868453564  00700    腾讯控股   4222484299075.2
    83820581829436  80700  腾讯控股-R   3641391766113.6
    86839943761574  03750    宁德时代   3111406771825.0
    47704201761005  04333    思科-T   2956075998750.0
    57754425230710  01398    工商银行  2573253176182.58
    
    1
    2
    3
    4
    5
    6
    # PE_TTM(id=2303 · simple · SimpleProperty) PE(TTM)

    Standard range filter; negative values allowed

    req.add_simple_property(name=SimpleProperty.PE_TTM, lower=5.0, upper=20.0)
    req.add_retrieve_simple(name=SimpleProperty.PE_TTM)
    req.set_sort(direction=ScrSortDir.ASC, property_type='simple',
                 property_params={'name': int(SimpleProperty.PE_TTM)})
    
    1
    2
    3
    4

    Measured response (HK · all_count=830, 5 rows matched, head top 5):

          stock_id   code      name  pe_ttm
    28604482191640  00280      景福集团     5.0
    67345087202619  01339  中国人民保险集团   5.037
    68629282424057  01273      香港信贷  5.0847
    76063870813891  01731    其利工业集团  5.0877
    35433480192608  00608      达利国际  5.0877
    
    1
    2
    3
    4
    5
    6
    # VOLUME_RATIO(id=2217 · simple · SimpleProperty) Volume ratio

    Today volume / N-day average volume; > 2 means heavy volume

    req.add_simple_property(name=SimpleProperty.VOLUME_RATIO, lower=2.0)
    req.add_retrieve_simple(name=SimpleProperty.VOLUME_RATIO)
    req.set_sort(direction=ScrSortDir.DESC, property_type='simple',
                 property_params={'name': int(SimpleProperty.VOLUME_RATIO)})
    
    1
    2
    3
    4

    Measured response (HK · all_count=340, 5 rows matched, head top 5):

          stock_id   code      name  volume_ratio
    50796578209975  00183      宏辉集团         600.0
    45999099741384  01224      中渝置地       404.642
              1543  01543  中盈盛达融资担保       400.714
    24142011170996  00180      开达集团       314.999
     5033701671181  00269    中国资源交通         200.0
    
    1
    2
    3
    4
    5
    6
    # DIVIDEND_RATIO(id=2305 · simple · SimpleProperty) Dividend yield

    Unit: %; dividend yield ≥ 5% as 5.0

    req.add_simple_property(name=SimpleProperty.DIVIDEND_RATIO, lower=5.0)
    req.add_retrieve_simple(name=SimpleProperty.DIVIDEND_RATIO)
    req.set_sort(direction=ScrSortDir.DESC, property_type='simple',
                 property_params={'name': int(SimpleProperty.DIVIDEND_RATIO)})
    
    1
    2
    3
    4

    Measured response (HK · all_count=0, 0 rows matched): no data. Reason: No HK sample currently has dividend yield ≥ 5%; can lower the threshold

    # Cumulative market property (CumulativeProperty)

    Passed via add_cumulative_property(name, days, lower, upper). Percentage values (change %, turnover %) are decimals (5% as 0.05)

    # PRICE_CHANGE_PCT(id=3102 · cumulative · CumulativeProperty) N-day price change %

    Percentage as decimal: 5% as 0.05; days is the N-day cumulative window

    req.add_cumulative_property(name=CumulativeProperty.PRICE_CHANGE_PCT,
                                days=5, lower=0.05)
    req.add_retrieve_cumulative(name=CumulativeProperty.PRICE_CHANGE_PCT, days=5)
    req.set_sort(direction=ScrSortDir.DESC, property_type='cumulative',
                 property_params={'name': int(CumulativeProperty.PRICE_CHANGE_PCT), 'days': 5})
    
    1
    2
    3
    4
    5

    Measured response (HK · all_count=363, 5 rows matched, head top 5):

          stock_id   code      name  change_pct_5d
    88510686038921  02953     嬴集团股权            4.0
    77640123811704  01912       康特隆         2.7679
    47704201761005  04333      思科-T         2.2029
    88467736365964  02956  中国健康科技股权         1.6667
    47704201761008  04336    应用材料-T         1.4384
    
    1
    2
    3
    4
    5
    6
    # AMPLITUDE(id=3103 · cumulative · CumulativeProperty) N-day amplitude %

    Same as PRICE_CHANGE_PCT, percentage as decimal

    req.add_cumulative_property(name=CumulativeProperty.AMPLITUDE,
                                days=20, lower=0.1)
    req.add_retrieve_cumulative(name=CumulativeProperty.AMPLITUDE, days=20)
    req.set_sort(direction=ScrSortDir.DESC, property_type='cumulative',
                 property_params={'name': int(CumulativeProperty.AMPLITUDE), 'days': 20})
    
    1
    2
    3
    4
    5

    Measured response (HK · all_count=2345, 5 rows matched, head top 5):

          stock_id   code    name  amp_20d
    47704201761008  04336  应用材料-T  43.3783
    55671366092780  02028    映美控股   9.0893
    59558311493749  00117  天利控股集团   8.0532
    42623255446398  00894    万裕科技     7.59
    88433376627363  02723    深演智能   6.3243
    
    1
    2
    3
    4
    5
    6
    # AVG_VOLUME(id=3104 · cumulative · CumulativeProperty) N-day average volume

    Unit: shares; arithmetic mean of N-day volume

    req.add_cumulative_property(name=CumulativeProperty.AVG_VOLUME,
                                days=20, lower=1_000_000)
    req.add_retrieve_cumulative(name=CumulativeProperty.AVG_VOLUME, days=20)
    req.set_sort(direction=ScrSortDir.DESC, property_type='cumulative',
                 property_params={'name': int(CumulativeProperty.AVG_VOLUME), 'days': 20})
    
    1
    2
    3
    4
    5

    Measured response (HK · all_count=2295, 5 rows matched, head top 5):

          stock_id   code    name  avg_vol_20d
    84688165145005  02477    经纬天地  15586288027
    58506044508119  02007     碧桂园  11318232417
    69325067126991  02255  海昌海洋公园  10691740000
    81462644703252  00020    商汤-W   9517974535
    79671643350793  09993    金辉控股   7418314265
    
    1
    2
    3
    4
    5
    6
    # TURNOVER_RATIO(id=3106 · cumulative · CumulativeProperty) N-day cumulative turnover %

    Unit: %; percentage as decimal (5% as 0.05)

    req.add_cumulative_property(name=CumulativeProperty.TURNOVER_RATIO,
                                days=20, lower=0.05)
    req.add_retrieve_cumulative(name=CumulativeProperty.TURNOVER_RATIO, days=20)
    req.set_sort(direction=ScrSortDir.DESC, property_type='cumulative',
                 property_params={'name': int(CumulativeProperty.TURNOVER_RATIO), 'days': 20})
    
    1
    2
    3
    4
    5

    Measured response (HK · all_count=800, 5 rows matched, head top 5):

          stock_id   code   name  turnover_ratio_20d
    58196806861368  00568   山东墨龙              6.7527
    84688165145005  02477   经纬天地              3.8966
    88089779243675  02715    埃斯顿              3.7288
    84434762074537  02473  喜相逢集团              3.4646
    87230785784391  02631   天岳先进              3.2208
    
    1
    2
    3
    4
    5
    6

    # Financial property (FinancialProperty)

    Passed via add_financial_property(name, term, year, lower, upper). term comes from the Term enum (Annual=100, Q1=1; TTM does not need term); ratios are decimals (15% as 0.15)

    # NET_PROFIT(id=4101 · financial · FinancialProperty) Net profit

    Unit: in currency; term=ANNUAL(100) for annual, Q1=1, Q2/Q3/Q4 for partial periods

    req.add_financial_property(name=FinancialProperty.NET_PROFIT,
                               term=Term.ANNUAL, lower=1_000_000_000.0)
    req.add_retrieve_financial(name=FinancialProperty.NET_PROFIT, term=Term.ANNUAL)
    req.set_sort(direction=ScrSortDir.DESC, property_type='financial',
                 property_params={'name': int(FinancialProperty.NET_PROFIT),
                                  'term': int(Term.ANNUAL)})
    
    1
    2
    3
    4
    5
    6

    Measured response (HK · all_count=437, 5 rows matched, head top 5):

          stock_id   code    name      net_profit
    57754425230710  01398    工商银行  412328868600.0
    56186762167211  00939    建设银行  377880459000.0
    63586990818568  01288    农业银行  324736536300.0
    57118770073492  03988    中国银行  286850625600.0
    83820581829436  80700  腾讯控股-R  255561692100.0
    
    1
    2
    3
    4
    5
    6
    # ROE(id=4110 · financial · FinancialProperty) Return on equity

    Unit: %; percentage as decimal (15% as 0.15); term=ANNUAL

    req.add_financial_property(name=FinancialProperty.ROE,
                               term=Term.ANNUAL, lower=0.15)
    req.add_retrieve_financial(name=FinancialProperty.ROE, term=Term.ANNUAL)
    req.set_sort(direction=ScrSortDir.DESC, property_type='financial',
                 property_params={'name': int(FinancialProperty.ROE),
                                  'term': int(Term.ANNUAL)})
    
    1
    2
    3
    4
    5
    6

    Measured response (HK · all_count=322, 5 rows matched, head top 5):

          stock_id   code    name      roe
    62487479191132  01628    禹洲集团   40.644
    69823283339309  08237    华星控股  12.6906
    52845277610549  00565  锦艺集团控股   3.0644
    86882893433405  02621    手回集团   2.7027
    64969970288874  02282   美高梅中国   2.6886
    
    1
    2
    3
    4
    5
    6
    # REVENUE_GROWTH(id=4106 · financial · FinancialProperty) Revenue YoY growth

    Unit: %; percentage as decimal (20% as 0.20); term=ANNUAL

    req.add_financial_property(name=FinancialProperty.REVENUE_GROWTH,
                               term=Term.ANNUAL, lower=0.20)
    req.add_retrieve_financial(name=FinancialProperty.REVENUE_GROWTH, term=Term.ANNUAL)
    req.set_sort(direction=ScrSortDir.DESC, property_type='financial',
                 property_params={'name': int(FinancialProperty.REVENUE_GROWTH),
                                  'term': int(Term.ANNUAL)})
    
    1
    2
    3
    4
    5
    6

    Measured response (HK · all_count=638, 5 rows matched, head top 5):

          stock_id   code    name  revenue_growth
    46772193854353  00913    港湾数字        106.7922
    88377542057458  07666  剂泰科技-P          73.067
    53047141075220  02324    首都创投         63.5792
    43589623088228  01124    沿海家园         26.7323
    74259984551169  03329    交银国际         20.5256
    
    1
    2
    3
    4
    5
    6
    # BASIC_EPS(id=4801 · financial · FinancialProperty) Basic EPS

    Unit: in currency; term=ANNUAL

    req.add_financial_property(name=FinancialProperty.BASIC_EPS,
                               term=Term.ANNUAL, lower=1.0)
    req.add_retrieve_financial(name=FinancialProperty.BASIC_EPS, term=Term.ANNUAL)
    req.set_sort(direction=ScrSortDir.DESC, property_type='financial',
                 property_params={'name': int(FinancialProperty.BASIC_EPS),
                                  'term': int(Term.ANNUAL)})
    
    1
    2
    3
    4
    5
    6

    Measured response (HK · all_count=324, 5 rows matched, head top 5):

          stock_id   code             name      basic_eps
    86998857554659  06883             颖通控股  123007487.548
    88261577939456  06656             思格新能        139.457
    69290707392656  06288  FAST RETAIL-DRS         74.984
    80418967660265  09961           携程集团-S         56.044
    85439784425509  06181             老铺黄金         31.388
    
    1
    2
    3
    4
    5
    6
    # DIVIDENDS_TTM_RATIO(id=4219 · financial · FinancialProperty) TTM dividend yield

    Unit: %; percentage as decimal; TTM family does not need term/year

    req.add_financial_property(name=FinancialProperty.DIVIDENDS_TTM_RATIO, lower=0.05)
    req.add_retrieve_financial(name=FinancialProperty.DIVIDENDS_TTM_RATIO)
    req.set_sort(direction=ScrSortDir.DESC, property_type='financial',
                 property_params={'name': int(FinancialProperty.DIVIDENDS_TTM_RATIO)})
    
    1
    2
    3
    4

    Measured response (HK · all_count=463, 5 rows matched, head top 5):

          stock_id   code    name  div_ttm_ratio
    50856707752105  00169  万达酒店发展         4.0526
              2136  02136    利福中国         0.6562
    77622943942788  02180    万宝盛华         0.3752
    75419625726233  08473  弥明生活百货         0.3303
    64896955845349  02789    远大中国         0.2994
    
    1
    2
    3
    4
    5
    6

    # Technical indicator positional (Indicator)

    Passed via add_indicator_positional(first_indicator_name, period_type, position, second_indicator=None, value=None, first_indicator_params=None). position comes from Position (OVER=1, BELOW=2, CROSS_UP=3, CROSS_DOWN=4)

    # MA5 / MA20(id=11 · indicator · Indicator) MA5 crosses above MA20

    add_indicator_positional: first/second are both Indicator enum names

    req.add_indicator_positional(first_indicator_name=Indicator.MA5,
                                 period_type=Period.DAY,
                                 position=Position.CROSS_UP,
                                 second_indicator=Indicator.MA20)
    
    1
    2
    3
    4

    Measured response (HK · all_count=67, 5 rows matched, head top 5):

          stock_id   code    name
    88356067214548  01236   乐动机器人
    88313117542845  02493  迈威生物-B
    88179973556902  02726    瀚天天成
    87033217287972  01828    富卫集团
    86968792779992  03288    海天味业
    
    1
    2
    3
    4
    5
    6
    # RSI(id=52 · indicator · Indicator) RSI overbought (>70)

    Indicator params via first_indicator_params, e.g. RSI period 14

    req.add_indicator_positional(first_indicator_name=Indicator.RSI,
                                 period_type=Period.DAY,
                                 position=Position.OVER, second_value=70,
                                 first_indicator_params=[14])
    
    1
    2
    3
    4

    Measured response (HK · all_count=97, 5 rows matched, head top 5):

          stock_id   code     name
    88502096109937  08561  爱世纪集团股权
    88476326299379  01779   天辰生物-B
    88450556496782  02958  远见控股(旧)
    88416196762328  06872   丹诺医药-B
    88407606823814  02950  升能集团(旧)
    
    1
    2
    3
    4
    5
    6
    # MACD_DIF(id=41 · indicator · Indicator) MACD DIF above zero

    second_value is a single threshold; position=OVER means DIF > value

    req.add_indicator_positional(first_indicator_name=Indicator.MACD_DIF,
                                 period_type=Period.DAY,
                                 position=Position.OVER, second_value=0)
    
    1
    2
    3

    Measured response (HK · all_count=786, 5 rows matched, head top 5):

          stock_id   code      name
    88476326299379  01779    天辰生物-B
    88467736365964  02956  中国健康科技股权
    88450556496782  02958   远见控股(旧)
    88437671594888  02952  杭品生活科技股权
    88433376627363  02723      深演智能
    
    1
    2
    3
    4
    5
    6
    # PRICE / BOLL_UPPER(id=1 · indicator · Indicator) Price above BOLL upper

    Compares PRICE(1) with BOLL_UPPER(61) positionally

    req.add_indicator_positional(first_indicator_name=Indicator.PRICE,
                                 period_type=Period.DAY,
                                 position=Position.CROSS_UP,
                                 second_indicator=Indicator.BOLL_UPPER)
    
    1
    2
    3
    4

    Measured response (HK · all_count=50, 5 rows matched, head top 5):

          stock_id   code    name
    87544318404244  09876  大洋环球控股
    85864986184208  02576  太美医疗科技
    84482006714840  02520    山西安装
    83000243002163  06963    阳光保险
    82961588291781  02245    力勤资源
    
    1
    2
    3
    4
    5
    6

    # Technical indicator pattern (Pattern)

    Passed via add_indicator_pattern(name, period_type). name comes from the Pattern enum

    # MACD_GOLD_CROSS(id=21 · pattern · Pattern) MACD golden cross

    add_indicator_pattern: name comes from the Pattern enum

    req.add_indicator_pattern(name=Pattern.MACD_GOLD_CROSS, period_type=Period.DAY)
    
    1

    Measured response (HK · all_count=116, 5 rows matched, head top 5):

          stock_id   code      name
    88502096109937  08561   爱世纪集团股权
    88416196764014  08558  麦迪森控股(旧)
    88265872906147  06051        有赞
    86998857553944  06168       周六福
    86822763895471  06831      绿茶集团
    
    1
    2
    3
    4
    5
    6
    # KDJ_GOLD_CROSS(id=11 · pattern · Pattern) KDJ golden cross

    Same as above, K crosses above D

    req.add_indicator_pattern(name=Pattern.KDJ_GOLD_CROSS, period_type=Period.DAY)
    
    1

    Measured response (HK · all_count=179, 5 rows matched, head top 5):

          stock_id   code           name
    88480621267856  02960  ALCO HOLD RTS
    88420491725703  02951        京玖康疗(旧)
    88179973556702  02526           德适-B
    87746181861167  03887  HASHKEY HLDGS
    87741886892639  02655           果下科技
    
    1
    2
    3
    4
    5
    6
    # BOLL_BREAK_UPPER(id=41 · pattern · Pattern) Price breaks BOLL upper

    BOLL pattern series 41~44

    req.add_indicator_pattern(name=Pattern.BOLL_BREAK_UPPER, period_type=Period.DAY)
    
    1

    Measured response (HK · all_count=50, 5 rows matched, head top 5):

          stock_id   code    name
    87544318404244  09876  大洋环球控股
    85864986184208  02576  太美医疗科技
    84482006714840  02520    山西安装
    83000243002163  06963    阳光保险
    82961588291781  02245    力勤资源
    
    1
    2
    3
    4
    5
    6

    # Featured property (FeaturedProperty)

    Passed via add_featured_property(name, intervals, value_set, period, range_period, first_custom_param). Use intervals=[{...}] for ranges and value_set=[...] for enums

    # SHORT_POSITION(id=5110 · featured · FeaturedProperty) Short position

    Unit: shares; intervals not needed

    req.add_featured_property(name=FeaturedProperty.SHORT_POSITION)
    req.add_retrieve_featured(name=FeaturedProperty.SHORT_POSITION)
    req.set_sort(direction=ScrSortDir.DESC, property_type='featured',
                 property_params={'name': int(FeaturedProperty.SHORT_POSITION)})
    
    1
    2
    3
    4

    Measured response (HK · all_count=0, 0 rows matched): no data. Reason: This featured factor is not exposed for HK; switch to the US market to query

    # ANALYST_RATING(id=5401 · featured · FeaturedProperty) Analyst rating

    Enum: 1=Strong Buy, 2=Buy, 3=Hold, 4=Sell, 5=Strong Sell; pass value_set array

    req.add_featured_property(name=FeaturedProperty.ANALYST_RATING, value_set=[1, 2])
    req.add_retrieve_featured(name=FeaturedProperty.ANALYST_RATING)
    req.set_sort(direction=ScrSortDir.ASC, property_type='featured',
                 property_params={'name': int(FeaturedProperty.ANALYST_RATING)})
    
    1
    2
    3
    4

    Measured response (HK · all_count=0, 0 rows matched): no data. Reason: Switch to the US market with higher coverage, or broaden value_set

    # ANALYST_TARGET_PRICE(id=5403 · featured · FeaturedProperty) Analyst target price

    Unit: in currency; intervals as dict list [{'lower': {'value': X, 'includes': True}}]

    req.add_featured_property(name=FeaturedProperty.ANALYST_TARGET_PRICE,
                              intervals=[{'lower': {'value': 100.0, 'includes': True}}])
    req.add_retrieve_featured(name=FeaturedProperty.ANALYST_TARGET_PRICE)
    req.set_sort(direction=ScrSortDir.DESC, property_type='featured',
                 property_params={'name': int(FeaturedProperty.ANALYST_TARGET_PRICE)})
    
    1
    2
    3
    4
    5

    Measured response (HK · all_count=0, 0 rows matched): no data. Reason: Switch to the US market with higher coverage, or relax intervals lower bound

    # HIST_PERCENTILE_PE(id=5502 · featured · FeaturedProperty) Current PE historical percentile

    range_period required: RangePeriod enum (THREE_MONTHS=1, SIX_MONTHS=2, ONE_YEAR=3, THREE_YEARS=4)

    req.add_featured_property(name=FeaturedProperty.HIST_PERCENTILE_PE,
                              range_period=RangePeriod.THREE_YEARS,
                              intervals=[{'upper': {'value': 0.30, 'includes': True}}])
    req.add_retrieve_featured(name=FeaturedProperty.HIST_PERCENTILE_PE,
                              range_period=RangePeriod.THREE_YEARS)
    req.set_sort(direction=ScrSortDir.ASC, property_type='featured',
                 property_params={'name': int(FeaturedProperty.HIST_PERCENTILE_PE),
                                  'rangePeriod': int(RangePeriod.THREE_YEARS)})
    
    1
    2
    3
    4
    5
    6
    7
    8

    Measured response (HK · all_count=0, 0 rows matched): no data. Reason: Some HK stocks lack historical PE; can relax range_period / intervals

    # CASH_FLOW_MAIN_NET_IN(id=5901 · featured · FeaturedProperty) Main capital net inflow

    Unit: in currency; cash flow uses CashFlowPeriod enum (DAY=1, WEEK=2, MONTH_P=3, QUARTER=4)

    req.add_featured_property(name=FeaturedProperty.CASH_FLOW_MAIN_NET_IN,
                              range_period=CashFlowPeriod.DAY,
                              intervals=[{'lower': {'value': 10_000_000.0, 'includes': True}}])
    req.add_retrieve_featured(name=FeaturedProperty.CASH_FLOW_MAIN_NET_IN,
                              range_period=CashFlowPeriod.DAY)
    req.set_sort(direction=ScrSortDir.DESC, property_type='featured',
                 property_params={'name': int(FeaturedProperty.CASH_FLOW_MAIN_NET_IN),
                                  'rangePeriod': int(CashFlowPeriod.DAY)})
    
    1
    2
    3
    4
    5
    6
    7
    8

    Measured response (HK · all_count=0, 0 rows matched): no data. Reason: No data measured on HK; recommend the US market or a shorter period

    # Broker holdings (BrokerProperty)

    Passed via add_broker_holdings(name, days, param, intervals). HK only; for 6101/6102/6105/6106/6107 the multiplier is 1000 — pass percentages (20% as 20)

    # CONCENTRATED_DISTRIBUTION(id=6101 · broker · BrokerProperty) Broker concentration

    HK only; intervals as dict list, unit % (20% as 20.0)

    req.add_broker_holdings(name=BrokerProperty.CONCENTRATED_DISTRIBUTION,
                            intervals=[{'lower': {'value': 20.0, 'includes': True}}])
    req.add_retrieve_broker(name=BrokerProperty.CONCENTRATED_DISTRIBUTION)
    req.set_sort(direction=ScrSortDir.DESC, property_type='broker',
                 property_params={'name': int(BrokerProperty.CONCENTRATED_DISTRIBUTION)})
    
    1
    2
    3
    4
    5

    Measured response (HK · all_count=0, 0 rows matched): no data. Reason: Returns 0 when HK OpenD has no broker data subscription; can lower the threshold

    # CENTRAL_HOLDINGS_RATIO(id=6106 · broker · BrokerProperty) CCASS holding ratio

    HK only; intervals as dict list, unit %

    req.add_broker_holdings(name=BrokerProperty.CENTRAL_HOLDINGS_RATIO,
                            intervals=[{'lower': {'value': 10.0, 'includes': True}}])
    req.add_retrieve_broker(name=BrokerProperty.CENTRAL_HOLDINGS_RATIO)
    req.set_sort(direction=ScrSortDir.DESC, property_type='broker',
                 property_params={'name': int(BrokerProperty.CENTRAL_HOLDINGS_RATIO)})
    
    1
    2
    3
    4
    5

    Measured response (HK · all_count=0, 0 rows matched): no data. Reason: Returns 0 when HK OpenD has no broker data subscription; can lower the threshold

    # BROKER_NUM(id=6103 · broker · BrokerProperty) Number of brokers holding the stock

    HK only; integer (intervals as dict list)

    req.add_broker_holdings(name=BrokerProperty.BROKER_NUM,
                            intervals=[{'lower': {'value': 100, 'includes': True}}])
    req.add_retrieve_broker(name=BrokerProperty.BROKER_NUM)
    req.set_sort(direction=ScrSortDir.DESC, property_type='broker',
                 property_params={'name': int(BrokerProperty.BROKER_NUM)})
    
    1
    2
    3
    4
    5

    Measured response (HK · all_count=0, 0 rows matched): no data. Reason: Returns 0 when HK OpenD has no broker data subscription

    # K-line shape (KlineShapeProperty)

    Passed via add_kline_shape(name, period, value_set). period is required; currently only daily (Period.DAY=11) and 1-hour (Period.HOUR_1=5) are supported

    # SHAPE_TYPE(id=6200 · kline_shape · KlineShapeProperty) K-line shape detection

    period required: daily K=11, 1-hour K=5 (measured discrepancy with SDK doc)

    req.add_kline_shape(name=KlineShapeProperty.SHAPE_TYPE, period=Period.DAY,
                        value_set=[KlineShapeType.DOUBLE_BOTTOMS,
                                   KlineShapeType.HEAD_SHOULDERS_BOTTOM])
    req.add_retrieve_kline_shape(name=KlineShapeProperty.SHAPE_TYPE, period=Period.DAY)
    
    1
    2
    3
    4

    Measured response (HK · all_count=0, 0 rows matched): no data. Reason: No match for the specified shape + interval; can broaden value_set

    # RISE_PROB(id=6201 · kline_shape · KlineShapeProperty) Post-shape rise probability

    Unit: %; used together with SHAPE_TYPE

    req.add_kline_shape(name=KlineShapeProperty.SHAPE_TYPE, period=Period.DAY,
                        value_set=[KlineShapeType.DOUBLE_BOTTOMS])
    req.add_retrieve_kline_shape(name=KlineShapeProperty.RISE_PROB, period=Period.DAY)
    req.set_sort(direction=ScrSortDir.DESC, property_type='kline_shape',
                 property_params={'name': int(KlineShapeProperty.RISE_PROB),
                                  'period': int(Period.DAY)})
    
    1
    2
    3
    4
    5
    6

    Measured response (HK · all_count=0, 0 rows matched): no data. Reason: Used together with SHAPE_TYPE; no match in the HK sample

    # Option property (OptionProperty)

    Passed via add_option(name, intervals, param, period). Used to screen by underlying-stock option dimensions such as IV / HV

    # STOCK_IV(id=1000 · option · OptionProperty) Underlying option IV

    Unit: %; intervals as dict list; period from OptionHVPeriod enum

    req.add_option(name=OptionProperty.STOCK_IV,
                   intervals=[{'lower': {'value': 30.0, 'includes': True}}])
    req.add_retrieve_option(name=OptionProperty.STOCK_IV)
    req.set_sort(direction=ScrSortDir.DESC, property_type='option',
                 property_params={'name': int(OptionProperty.STOCK_IV)})
    
    1
    2
    3
    4
    5

    Measured response (HK · all_count=0, 0 rows matched): no data. Reason: Switch to a market with full option coverage (US) or lower the intervals threshold

    # STOCK_IV_RANK(id=1001 · option · OptionProperty) Underlying IV rank

    0~100; relative position of current IV in historical range (intervals as dict list)

    req.add_option(name=OptionProperty.STOCK_IV_RANK,
                   intervals=[{'lower': {'value': 50.0, 'includes': True}}])
    req.add_retrieve_option(name=OptionProperty.STOCK_IV_RANK)
    req.set_sort(direction=ScrSortDir.DESC, property_type='option',
                 property_params={'name': int(OptionProperty.STOCK_IV_RANK)})
    
    1
    2
    3
    4
    5

    Measured response (HK · all_count=0, 0 rows matched): no data. Reason: Switch to a market with full option coverage (US) or lower the intervals threshold

    # STOCK_HV(id=1006 · option · OptionProperty) Underlying historical volatility

    Unit: %; intervals as dict list; period from OptionHVPeriod enum

    req.add_option(name=OptionProperty.STOCK_HV,
                   intervals=[{'lower': {'value': 20.0, 'includes': True}}])
    req.add_retrieve_option(name=OptionProperty.STOCK_HV)
    req.set_sort(direction=ScrSortDir.DESC, property_type='option',
                 property_params={'name': int(OptionProperty.STOCK_HV)})
    
    1
    2
    3
    4
    5

    Measured response (HK · all_count=0, 0 rows matched): no data. Reason: Switch to a market with full option coverage (US) or lower the intervals threshold

Interface Limitations

  • A maximum of 10 requests per 30 seconds