# Get Heat Map Data

get_heat_map_data(market, sort_field=None, ascend=None, count=None, page=None, plate_type=None)

  • Description

    Get heat map data, returning sector heat map information for a specified market (including change rate, market value, turnover, rise/fall counts, leading stocks, etc.), with support for multi-dimensional sorting and cursor pagination.

  • Parameters

    Parameter Type Description
    market Market Market type (required)
    sort_field HeatMapSortField Sort field, default change rate
    ascend bool True=ascending, False=descending, default descending
    count int Return count [1, 200], default 30
    page str Page cursor
    plate_type HeatMapPlateType Sector type, default industry sector
  • Return

    Parameter Type Description
    ret RET_CODE API call result
    data pd.DataFrame When ret == RET_OK, returns data
    str When ret != RET_OK, returns error description
    • Data format:
      Field Type Description
      plate str Sector code (e.g. 'HK.BK1001')
      plate_name str Sector name
      cur_price float Latest price
      change_rate float Change rate (%)
      turnover float Turnover
      volume int Volume
      market_val float Market cap
      pe_avg float Average P/E ratio
      rise_count int Rise count
      fall_count int Fall count
      equal_count int Unchanged count
      leader_stock str Leading stock code
      description str Sector description
  • Example

from futu import *

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

ret, data, next_page, all_count = quote_ctx.get_heat_map_data(market=Market.US, count=2)
if ret == RET_OK:
    print(f'Total sectors: {all_count}')
    print(data)
else:
    print('error:', data)

quote_ctx.close()
1
2
3
4
5
6
7
8
9
10
11
12
  • Output
Total sectors: 145
         plate plate_name    cur_price  change_rate      turnover     volume    market_val  pe_avg  rise_count  fall_count  equal_count leader_stock description
0  US.LIST2496  人力资源与就业服务  1229.174414     4.717340  7.345543e+08  437599614  1.502404e+10  -6.112          15           3            2      US.ATLN         N/A
1  US.LIST2473         糖果  1696.630748     3.295289  1.178965e+09   14299774  1.176028e+11  49.691           4           1            0      US.RMCF         N/A
1
2
3
4

API Limits

  • Maximum 60 requests within 30 seconds
  • Only the first page of paginated requests counts toward rate limiting