vnpy / vnpy_ib

VeighNa框架的InteractiveBrokers交易接口
https://www.vnpy.com
MIT License
33 stars 29 forks source link

ERROR 4 10285 您的API版本不支持小数股数量规则。请至少更新至版本至163 #22

Closed lanceyliao closed 10 months ago

lanceyliao commented 1 year ago

6efea86f5e2344b19b1ca7c591fd164

复现方式:订阅IDEALPRO交易所的EUR-USD-CASH品种行情。

vnpy commented 1 year ago

需要升级ibapi版本了

tbradlo commented 1 year ago

same problem for PBR-USD-STK.SMART

tbradlo commented 1 year ago

ib_insync seems to update interface 2 years ago https://github.com/erdewit/ib_insync/commit/5835745dba24bc0162d95404a3c3071d0fa3ba62

ibapi seems not to be maintained actively, there were many updates in ib_incync over the last two years

sources on IB site use Decimal for volume representation, e.g:

def realtimeBar(self, reqId: TickerId, time:int, open_: float, high: float, low: float, close: float, volume: Decimal, wap: Decimal, count: int):

this is not the case for ibapi taken from "pip install":

def realtimeBar(self, reqId: TickerId, time:int, open_: float, high: float, low: float, close: float, volume: int, wap: float, count: int):

tbradlo commented 1 year ago

I fixed this locally by installing sources from IB site AND by edding extra default argument in vnpy_ib / ib_gateway.py:

def error(self, reqId: TickerId, errorCode: int, errorString: str, advancedOrderRejectJson: str = "") -> None:

jxhuliqun138 commented 1 year ago

需要升级ibapi版本了 但是libapi 版本已经2年都没有更新了,请问 这是你们维护的吗 请问该问题是否有解决办法

jxhuliqun138 commented 1 year ago

6efea86f5e2344b19b1ca7c591fd164

复现方式:订阅IDEALPRO交易所的EUR-USD-CASH品种行情。

哈喽,请问这个问题,你已经解决吗?

noranhe commented 1 year ago

可以在API设置中勾选Send Forex market data in compatibility mode in integer units试试看

vnpy commented 10 months ago

已经完成支持更新