Oanda demo not connecting...

Posted By: 1ND1G0

Oanda demo not connecting... - 02/08/21 10:13

I've never had issues in the past connecting to my Oanda demo account via Zorro, however, when I've been trying to connect recently I am getting an error.

In order to try with some clean settings, I created a new sub-account, re-generated the API token, and then used these details in the User ID / Password Boxes. I have selected Demo as the account type, and am using the Oanda V20 option in the dropdown.

Still no luck, and getting the attached message, which would indicate something wrong on the Oanda side (due to ! at the start of the message) - is anyone else getting this from them too?

I had been testing with 2.35 however just to rule out that this was causing the issue I've reverted back to 2.30 however no change.

Attached picture 2021-02-08 10_12_09-Window.png
Posted By: MaeLin

Re: Oanda demo not connecting... - 02/08/21 11:38

I have the same problem with my Zorro S subscription and Oanda. I suddenly cannot connect to my demo account and get the same message "Invalid Access Token". I was hoping it was a temporary Oanda maintenance problem but its been a while now so I am suspecting yet another Zorro problem. I am glad you posted this issue. I was pulling my hair out!!
Posted By: 1ND1G0

Re: Oanda demo not connecting... - 02/08/21 12:43

Ah, interesting! Well, as they say, a problem shared is a problem halved laugh

Could anyone confirm if other broker connections for demo accounts are working as expected, as I have a couple of strategies that I'd like to forward test, so if needed I could sign up with someone else for now.

@Zorro Team: can you also advise if the Oanda demo connection is a known bug on this side, or if we should chase Oanda to look into this on theirs?
Posted By: Morris

Re: Oanda demo not connecting... - 02/08/21 14:55

For what it's worth, here Zorro also suddenly stopped connecting to Oanda demo, with the same error message. Oanda live works. Also, Python connection via oandapyV20 works on live and on demo.

=> Looks like something is acting up specifically between Zorro and Oanda fxPractice.
Posted By: MaeLin

Re: Oanda demo not connecting... - 02/08/21 21:04

I forgot to mention that my backup trading system uses the Oanda REST V20 as a direct connect. I use the same API token as my Zorro strategies and it connects fine. There are no problems with the direct connection. It is written in NodeJS. This is REALLY BAD!!
Posted By: JayWilly

Re: Oanda demo not connecting... - 02/09/21 14:11

I am experiencing the same thing...same error message. Live account is not a problem to get in. Started yesterday afternoon EST. Currently in conversation with someone at Oanda to determine if it is on their end or Zorro. I am using Zorro 2.25 by the way.
Posted By: JayWilly

Re: Oanda demo not connecting... - 02/09/21 14:34

Does anyone know how to view the commands being sent via the Oanda plugin?
Posted By: 1ND1G0

Re: Oanda demo not connecting... - 02/09/21 20:52

I've just realised that a fairly simple workaround to this Oanda plugin is to use the MT4/MT5 bridge and connect to a demo Oanda account in MetaTrader.

It's a little bit more faff as I need to also run this application in the background, and there could be some limitations vs. the direct API, but at least I can start forward testing my strategy and see how it gets on.

Anyway, I'm sure others have already utilised this approach but figured it was worth sharing on the off-chance it could help someone else.
Posted By: an41

Re: Oanda demo not connecting... - 02/11/21 03:24

it appears Zorro's API integration with Oanda is broken. likely because it can't/isn't following redirects
one can run zorro -diag to get diagnostic info
Zorro Diag.txt
script compiling............................
Functions..
Load 0 D:\Zorro\Zorro_FX\Plugin\Oanda.dll
Login Oanda V20 0->2
Login 0 Oanda V20..
BrokerLogin
HTTP: https://api-fxpractice.oanda.com/v3/accounts,(null),Authorization: Bearer CORRECT-API-KEY
!invalid access token? : 0 1399.663600 ms
Can't connect!
Raus
Neural
Close files

I can connect to oanda via APIs using curl and it works fine. It appears Oanda to returning HTTP redirects for the APIs.

Happens in v 2.30 and 2.35 beta.

Are Zorro folks/developers seeing messages in this forum OR how to contact them to fix it?
Posted By: MaeLin

Re: Oanda demo not connecting... - 02/11/21 04:43

Yeah, It's $45 bucks to enter a support ticket. Otherwise, we have to wait until they get around to looking into this forum. I found it is good to have backup trading systems when it comes to this platform. It is the third day into this problem and still no official response from the engineering team. Hopefully, the reply number will keep increasing until it gets their attention.
Posted By: kzhao

Re: Oanda demo not connecting... - 02/11/21 04:57

https://api-fxpractice.oanda.com/v3/accounts/<account_id> is not redirected by Oanda. It seems Zorro needs to query the specified account, not all accounts.
Posted By: jcl

Re: Oanda demo not connecting... - 02/11/21 11:10

We confirm this problem. Apparently there's some issue since some days with the Oanda REST API. With curl it doesn't work either. We're in contact with them and will post here when we got new information.
Posted By: jcl

Re: Oanda demo not connecting... - 02/11/21 11:37

The reason of the problem is that a certain API command, for reading the account list, does not work anymore since last week. This does not affect running sessions, but it affects login to Oanda.

We've uploaded a modified Oanda plugin that does not use this command. You can download it here: http://opserver.de/down/Oanda.zip.

You can login with this plugin, but must now enter your account ID in the User field. Leaving the field open does not work anymore.

I hope that Oanda fixes the problem soon.
Posted By: an41

Re: Oanda demo not connecting... - 02/11/21 15:20

Thank you jcl. I can confirm this dll solves this problem. Much appreciated.

It does work with curl. HTTP redirects need to be followed. curl -L

curl -v -H "Content-Type: application/json" -H "Authorization: Bearer DummyAPIKey" "https://api-fxpractice.oanda.com/v3/accounts"
Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x55746ec5d800)
GET /v3/accounts HTTP/2
Host: api-fxpractice.oanda.com
user-agent: curl/7.68.0
accept: /
content-type: application/json
curl -v -H "Content-Type: application/json" -H "Authorization: Bearer DummyAPIKey" ""https://api-fxpractice.oanda.com/v3/users/@/accounts"
{"accounts":[{"id":"101-001-FAKENUMBER-001","tags":[]}]}
curl -L -H "Content-Type: application/json" -H "Authorization: Bearer DummyAPIKey" "https://api-fxpractice.oanda.com/v3/accounts"
{"accounts":[{"id":"101-001-FAKENUMBER-001","tags":[]}]}
Posted By: kalmar

Re: Oanda demo not connecting... - 03/01/21 12:50

FYI: if someone needs to hear this for me the connections to Oanda demo accounts works now
Posted By: jcl

Re: Oanda demo not connecting... - 03/02/21 12:47

We have implemented a redirection in the latest Zorro version. It should have solved that problem.
© 2024 lite-C Forums