# Get Rise/Fall Distribution

get_rise_fall_distribution(security=None, market=None)

  • Description

    Get rise/fall distribution, returning the distribution of rising and falling stocks by range for a specified plate or market, useful for understanding overall market movement patterns.

  • Parameters

    Parameter Type Description
    security str Plate code (takes priority, e.g. 'HK.BK1001')
    market Market Market type (used when security is not provided)
  • Return

    Parameter Type Description
    ret RET_CODE API call result
    data dict When ret == RET_OK, returns dict data
    str When ret != RET_OK, returns error description
    • Data format:
      Field Type Description
      plate str Plate code
      range_list list[dict] Rise/fall distribution range list
      type str Distribution type (string, see table below)
      left_border int Left boundary value
      right_border int Right boundary value
      stock_count int Number of stocks in range
      "RISE_LIMIT" Limit up (A-share)
      "POSITIVE_INFINITY" (7%, +∞)
      "NORMAL_RANGE" Normal range
      "NEGATIVE_INFINITY" (-∞, -7%)
      "FALL_LIMIT" Limit down (A-share)
  • Example

from futu import *

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

ret, data = quote_ctx.get_rise_fall_distribution(market=Market.US)
if ret == RET_OK:
    print(data)
else:
    print('error:', data)

quote_ctx.close()
1
2
3
4
5
6
7
8
9
10
11
  • Output
{'plate': 'US.USAALL', 'range_list': [{'type': 'NEGATIVE_INFINITY', 'left_border': 0, 'right_border': -7, 'stock_count': 817}, {'type': 'NORMAL_RANGE', 'left_border': -7, 'right_border': -5, 'stock_count': 581}, {'type': 'NORMAL_RANGE', 'left_border': 0, 'right_border': 3, 'stock_count': 4168}, {'type': 'NORMAL_RANGE', 'left_border': 0, 'right_border': 0, 'stock_count': 4310}, {'type': 'POSITIVE_INFINITY', 'left_border': 7, 'right_border': 0, 'stock_count': 416}]}
1

API Limits

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