hootnot / oanda-api-v20

OANDA REST-V20 API wrapper. Easy access to OANDA's REST v20 API with oandapyV20 package. Checkout the Jupyter notebooks!
MIT License
402 stars 107 forks source link

live account #141

Closed rezaa1 closed 5 years ago

rezaa1 commented 5 years ago

Hi, I can connect successfully to practice account , can not authenticate with live account.

How i can define endpoint for api call to be live account not practice account? Thanks

hootnot commented 5 years ago

Hi, it's all in the docs: https://oanda-api-v20.readthedocs.io/en/latest/oanda-api-v20.html#the-client

default env is practice. When you want to use the live environment pass environment='live' when creating the API instance (and you will need a token for the live environment also)