Skip to main content

This library currently implements the features released under version 3.0.1 of OANDA's REST API.

Project description

PyPI latest PyPI Version Coverage Status Travis Build Status Code Health PyPI License

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.

Requirements

This project requires:

  • Python 3.4 or earlier

  • git client

  • virtualenvwrapper/virtualenv for local development

Installation

Right now, this library has not yet been pushed to pypi, so as of now you can’t use pip to install it. (But will be soon in pypi)

$ git clone git@github.com:gustavooferreira/oandapy.git
$ cd oandapy
$ python setup.py install

USAGE

  1. Create a account on https://www.oanda.com to get a API Access Token.

  2. 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()

  for acc in result.accounts:
    print(acc.aid)
except oanda.OandaError as exc:
  print(str(exc))

Contributing

Please send pull requests, very much appreciated.

  1. Fork the repository on GitHub.

  2. Create a virtualenv.

  3. Install requirements. pip install -r requirements-dev.txt

  4. Install pre-commit. pre-commit install

  5. Make a branch off of master and commit your changes to it.

  6. Create a Pull Request with your contribution

NOTES

  • Oanda API REST-v20 is still under development, some functionality have not yet been implemented (Streaming, 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.1 (2018-12-06)

  • initial release using changes file

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oandapy-0.0.1.tar.gz (21.8 kB view hashes)

Uploaded Source

Built Distribution

oandapy-0.0.1-py3-none-any.whl (31.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page