Skip to main content

Oanda REST-v20 API wrapper

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

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

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

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

  • DO NOT USE THIS LIBRARY ON PRODUCTION! It is under heavy development and still lacks testing suites. It is also partially documented.

  • Use this library at your own risk.

  • Happy hunting on the markets!!

Changelog

0.0.4

  • Change Setup

0.0.3

  • Add Travis and Coveralls support

  • Remove Enum feature

0.0.2

  • Update readme

0.0.1 (2018-12-06)

  • initial release using changes file

Metadata

Release files for oandapy 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for oandapy 0.0.4
File Size Uploaded
oandapy-0.0.4.tar.gz 13.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for oandapy 0.0.4
File Interpreter ABI Platform
oandapy-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 45.0 kB

Release files / oandapy-0.0.4.tar.gz

Download URL oandapy-0.0.4.tar.gz
Size 13.5 kB
Tags Source
SHA-256 checksum
How to use checksums
46ec11aefcf476c59be3f4fd0a2ee56108ecc9d89d09f8cc87ce60086dfc4c84
BLAKE2b-256 checksum
How to use checksums
d43932564ca24b169113b7b40a769d9a7494d493a4267d0616a840d0116de4ee
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.4-py3-none-any.whl

Download URL oandapy-0.0.4-py3-none-any.whl
Size 31.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eb3de5774130056d1aa600efa4f6141766ea51a14f1e36a96985f57ce35dbb33
BLAKE2b-256 checksum
How to use checksums
ff8ee394a1a6c5275dd50af78c626cc9884390f0d9add5610eb13bbce4e5a3f6
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 history Release notifications | RSS feed

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.5

2 release files

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page