这是使用 Python 在 IB 上下订单的代码。此代码有效,但出现一个错误。最后我尝试下订单,但出现错误:
Traceback (most recent call last):
Getting the time from the server...
File "C:/Users/B/PycharmProject/1/api1.py", line 117, in <module>
order1 = order.Order()
AttributeError: type object 'Order' has no attribute 'Order'
IB error id -1 errorcode 2104 string Market data farm connection is OK:usfarm.nj
IB error id -1 errorcode 2104 string Market data farm connection is OK:usfuture
IB error id -1 errorcode 2104 string Market data farm connection is OK:cashfarm
IB error id -1 errorcode 2104 string Market data farm connection is OK:usfarm
IB error id -1 errorcode 2106 string HMDS data farm connection is OK:ushmds.us
IB error id -1 errorcode 2106 string HMDS data farm connection is OK:ilhmds
IB error id -1 errorcode 2106 string HMDS data farm connection is OK:njhmds
1544354853
我想问题出在第 5 行和第 6 行。当我删除它们时,我得到“名称'订单'未定义”。我想我只是错误地定义了它。也许有人面临类似的问题/错误?
ibeautiful
慕运维8079593
相关分类