# 人気ランキングの取得

get_hot_list(market, sort_field=None, sort_dir=None, count=10, offset=None, filter_list=None)

  • 説明

    人気ランキングを取得します。指定市場の人気度ランキング銘柄リストを返します。取引人気度、検索人気度、ニュース人気度、総合人気度でソート可能で、時価総額でフィルタリングできます。

  • パラメータ

    パラメータ タイプ 説明
    market Market 市場タイプ(HK/US)(必須)
    sort_field HotListSortField ソートフィールド、デフォルト総合人気度
    sort_dir RankSortDir ソート方向、デフォルト降順
    count int 取得数量 [1, 200]、デフォルト 10
    offset int 開始位置、デフォルト 0
    filter_list list[HotListFilter] フィルター条件リスト(時価総額)
  • 入力制限

    • filter_list フィルター条件(HotListFilter):

      コンストラクタパラメータ 説明
      indicator_type フィルター指標タイプ(HotListIndicatorType、必須)
      interval_min 範囲最小値(閉区間)
      interval_max 範囲最大値(閉区間)
  • 戻り値

    パラメータ タイプ 説明
    ret RET_CODE API呼び出し結果
    data pd.DataFrame ret == RET_OK の場合、(all_count, DataFrame) タプルを返す
    str ret != RET_OK の場合、エラー説明を返す
    • データフォーマット:
      フィールド タイプ 説明
      security str 銘柄コード(例:'US.TSLA'
      name str 銘柄名
      trade_heat float 取引人気度
      trade_heat_change float 取引人気度変化
      search_heat float 検索人気度
      search_heat_change float 検索人気度変化
      news_heat float ニュース人気度
      news_heat_change float ニュース人気度変化
      average_heat float 総合人気度
      average_heat_change float 総合人気度変化
      news_type str ニュースタイプ("Community"=コミュニティ討論, "News"=ニュース)
      news_title str ニュース/討論タイトル
      news_url str ニュース URL(news_type="News" の場合有効)
  • Example

from futu import *

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

ret, data = quote_ctx.get_hot_list(market=Market.US, count=2)
if ret == RET_OK:
    all_count, df = data
    print(f'データ総数: {all_count}')
    print(df)
else:
    print('error:', data)

quote_ctx.close()
1
2
3
4
5
6
7
8
9
10
11
12
13
  • Output
データ総数: 6342
  security    name  trade_heat  trade_heat_change  search_heat  search_heat_change  news_heat  news_heat_change  average_heat  average_heat_change news_type                                         news_title                                           news_url
0  US.SPCX  SpaceX   9999995.0                0.0    9999972.0                 0.0  9999998.0               0.0     9999988.0                  0.0      News  SpaceX收涨1%,终结三连跌!首发债券获约3.6...  https://news.futunn.com/post/55589925?lang=...
1    US.MU    美光科技   5578115.0                0.0    7923445.0                 0.0  1835896.0              -2.0     5112485.0                  0.0       N/A                                              N/A                                              N/A
1
2
3
4

API制限

  • 30秒以内に最大60回のリクエストが可能です
  • ページネーションリクエストは最初のページのみレート制限にカウントされます