This repository has been archived on 2026-01-07. You can view files and clone it, but cannot push or open issues or pull requests.
Files
resources/stockapp/sample/get_plat_stock.py
2024-10-03 11:13:19 +08:00

12 lines
411 B
Python

from futu import *
quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)
ret, data = quote_ctx.get_plate_stock('HK.GangGuTong')
if ret == RET_OK:
print(data)
#print(data['stock_name'][0]) # 取第一条的股票名称
#print(data['stock_name'].values.tolist()) # 转为 list
else:
print('error:', data)
quote_ctx.close() # 结束后记得关闭当条连接,防止连接条数用尽