/api/v2/...
- Install Prerequisites
- python3.6
- pip
- virtualenv
- virtualenvwrapper
- run commands to create virtual env
$ mkvirtualenv --python=/usr/local/bin/python3 ITF` $ workon ITF
- Clone and setup Django env
- clone https://github.com/IntelligentTrading/data-sources.git
$ cd data-sources
$ pip install -r requirements.txt
- Local Env Settings
- make a copy of
settings/local_settings_template.py
and save assettings/local_settings.py
- add private keys and passwords as needed
- Connect to Database
- install PostgreSQL server and create local database
- run
$ python manage.py migrate
to setup schemas in local database - AND/OR
- connect to read-only Amazon Aurora DB
- set database connection settings in your
settings/local_settings.py
- Run Local Server
$ python manage.py runserver
- open http://localhost:8000/
- view logs and debug as needed
- Run Worker Services
$ python manage.py trawl_poloniex
- ...
- Query DB in Shell
-
$ python manage.py shell
> from apps.indicator.models import Price > eth_price = Price.objects.filter(currency="ETH").order_by('-timestamp').first() > print(eth_price.satoshis)