# Search Quotes

get_search_quote(keyword, max_count=10)

  • Description

    Search quotes by keyword and return a list of matched securities.

  • Parameters

    Parameter Type Description
    keyword str Search keyword
    max_count int Maximum number of items returned in this request
  • Return

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

      Field Type Description
      market Market Market type
      code str Stock code
      name str Stock name
      sec_type SecurityType Stock type
      is_watched bool In watchlist
  • Example

from moomoo import *
quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)
ret, data = quote_ctx.get_search_quote('aapl',10)
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
  • Output
  market         code                        name sec_type  is_watched
0     US      US.AAPL                          苹果    STOCK        True
1     US      US.AAPB  2倍做多AAPL ETF-GraniteShares      ETF       False
2     US  US.LIST2139                        虚拟现实    PLATE       False
3     US  US.LIST2432                       流媒体概念    PLATE       False
4     US  US.LIST2437                        苹果概念    PLATE       False
5     JP      JP.2788         Apple International    STOCK       False
6     US      US.AAPI     APPLE ISPORTS GROUP INC    STOCK       False
7     SH    SH.603020                        爱普股份    STOCK       False
8     US      US.APLY      AAPL期权收益策略ETF-YieldMax      ETF       False
9     US      US.APRU      APPLE RUSH COMPANY INC    STOCK       False
1
2
3
4
5
6
7
8
9
10
11

API Restrictions

  • Maximum 10 search quote requests per 30 seconds.