Closed bogomazov closed 9 years ago
That's oanda indicating that the credentials that you've provided are invalid. I had noticed the same problem with the SANDBOX environment (which doesn't need authentication, I believe, but this lib does require it) - if you're certain that your credentials are correct, try using the PRACTICE environment (and post more code so that we can see what you're actually running).
@bogomazov I've had a look further at this and using the PRACTICE environment instead should work for you.
I've also addressed the problems with the sandbox in PR #13. Oanda sets up the sandbox environment without the normal account IDs that it gives you, so you need to create an account using the API before you can make other calls. Once #13 is merged you'll be able to use the SANDBOX environment using the instructions there.
Pending to generate a new pypi version (0.7)
Just followed instructions from README
Traceback (most recent call last): File "oanda.py", line 54, in
access_token=API_TOKEN
File "/usr/local/lib/python2.7/site-packages/pyoanda/client.py", line 23, in init
if not self.get_credentials():
File "/usr/local/lib/python2.7/site-packages/pyoanda/client.py", line 36, in get_credentials
response = self._Clientcall(uri=url)
File "/usr/local/lib/python2.7/site-packages/pyoanda/client.py", line 73, in call
raise BadRequest(msg)
pyoanda.exceptions.BadRequest: OCode-404: The account ID provided is invalid