Let’s write a cryptocurrency bot. (part 1)
joel degan
12413

Hey Joel. Very good guide.

For OANDA, you might want to let people know the code needs to be slightly different if you have a new account.

From OANDA:

  • Use v20 REST API only if you have a v20 account
  • Use v1 REST API if your account id contains only digits (ie. 2534253) as it is a legacy account

Using V20 it looks something like:

url = “https://” + domain + “/v3/accounts/” + account_id + “/pricing/stream”
 headers = {‘Authorization’ : ‘Bearer ‘ + access_token,
 # ‘X-Accept-Datetime-Format’ : ‘unix’
 }
 params = {‘instruments’ : instruments}

Show your support

Clapping shows how much you appreciated Neil Leonard’s story.