happydasch / btoandav20

Support for Oanda-V20 API in backtrader
Apache License 2.0
131 stars 52 forks source link

cannot connect #53

Closed einnairo closed 4 years ago

einnairo commented 4 years ago

Facing issue with connecting after upgrading to the new btoandav20.

Copy the messages here, I do get the 1st 500 backfill data, but there after is an issue: on clicking the link provided by store, the message is: {"errorMessage":"Insufficient authorization to perform request."} As u can see below, candle 501 is still coming in.

...
Day, 500,2020-06-19 11:20:00,1.11932,1.11934,1.11912,1.11922,29
***** DATA NOTIFY: LIVE
***** STORE NOTIFY: v20 REST request to https://stream-fxpractice.oanda.com:443/v3/accounts/XXX-XXX-XXXXXXXX-XXX/transactions/stream has timed out (stream)
***** STORE NOTIFY: Trying to reconnect streaming events (1 of -1)
***** STORE NOTIFY: v20 REST request to https://stream-fxpractice.oanda.com:443/v3/accounts/XXX-XXX-XXXXXXXX-XXX/transactions/stream has timed out (read)
***** STORE NOTIFY: Trying to reconnect streaming events (2 of -1)
***** STORE NOTIFY: v20 REST request to https://stream-fxpractice.oanda.com:443/v3/accounts/1XXX-XXX-XXXXXXXX-XXX/transactions/stream has timed out (read)
***** STORE NOTIFY: Trying to reconnect streaming events (3 of -1)
***** STORE NOTIFY: v20 REST request to https://stream-fxpractice.oanda.com:443/v3/accounts/XXX-XXX-XXXXXXXX-XXX/transactions/stream has timed out (read)
***** DATA NOTIFY: CONNBROKEN
***** STORE NOTIFY: v20 REST request to https://stream-fxpractice.oanda.com:443/v3/accounts/XXX-XXX-XXXXXXXX-XXX/pricing/stream?instruments=EUR_USD has timed out (stream)
***** DATA NOTIFY: LIVE
***** STORE NOTIFY: Trying to reconnect streaming events (4 of -1)
***** STORE NOTIFY: v20 REST request to https://stream-fxpractice.oanda.com:443/v3/accounts/XXX-XXX-XXXXXXXX-XXX/transactions/stream has timed out (stream)
***** STORE NOTIFY: Trying to reconnect streaming events (1 of -1)
***** STORE NOTIFY: v20 REST request to https://stream-fxpractice.oanda.com:443/v3/accounts/XXX-XXX-XXXXXXXX-XXX/transactions/stream has timed out (stream)
***** STORE NOTIFY: Trying to reconnect streaming events (1 of -1)
***** STORE NOTIFY: v20 REST request to https://stream-fxpractice.oanda.com:443/v3/accounts/XXX-XXX-XXXXXXXX-XXX/transactions/stream has timed out (read)
Day, 501,2020-06-19 11:21:00,1.11925,1.11972,1.11917,1.11964,0
***** STORE NOTIFY: Trying to reconnect streaming events (2 of -1)
***** STORE NOTIFY: v20 REST request to https://stream-fxpractice.oanda.com:443/v3/accounts/XXX-XXX-XXXXXXXX-XXX/transactions/stream has timed out (stream)
***** STORE NOTIFY: Trying to reconnect streaming events (1 of -1)
***** STORE NOTIFY: v20 REST request to https://stream-fxpractice.oanda.com:443/v3/accounts/XXX-XXX-XXXXXXXX-XXX/transactions/stream has timed out (read)
***** STORE NOTIFY: Trying to reconnect streaming events (2 of -1)
...

I regenerated my Api key but its the same messages. Also to note, I am not trying this when market is closed.

happydasch commented 4 years ago

increase your stream_timeout

the link is just the request url, without token, you don't get anything from it (by clicking on it, you just open the request url)