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/

    has no attribute 'CCXTBroker'// After I upgrade to the latest version, it's solved.

    General Code/Help
    2
    2
    683
    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.
    • A
      Alex Wang last edited by Alex Wang

      I install ccxt branch, and the code looks like below:

      broker = bt.brokers.CCXTBroker(exchange='okex', currency='USD', config=broker_config)
      cerebro.setbroker(broker)
      

      when running the script, it reports:

      Traceback (most recent call last):
      File "d:/My Documents/Python Scripts/liveStrategyEngine/bt_ccxt_test2.py", line 171, in <module>
      broker = bt.brokers.CCXTBroker(exchange='okex', currency='USD', config=broker_config)
      AttributeError: module 'backtrader.brokers' has no attribute 'CCXTBroker'

      Can anyone help to figure it out what's the problem? Thanks.

      1 Reply Last reply Reply Quote 0
      • C
        cgd last edited by

        @alex-wang said in has no attribute 'CCXTBroker'// After I upgrade to the latest version, it's solved.:

        config=broker_config

        Hi Alex - I'm no expert but I think you need to create a config for ccxt as well

        Traceback (most recent call last): File "d:/My Documents/Python Scripts/liveStrategyEngine/bt_ccxt_test2.py", line 171, in <module> broker = bt.brokers.CCXTBroker(exchange='okex', currency='USD', config=broker_config) AttributeError: module 'backtrader.brokers' has no attribute 'CCXTBroker'

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Copyright © 2016, 2017, 2018 NodeBB Forums | Contributors
        $(document).ready(function () { app.coldLoad(); }); }