{"action":"created","issue":{"url":"https://api.github.com/repos/oanda/oandapy/issues/40","repository_url":"https://api.github.com/repos/oanda/oandapy","labels_url":"https://api.github.com/repos/oanda/oandapy/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/oanda/oandapy/issues/40/comments","events_url":"https://api.github.com/repos/oanda/oandapy/issues/40/events","html_url":"https://github.com/oanda/oandapy/issues/40","id":191391765,"number":40,"title":"OANDA API returned error code 0 (INTERNAL_SERVER_ERROR) ","user":{"login":"houmie","id":1832933,"avatar_url":"https://avatars.githubusercontent.com/u/1832933?v=3","gravatar_id":"","url":"https://api.github.com/users/houmie","html_url":"https://github.com/houmie","followers_url":"https://api.github.com/users/houmie/followers","following_url":"https://api.github.com/users/houmie/following{/other_user}","gists_url":"https://api.github.com/users/houmie/gists{/gist_id}","starred_url":"https://api.github.com/users/houmie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houmie/subscriptions","organizations_url":"https://api.github.com/users/houmie/orgs","repos_url":"https://api.github.com/users/houmie/repos","events_url":"https://api.github.com/users/houmie/events{/privacy}","received_events_url":"https://api.github.com/users/houmie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-23T22:17:30Z","updated_at":"2016-11-24T08:57:27Z","closed_at":null,"body":"Hey guys,\r\n\r\nJust wondering if you are aware that this wrapper doesn't work with the latest API version.  Considering all new signup demo accounts utilise the new API version, that's bad news.\r\n\r\nThis happens when I do a create_order:\r\n\r\n```\r\ntrade_id = oanda.create_order(OANDA_ACCOUNT_ID, instrument=\"EUR_USD\",\r\n                                  units=1000,\r\n                                  side='buy',\r\n                                  type='market', price=1)\r\n```\r\nTraceback:\r\n\r\n```\r\n------ System online ------- 2016-11-24 01:24:19.212130\r\nBuy at 1.05493\r\nTraceback (most recent call last):\r\n  File \"/Users/houmie/projects/forex_algotrading/post3/runner.py\", line 30, in <module>\r\n    main()\r\n  File \"/Users/houmie/projects/forex_algotrading/post3/runner.py\", line 24, in main\r\n    type='market', price=1)\r\n  File \"/Users/houmie/.pyenv/versions/venv2712/lib/python2.7/site-packages/oandapy/oandapy.py\", line 77, in create_order\r\n    return self.request(endpoint, \"POST\", params=params)\r\n  File \"/Users/houmie/.pyenv/versions/venv2712/lib/python2.7/site-packages/oandapy/oandapy.py\", line 284, in request\r\n    raise OandaError(content)\r\noandapy.exceptions.OandaError: OANDA API returned error code 0 (INTERNAL_SERVER_ERROR) \r\n```"},"comment":{"url":"https://api.github.com/repos/oanda/oandapy/issues/comments/262722816","html_url":"https://github.com/oanda/oandapy/issues/40#issuecomment-262722816","issue_url":"https://api.github.com/repos/oanda/oandapy/issues/40","id":262722816,"user":{"login":"houmie","id":1832933,"avatar_url":"https://avatars.githubusercontent.com/u/1832933?v=3","gravatar_id":"","url":"https://api.github.com/users/houmie","html_url":"https://github.com/houmie","followers_url":"https://api.github.com/users/houmie/followers","following_url":"https://api.github.com/users/houmie/following{/other_user}","gists_url":"https://api.github.com/users/houmie/gists{/gist_id}","starred_url":"https://api.github.com/users/houmie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houmie/subscriptions","organizations_url":"https://api.github.com/users/houmie/orgs","repos_url":"https://api.github.com/users/houmie/repos","events_url":"https://api.github.com/users/houmie/events{/privacy}","received_events_url":"https://api.github.com/users/houmie/received_events","type":"User","site_admin":false},"created_at":"2016-11-24T08:57:27Z","updated_at":"2016-11-24T08:57:27Z","body":"I changed it as you say and still the same error:\r\n\r\n```\r\ntrade_id = oanda.create_order(account_id=OANDA_ACCOUNT_ID, instrument=\"EUR_USD\",\r\n                                  units=1000,\r\n                                  side='buy',\r\n                                  type='market')\r\n```\r\n\r\nThe issue is that the underlying API has changed for new accounts.  Your test account is still using the old API, hence when you use this wrapper with your old account credentials it still works.  Create a new practice account and see it for yourself. :)\r\n"}}
{"actor":{"display_login":"houmie"}}