# Get Indicator List

get_indicator_list(search_key='', lang_type=IndicatorLangType.NONE, search_mode=IndicatorSearchMode.PARTIAL)

  • Description

    Get the list of supported indicators. Supports filtering by keyword, indicator script language (MyLang / Python) and search mode (partial / exact).

  • Parameters

    Parameter Type Description
    search_key str Search keyword. Leave empty to return all indicators
    lang_type IndicatorLangType Indicator script language. Leave empty or NONE to not filter by language
    search_mode IndicatorSearchMode Search mode, default partial match
  • Return

    Parameter Type Description
    ret RET_CODE API call result
    data pd.DataFrame When ret == RET_OK, returns indicator list
    str When ret != RET_OK, returns error description
    • DataFrame fields:

      Field Type Description
      short_name str Indicator short name, unique within the same language
      full_name str Indicator full name
      lang_type IndicatorLangType Script language (MyLang / Python)
      inputs list Input parameter list, each item is an IndicatorInputParam
      outputs list Output parameter list, each item is an IndicatorOutputParam
      script str Script source code, only returned when search_mode = Exact and search_key is non-empty
  • Example

from moomoo import *
quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)
ret, data = quote_ctx.get_indicator_list('MACD', IndicatorLangType.MyLang, IndicatorSearchMode.PARTIAL)
if ret == RET_OK:
    print(data)
else:
    print('error:', data)
quote_ctx.close() # Remember to close the connection to avoid exhausting connection quota
1
2
3
4
5
6
7
8