Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

    backtrader and Interactive Brokers. How to connect?

    General Code/Help
    2
    4
    1047
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Luca Somigli
      Luca Somigli last edited by

      I am trying trying to connect backtrader to IB for live trading. I do know there is IBpy for that, but after going to their github page for enlightenment, they warn you for deprecation and send you back to the IB API Docs website - which tbh is a mess.. really unclear.

      Did anyone try and succeed in this? Would love to see a clear answer to this.

      1 Reply Last reply Reply Quote 0
      • vladisld
        vladisld last edited by

        What is the problem exactly? IBpy, used by Backtrader, seems to be working ok so far.

        1 Reply Last reply Reply Quote 0
        • Luca Somigli
          Luca Somigli last edited by

          Just wondering wether it makes still sense to use IBPy rather than TWS own python module. If IBPy works to this date, then I probably will just use that.

          1 Reply Last reply Reply Quote 0
          • vladisld
            vladisld last edited by

            Working with IB in Backtrader, you are not exposed to IBpy API at all. Even more , the strategy code should not even know what broker it is working with or even whether or not the broker is live or simulated.

            So even if in the future, the IBBroker implementation in Backtrader will switch from IBpy to native TWS python API or IB-insync library - it should have near zero impact on your code anyway.

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors