help on oandav20
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.
dasch last edited by
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.