Set of APIs for stocks research and portfolio backtesting. Unauthenticated users have limited access to APIs. Authentication implemented using JWT.
- Linux based OS (ex. Ubuntu)
- Python >= 3.6
- Docker + docker-compose
- Datasets: https://mega.nz/folder/kchWnKaZ#oQSQyIU4QxGBSVmEjsLaTQ
-
Install Python3.6 + pip
- sudo apt-get update
- sudo apt-get install python3.6
- python3.6 --version
- sudo apt install python3-pip
- pip3 --version
-
Install requirements.txt (from src)
- pip3 install -r requirements.txt
-
Install docker and docker-compose
-
Create .env file following .env_template (default FLASK_SECRET=thisissecret)
-
Update docker-compose.yml volume mappings (set project path on local pc)
-
Start elasticsearch (from src)
- docker-compose up elasticsearch
-
Start kibana (from src)
- docker-compose up kibana
-
Download datasets from https://mega.nz/folder/kchWnKaZ#oQSQyIU4QxGBSVmEjsLaTQ
- save files to stock-market/data
-
Import datasets (from src, with project root set to src)
- python3.6 scripts/init_es_database/main.py
- python3.6 scripts/populate_es_database/main.py
-
Start webserver
- docker-compose up --build webserver
-
APIs available at http://localhost:5000
- Test admin/user credentials - admin:admin | user:user (log-in)
- Returned JWT (x-access-token apiKey) must be set in order to be able to use all APIs