# Get the List of Stocks in The Plate

# get_plate_stock

get_plate_stock(plate_code, sort_field=SortField.CODE, ascend=True)

  • Description

    Get the list of stocks in the plate, or get the constituent stocks of the stock index

  • Parameters

    Parameter Type Description
    plate_code str Plate code.
    sort_field SortField Sort field.
    ascend bool Sort direction.
  • Return

    Parameter Type Description
    ret RET_CODE Interface result.
    data pd.DataFrame If ret == RET_OK, stock data of the plate is returned.
    str If ret != RET_OK, error description is returned.
    • Stock data of the plate format as follows:
      Field Type Description
      code str Stock code.
      lot_size int The number of shares per lot, or contract multiplier for futures.
      stock_name str Stock name.
      stock_type SecurityType Stock type.
      list_time str Time of listing.
      stock_id int Stock ID.
      main_contract bool Whether future main contract.
      last_trade_time str Last trading time.
  • Example

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

ret, data = quote_ctx.get_plate_stock('HK.BK1001')
if ret == RET_OK:
    print(data)
    print(data['stock_name'][0]) # Take the first stock name
    print(data['stock_name'].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
    code  lot_size stock_name  stock_owner  stock_child_type stock_type   list_time        stock_id  main_contract last_trade_time
0   HK.00462      4000       Natural dairy          NaN               NaN      STOCK  2005-06-10  55589761712590          False                
..       ...       ...        ...          ...               ...        ...         ...             ...            ...             ...
9   HK.06186      1000           China Feihe Limited          NaN               NaN      STOCK  2019-11-13  78159814858794          False                

[10 rows x 10 columns]
Natural Dairy
['Natural Dairy', 'China Modern Dairy', 'Yashili International', 'YuanShengTai Dairy Farm', 'China Shengmu Organic Milk', 'China ZhongDi Dairy Holdings', 'Lanzhou Zhuangyuan Pasture', 'Ausnutria Dairy Corporation', 'China Mengniu Dairy', 'China Feihe Limited']
1
2
3
4
5
6
7
8

Interface Limitations

  • A maximum of 10 requests per 30 seconds
Commonly used sectors and index codes
Code Description
HK.HSI Constituent HSI constituent stocks
HK.HSCEI Stock HSCEI constituent stocks
HK.Motherboard Main Plate of Hong Kong Stocks
HK.GEM GEM(Growth Enterprise Market) Hong Kong Stocks
HK.BK1910 All Hong Kong stocks
HK.BK1911 Main Plate H shares
HK.BK1912 GEM H shares
HK.Fund ETF (Hong Kong Stock Fund)
HK.BK1600 Hot List (Hong Kong)
HK.BK1921 Listed new shares-Hong Kong stocks
SH.3000000 Shanghai Main Plate
SH.BK0901 Shanghai Stock Exchange B shares
SH.BK0902 Shenzhen Stock Exchange B shares
SH.3000002 Shanghai and Shenzhen Index
SH.3000005 All A-shares (Shanghai and Shenzhen)
SH.BK0600 Hot List (Shanghai and Shenzhen)
SH.BK0992 Science Innovation Plate
SH.BK0921 Listed New Shares - A-shares
SZ.3000001 SZSE Main Plate
SZ.3000003 Small and Medium Plate
SZ.3000004 The Growth Enterprise Market (Deep)
US.USAALL All US stocks