# 搜索行情标的

get_search_quote(keyword, max_count=10)

  • 介绍

    按关键词搜索行情标的,返回匹配的标的列表。

  • 参数

    参数 类型 说明
    keyword str 搜索词
    max_count int 本次请求的最大返回条数
  • 返回

    参数 类型 说明
    ret RET_CODE 接口调用结果
    data pd.DataFrame 当 ret == RET_OK,返回搜索行情列表
    str 当 ret != RET_OK,返回错误描述
    • DataFrame 字段说明:

      字段 类型 说明
      market Market 市场类型
      code str 股票代码
      name str 股票名称
      sec_type SecurityType 股票类型
      is_watched bool 是否已在自选
  • Example

from futu 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() # 结束后记得关闭当条连接,防止连接条数用尽
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

接口限制

  • 每 30 秒内最多请求 10 次搜索行情标的接口。