https://github.com/ajhenri/trading-simulator
A simple stock trading simulator, written in Flask. (WIP)
https://github.com/ajhenri/trading-simulator
flask python3 stock-market
Last synced: 5 months ago
JSON representation
A simple stock trading simulator, written in Flask. (WIP)
- Host: GitHub
- URL: https://github.com/ajhenri/trading-simulator
- Owner: ajhenri
- License: mit
- Created: 2019-11-25T00:58:48.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T21:44:14.000Z (over 3 years ago)
- Last Synced: 2025-08-21T13:00:38.231Z (11 months ago)
- Topics: flask, python3, stock-market
- Language: JavaScript
- Homepage:
- Size: 2.32 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 29
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Trading Simulator (Work in Progress)
This is a small stock trading simulator built with Python using the Flask framework with ReactJS on the front-end.
The project is currently a work in progress.
## Requirements
Docker
IEX API Key
### Configuring API Keys and DB Environment
Docker gets the database configuration from an environment file `database.env` located in the root folder of the project.
It is not under source control.
Create a file `database.env` at the root of the project.
```
POSTGRES_USER=user
POSTGRES_PASSWORD=pass
POSTGRES_DB=db
```
In the root of the project, an `instance` folder has to be created as well, which will be used
as a module to get configuration values.
`instance/__init__.py` (Empty File)
`instance/config.py`
```
SECRET_KEY = 'key'
DATABASE_HOST = 'dbhost'
DATABASE_NAME = 'dbname'
DATABASE_USER = 'dbuser'
DATABASE_PASS = 'dbpass'
IEX_SECRET_TOKEN = 'token'
IEX_SB_SECRET_TOKEN = 'token'
```
## Running Development Environment
Build the Docker images and setup database tables by running the Alembic migrations.
`make build`
`make migrate-up`
If the `FLASK_ENV` is set to `development`, then the webpack-dev-server has to be running (`npm run start` in the /frontend static folder).
`make up`
## Demo Image
