# Get Capital Distribution

# get_capital_distribution

get_capital_distribution(stock_code)

  • Description

    Access to capital distribution

  • Parameters

    Parameter Type Description
    stock_code str Stock code.
  • Return

    Parameter Type Description
    ret RET_CODE Interface result.
    data pd.DataFrame If ret == RET_OK, stock fund distribution data is returned.
    str If ret != RET_OK, error description is returned.
    • Stock fund distribution data format as follows:
      Field Type Description
      capital_in_super float Inflow capital quota, extra-large order.
      capital_in_big float Inflow capital quota, large order.
      capital_in_mid float Inflow capital quota, midium order.
      capital_in_small float Inflow capital quota, small order.
      capital_out_super float Outflow capital quota, extra-large order.
      capital_out_big float Outflow capital quota, large order.
      capital_out_mid float Outflow capital quota, midium order.
      capital_out_small float Outflow capital quota, small order.
      update_time str Updated time string.
  • Example

from futu import *
quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)

ret, data = quote_ctx.get_capital_distribution("HK.00700")
if ret == RET_OK:
    print(data)
    print(data['capital_in_big'][0]) # Take the amount of inflow capital of the first article, big order
    print(data['capital_in_big'].values.tolist()) # Convert to list
else:
    print('error:', data)
quote_ctx.close() # After using the connection, remember to close it to prevent the number of connections from running out
1
2
3
4
5
6
7
8
9
10
11
  • Output
   capital_in_super  capital_in_big  ...  capital_out_small          update_time
0      2.261085e+09    2.141964e+09  ...       2.887413e+09  2022-06-08 15:59:59

[1 rows x 9 columns]
2141963720.0
[2141963720.0]
1
2
3
4
5
6

Interface Limitations

  • A maximum of 30 requests per 30 seconds
  • Only support stocks, warrants and funds.
  • For more capital flow introduction, please refer to here.
  • Output data only includes tha data during Regular Trading Hours, not the data during Pre and Post-Market Hours.