【问题标题】:Interactive Brokers - TWS API - Minimum Price Increment盈透证券 - TWS API - 最低价格增量
【发布时间】:2021-06-10 13:08:43
【问题描述】:

我正在尝试创建一个将在 STK 市场下订单的 TWS API 脚本。我发现有各种市场规则,规定最低价格增量。我查询系统以找出marketRuleIds,但我无法弄清楚如何解释来自reqMarketRule 的结果,例如市场规则 ID 557 提供以下结果:

Price Increment. LowEdge: 0.000000, Increment: 0.000100
Price Increment. LowEdge: 1.000000, Increment: 0.010000

市场规则 ID 26 提供以下结果:

Price Increment. LowEdge: 0.000000, Increment: 0.010000

市场规则 ID 1916 提供以下结果:

Price Increment. LowEdge: 0.000000, Increment: 0.000001
Price Increment. LowEdge: 0.001000, Increment: 0.000002
Price Increment. LowEdge: 0.002000, Increment: 0.000005
Price Increment. LowEdge: 0.005000, Increment: 0.000010
Price Increment. LowEdge: 0.010000, Increment: 0.000020
Price Increment. LowEdge: 0.020000, Increment: 0.000050
Price Increment. LowEdge: 0.050000, Increment: 0.000100
Price Increment. LowEdge: 0.100000, Increment: 0.000200
Price Increment. LowEdge: 0.200000, Increment: 0.000500
Price Increment. LowEdge: 0.500000, Increment: 0.001000
Price Increment. LowEdge: 1.000000, Increment: 0.002000
Price Increment. LowEdge: 2.000000, Increment: 0.005000
Price Increment. LowEdge: 5.000000, Increment: 0.010000
Price Increment. LowEdge: 10.000000, Increment: 0.020000
Price Increment. LowEdge: 20.000000, Increment: 0.050000
Price Increment. LowEdge: 50.000000, Increment: 0.100000
Price Increment. LowEdge: 100.000000, Increment: 0.200000
Price Increment. LowEdge: 200.000000, Increment: 0.500000
Price Increment. LowEdge: 500.000000, Increment: 1.000000

当我尝试在 TWS 应用程序中使用市场规则 1916 对 STK 进行交易时,我可以看到增量为 0.50 GBP,但我不确定如何将其追溯到上述输出。

你能帮我弄清楚吗?

【问题讨论】:

    标签: python price interactive-brokers tws


    【解决方案1】:

    我从 Reddit 对同一问题的评论中得到了答案。谢谢major_domo 的帮助!

    摘自所提供的答案: "

    Price Increment. LowEdge: 100.000000, Increment: 0.200000
    Price Increment. LowEdge: 200.000000, Increment: 0.500000
    Price Increment. LowEdge: 500.000000, Increment: 1.000000
    

    或价格高于100,最小增量为0.2;对于高于 200 的价格,最小增量为 0.5;对于 500 以上的价格,它是 1。

    如果 TWS 显示增量为 0.5,我假设当前价格在 200 到 500 之间。 "

    【讨论】:

    • 那些是便士还是英镑?应该使用一个价格放大镜字段,但 IIRC 它只是英国的一个因素。我不使用它。
    • 找到帖子。顺便说一句,该线程中有很多信息。 groups.io/g/twsapi/message/45468
    • 评论中的价格是英镑,但这是个好点,我想每个安全类型都需要明确检查
    【解决方案2】:

    如果要确定价格增量,可以从合约明细中获取信息。 minTick 字段为您提供合约的最小价格增量。例如,在合约“QQQ”上,minTick 为 0.01,这意味着您可以提交以美元为单位的订单,增量为 1 美分。小数点右侧超过 2 位的订单将失败。

    【讨论】:

    • 嗯,对于美国来说似乎还可以,就像你说的那样,但是例如对于英国股票,例如ASCLLSEGBP 交易,minTick1e-060.000001。当我试图下一个止盈为432.65 的括号订单时,系统给出了一个错误:ERROR 21 110 The price does not conform to the minimum price variation for this contract. 当我查看交易平台时,我可以看到增量是整数,这只股票没有小数。有什么建议吗?
    • 我也对此感到困惑。当我使用 IB TWS 软件查看 ASCL 时,它以 0.20 美元的增量定价。我没有使用 API 交易非美国合同的经验。我想知道它是否与货币转换有关;即,与合约相关的货币是 GBP,minTick 也是 GBP。
    猜你喜欢
    • 2015-07-14
    • 1970-01-01
    • 2015-12-23
    • 2021-12-07
    • 2021-04-30
    • 1970-01-01
    • 2017-05-28
    • 2014-09-27
    相关资源
    最近更新 更多