Skip to content

sdclarkelab/stockwatch-api

Repository files navigation

StockWatchJa API

This is the server for the StockWatchJa application. It pulls stock trade data from StockWatchJA: JamStockEx API at this URL.

API Documentation

Click here to view the API documentation.

Requirements

Tool Version Source
Python 3.7.4 Python 3.7.4 Release
Heroku - Getting Started on Heroku with Python
Windows OS 10 -
Docker 19.03.4 Docker Desktop

Setup Dev

Create Django dev setting file

Export settings module:

  • On Windows: set DJANGO_SETTINGS_MODULE=development.local_settings
  • On Linux: export DJANGO_SETTINGS_MODULE=development.local_settings

Create and initialize Docker database

# Create Postgres database Docker container and create schema
> python development/dev_setup.py

# Create admin user
> python manage.py createsuperuser

Test Super User Credentials

> python manage.py runserver 5555

Login to admin page with super user credentials to confirm it works. (use "custom_admin_page" if the docker-machine ip is not using the default IP address)

Register Application

Go to application registration and complete the form. (use "custom application registration" if the docker-machine ip is not using the default IP address)

Name: StockwatchAPI

Client type: Confidential

Authorization grant type: Resource owner password-based