Traceback (most recent call last):
File "./hk_ipo_history_price.py", line 1, in
import futu as ft
File "/usr/local/lib/python3.6/dist-packages/futu/init.py", line 22, in
from futu.quote.open_quote_context import OpenQuoteContext
File "/usr/local/lib/python3.6/dist-packages/futu/quote/open_quote_context.py", line 11, in
from futu.common.open_context_base import OpenContextBase, ContextStatus
File "/usr/local/lib/python3.6/dist-packages/futu/common/open_context_base.py", line 11, in
from futu.common.utils import
File "/usr/local/lib/python3.6/dist-packages/futu/common/utils.py", line 8, in
from futu.common.conn_mng import
File "/usr/local/lib/python3.6/dist-packages/futu/common/conn_mng.py", line 5, in
from futu.common.constant import *
File "/usr/local/lib/python3.6/dist-packages/futu/common/constant.py", line 140, in
from futu.common.pb import Trd_Common_pb2
File "/usr/local/lib/python3.6/dist-packages/futu/common/pb/Trd_Common_pb2.py", line 17, in
import Common_pb2 as Common__pb2
File "/usr/local/lib/python3.6/dist-packages/futu/common/pb/Common_pb2.py", line 107, in
options=None, file=DESCRIPTOR),
TypeError: new() got an unexpected keyword argument 'file'
Traceback (most recent call last): File "./hk_ipo_history_price.py", line 1, in
import futu as ft
File "/usr/local/lib/python3.6/dist-packages/futu/init.py", line 22, in
from futu.quote.open_quote_context import OpenQuoteContext
File "/usr/local/lib/python3.6/dist-packages/futu/quote/open_quote_context.py", line 11, in
from futu.common.open_context_base import OpenContextBase, ContextStatus
File "/usr/local/lib/python3.6/dist-packages/futu/common/open_context_base.py", line 11, in
from futu.common.utils import
File "/usr/local/lib/python3.6/dist-packages/futu/common/utils.py", line 8, in
from futu.common.conn_mng import
File "/usr/local/lib/python3.6/dist-packages/futu/common/conn_mng.py", line 5, in
from futu.common.constant import *
File "/usr/local/lib/python3.6/dist-packages/futu/common/constant.py", line 140, in
from futu.common.pb import Trd_Common_pb2
File "/usr/local/lib/python3.6/dist-packages/futu/common/pb/Trd_Common_pb2.py", line 17, in
import Common_pb2 as Common__pb2
File "/usr/local/lib/python3.6/dist-packages/futu/common/pb/Common_pb2.py", line 107, in
options=None, file=DESCRIPTOR),
TypeError: new() got an unexpected keyword argument 'file'
示例代码
import futu as ft
quote_ctx = ft.OpenQuoteContext(host='127.0.0.1', port=11111) print(quote_ctx.get_market_snapshot('HK.00700')) quote_ctx.close()