Oanda REST-v20 API wrapper
NOTE: DO NOT USE THIS LIBRARY ON PRODUCTION! It is under heavy development and still lacks testing suites. It is also partially documented.
OVERVIEW
OANDAPY is a python3 wrapper for Oanda’s REST API v20. This library currently implements the features released under version 3.0.1 of OANDA’s REST API.
Head over to OANDA’s REST API v20 docs to go through their documentation. This repository start on fork from Gustavo Ferreira and have a massive change later
Requirements
This project requires:
Python 3.4 or earlier
git client
virtualenvwrapper/virtualenv for local development
Installation
$ pip install oandapy
Or, you can download the source and
$ git clone git@github.com:rhenter/oandapy.git
$ cd oandapy
$ python setup.py install
USAGE
Create a account on https://www.oanda.com to get a API Access Token.
Import the oandapy module and create an instance with your access token:
from oandapy import APIv20
from oandapy.exceptions import OandaError
access_token = ""
con = APIv20(environment="practice", access_token=access_token)
try:
result = con.account.get_accounts().as_obj()
for acc in result.accounts:
print(acc.aid)
except oanda.OandaError as exc:
print(str(exc))
Contributing
Please send pull requests, very much appreciated.
Fork the repository on GitHub.
Create a virtualenv.
Install requirements. pip install -r requirements-dev.txt
Install pre-commit. pre-commit install
Make a branch off of master and commit your changes to it.
Create a Pull Request with your contribution
NOTES
Oanda API REST-v20 is still under development, some functionality have not yet been implemented (Pricing History, Forex Labs), but I will keep an eye on it, and as soon as it gets implemented I will update this library accordingly.
Use this library at your own risk.
Happy hunting on the markets!!
Changelog
0.0.2
Update readme
0.0.1 (2018-12-06)
initial release using changes file
Metadata
Release files for oandapy 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| oandapy-0.0.2.tar.gz | 21.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| oandapy-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 53.3 kB
Release files / oandapy-0.0.2.tar.gz
| Download URL | oandapy-0.0.2.tar.gz |
|---|---|
| Size | 21.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6f0db0ab330925a5d19ef87403f17de3b4b393006e4b42cc9607555bf736b861
|
|
BLAKE2b-256 checksum How to use checksums |
3e878e112a445c513ce1a0a20d7b9e7a6e94b4fa52c1508ee28d1fad80b6a5ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0
|
Release files / oandapy-0.0.2-py3-none-any.whl
| Download URL | oandapy-0.0.2-py3-none-any.whl |
|---|---|
| Size | 31.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
907bd5de510f4d9baf5701e46431bac1a1592cc5587aec3b3c4b4ce17fa41059
|
|
BLAKE2b-256 checksum How to use checksums |
c1c1f84a9be71823e180c2f4a017c9d276b29e1e928591508ab9aed6815aa144
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0
|