This repo contains a number of examples to demonstrate how to use OANDA's REST-V20 API with the oandapyV20 Python API-wrapper.
Clone the repository:
$ git clone https://github.com/hootnot/oandapyV20-examples
Install oandapyV20 and other pypi-packages the examples depend on. Maybe you want to do this from a virtual environment.
$ pip install -r requirements.txt
Access to the OANDA V20 REST-API requires a token. If you do not have a token you can obtain one. Check developer.oanda.com for details. Edit the file token.txt and put the token in it.
If you have a token, you have an account. Edit the file account.txt and put the accountID in it. Verify that it is your V20 accountID!
Make sure you have made the setup based on a practice account ! Leveraged trading is high risk. Losses can exceed investment!
All examples can be run from the cloned repo directory as:
$ python src/<example.py>
The oanda-api-v20 / oandapyV20 software is a personal project. I have no prior or existing relationship with OANDA.
If you have any questions regarding this software, please take a look at the documentation first:
- oandapyV20 : http://oanda-api-v20.readthedocs.io/en/latest/?badge=latest
- OANDA developer docs : http://developer.oanda.com
- examples : https://github.com/hootnot/oandapyV20-examples
- Github: https://github.com/hootnot/oanda-api-v20 check the open and closed issues
If you still have questions/issues you can open an issue on Gitub: https://github.com/hootnot/oanda-api-v20