You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

IB Python API中PEG BEST订单因PostToAts属性报错无法提交的问题求助

IB Python API中PEG BEST订单因PostToAts属性报错无法提交的问题求助

我在Python脚本里尝试提交PEG BEST订单时遇到了麻烦——订单能在Trader Workstation里显示,但就是无法被传输出去。Python控制台里弹出了这两条错误提示:

Error 68 1773000244085 10274 The 'PostToATS' order attribute may not be specified for this order or is invalid.
Error 67 1773000244000 201 Order rejected - reason:This order type is not allowed w/o PostToAts for specified destination

以下是我代码里的核心部分:

o = Order()

o.action = action
o.orderType = "PEG BEST"
o.totalQuantity = qty
o.lmtPrice = round(limit_price, 2)
o.exchange = "IBKRATS"
o.tif = "DAY"
o.competeAgainstBestOffset = 0.02
o.midOffsetAtWhole = mid_offset_whole
o.midOffsetAtHalf = mid_offset_half
o.postToAts = 1

self.placeOrder(oid, self.contract, o)

不管我用API版本10.37.02还是10.44.01,都会弹出同样的错误提示。

我试过用AI查询但没找到有用的解决办法,希望能得到大家的建议!

备注:内容来源于stack exchange,提问作者Adam Wildavsky

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.13 18:35:28