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/

    help on oandav20

    General Code/Help
    2
    2
    323
    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.
    • X
      xiaoliangbuaa last edited by xiaoliangbuaa

      Hi there, I am trying to test https://github.com/ftomassetti/backtrader-oandav20. But, I am new to Oanda. The curl example on the Oanda website can work:
      curl -H "Authorization: Bearer 51f5c1ef90f273e64641c88a5d611fa9-dff160a3727b5fd16634964895c6fc99" https://api-fxpractice.oanda.com/v3/accounts

      However, when running oandav20test.py with the parameters "--account Bearer --token 51f5c1ef90f273e64641c88a5d611fa9-dff160a3727b5fd16634964895c6fc99 --data0 GBP_USD", the following error is obtained:
      Datetime, Open, High, Low, Close, Volume, OpenInterest, SMA
      ***** STORE NOTIF: GET https://api-fxpractice.oanda.com:443/v3/accounts/Bearer/instruments?instruments=GBP_USD expected status 200, got 400 (Bad Request)
      ***** DATA NOTIF: NOTSUBSCRIBED

      Anyone can help? Thanks in advance.

      1 Reply Last reply Reply Quote 0
      • D
        dasch last edited by

        Hi

        if the question is still open:

        you need to provide an account number, the value "Bearer" for account is wrong. You can find the account at oanda.

        Cheers

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