Oanda account connection, order sending and data feed
Project description
Oanda Base Package
Uses the REST v20 API to access your Oanda account, send orders and receive data.
Installation
Create a virtual environment and activate it.
for ref: https://docs.python.org/3/tutorial/venv.html
pip install oandabase
Create a .env
file in the root folder and add your account number and token. You can add multiple accounts here e.g. live, practice, different accounts for different strategies etc. The classes in the oanda.py
module are setup to default to account=PRACTICE_ACCOUNT
and token=PRACTICE_TOKEN
, when writing strategies to use different accounts simply pass these as keyword arguments to replace the default ones.
Add .env
to your .gitignore to keep your account details local.
PRACTICE_ACCOUNT=XXX-XXX-XXXXXXXX-XXX
PRACTICE_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Usage:
Built to be a component of other systems. Read through the classes and they should explain themselves.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for oandabase-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c209a3c527536d6124633ff754659c3af86a774d6471ce0e8ee8c816d4976a3 |
|
MD5 | 78a122eb613e9bb7dde8376632b9fffd |
|
BLAKE2b-256 | b2683ec62137af54b7f4dd3509001c1e777c8bdfc1dcfb0541ca26bc058323cc |