Metadata-Version: 2.1
Name: oandabase
Version: 0.1.0
Summary: Oanda account connection, order sending and data feed
Home-page: https://github.com/ant358/oanda-base/
Author: Anthony Wynne
Author-email: 12174019+ant358@users.noreply.github.com
License: UNKNOWN
Project-URL: Bug Tracker, https://github.com/ant358/oanda-base/issues
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE

[![Build Status](https://travis-ci.com/ant358/oanda-base.svg?branch=main)](https://travis-ci.com/ant358/oanda-base)
[![codecov](https://codecov.io/gh/ant358/oanda-base/branch/main/graph/badge.svg?token=AYQZW7TNAN)](https://codecov.io/gh/ant358/oanda-base)
# 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.  

