Update .gitignore and add files.

This commit is contained in:
2024-10-05 16:38:23 +08:00
parent a48dd47ebe
commit 50bbcd7ca5
21 changed files with 9531 additions and 7 deletions
+12
View File
@@ -0,0 +1,12 @@
from futu import *
quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)
ret, data = quote_ctx.get_user_security("港股")
if ret == RET_OK:
print(data)
if data.shape[0] > 0: # 如果自选股列表不为空
print(data['code'][0]) # 取第一条的股票代码
print(data['code'].values.tolist()) # 转为 list
else:
print('error:', data)
quote_ctx.close() # 结束后记得关闭当条连接,防止连接条数用尽