All Projects → Paulinakhew → web_trader

Paulinakhew / web_trader

Licence: MIT license
📊 Python Flask game that consolidates data from Nasdaq, allowing the user to practice buying and selling stocks.

Programming Languages

HTML
75241 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to web trader

trading sim
📈📆 Backtest trading strategies concurrently using historical chart data from various financial exchanges.
Stars: ✭ 21 (+0%)
Mutual labels:  finance, trading, stock, stock-market
Moneymanagerex
Money Manager Ex is an easy to use, money management application built with wxWidgets
Stars: ✭ 836 (+3880.95%)
Mutual labels:  finance, stock, sqlite3
Axistradecult
Assist tool for trading on stock market, automatic download historical stock data, technical research, chart and analysis.
Stars: ✭ 26 (+23.81%)
Mutual labels:  finance, trading, stock
Trendyways
Simple javascript library containing methods for financial technical analysis
Stars: ✭ 121 (+476.19%)
Mutual labels:  finance, trading, stock-market
Mop
Stock market tracker for hackers.
Stars: ✭ 1,534 (+7204.76%)
Mutual labels:  finance, trading, stock-market
Rqalpha
A extendable, replaceable Python algorithmic backtest && trading framework supporting multiple securities
Stars: ✭ 4,425 (+20971.43%)
Mutual labels:  finance, trading, stock
Tradestation
EasyLanguage indicators and systems for TradeStation
Stars: ✭ 65 (+209.52%)
Mutual labels:  finance, trading, stock-market
tuneta
Intelligently optimizes technical indicators and optionally selects the least intercorrelated for use in machine learning models
Stars: ✭ 77 (+266.67%)
Mutual labels:  finance, trading, stock-market
Finance Python
python tools for Finance with the functionality of indicator calculation, business day calculation and so on.
Stars: ✭ 238 (+1033.33%)
Mutual labels:  finance, stock, stock-market
Trading Backtest
A stock backtesting engine written in modern Java. And a pairs trading (cointegration) strategy implementation using a bayesian kalman filter model
Stars: ✭ 247 (+1076.19%)
Mutual labels:  finance, trading, stock
wallstreet
Stock Quotes and Charts for the Terminal
Stars: ✭ 75 (+257.14%)
Mutual labels:  finance, stock, stock-market
juncture
Low latency connectivity to trading venues on the JVM
Stars: ✭ 31 (+47.62%)
Mutual labels:  finance, trading, nasdaq
AIPortfolio
Use AI to generate a optimized stock portfolio
Stars: ✭ 28 (+33.33%)
Mutual labels:  finance, stock, stock-market
Quantdom
Python-based framework for backtesting trading strategies & analyzing financial markets [GUI ]
Stars: ✭ 449 (+2038.1%)
Mutual labels:  finance, trading, stock-market
Alpaca Backtrader Api
Alpaca Trading API integrated with backtrader
Stars: ✭ 246 (+1071.43%)
Mutual labels:  finance, trading, stock-market
Pandas Ta
Technical Analysis Indicators - Pandas TA is an easy to use Python 3 Pandas Extension with 130+ Indicators
Stars: ✭ 962 (+4480.95%)
Mutual labels:  finance, trading, stock-market
stocklist
Stock data collection and analysis
Stars: ✭ 27 (+28.57%)
Mutual labels:  finance, trading, stock
stocki
The CLI for fetching stock market data
Stars: ✭ 32 (+52.38%)
Mutual labels:  finance, stock, stock-market
Alpha Mind
quantitative security portfolio analysis. The analysis pipeline including data storage abstraction, alpha calculation, ML based alpha combining and portfolio calculation.
Stars: ✭ 171 (+714.29%)
Mutual labels:  finance, stock, stock-market
Ta Rs
Technical analysis library for Rust language
Stars: ✭ 248 (+1080.95%)
Mutual labels:  finance, trading, stock-market

forthebadge made-with-python

Build Status Coverage Status License: MIT Gitmoji

Web Trader

Web Trader is a trading website that consolidates data from Nasdaq, allowing the user to search up the ticker symbol and price of any stock. I employed HTML and CSS to format all the pages and used Python for the back end development. All of the user information, transactions, holdings, and balances are stored in a SQLite3 database. Not only can users search up stocks, they can buy and sell using their own funds. The goal is to end up with a large profit.

Setup

  • Clone (or download) the repository:
git clone [email protected]:Paulinakhew/web_trader.git
  • Download all the necessary packages:
  • MacOS Users
$ pip3 install -r requirements.txt
  • Linux Users
$ pip install -r requirements.txt
  • Create the sqlite3 database:
$ python3 schema.py
  • Seed the database:
$ python3 seed.py
  • Install pre-commit hook:
pre-commit install
  • Run the app locally:
$ python3 controller.py

Example Photos

This is the login menu where you can login or create a new user account. Login menu

This is the main menu that opens after you log in. Main menu

The dashboard is where you can see all of your previous transactions as well as current holdings. Dashboard

This page lets the user lookup ticker symbols and the last prices of stocks. Lookup and Quote Menu

The buy and sell menu lets the user input the ticker symbol and quantity of the stock that they want to purchase/sell. Buy and Sell Menu

SQLite3 Database

The database is created using SQLite3. There are five tables in total, each serving a different purpose. For example, the transactions table is used to store the date, number of shares, and ticker symbols of all the users' purchases. This is the code for the transactions table:

CREATE TABLE transactions(
    pk INTEGER PRIMARY KEY AUTOINCREMENT,
    ticker_symbol TEXT,
    num_shares FLOAT,
    owner_username INTEGER,
    last_price FLOAT,
    date TEXT,
    FOREIGN KEY(owner_username) REFERENCES user(username)
);

API

I used the flask_restful extension to create an api. The endpoints are as follows:

'/users'
'/transactions'
'/transactions/<username>'
'/holdings/<username>'

Testing

I use GitHub actions and Pytest to test the project. You can see the tests here. I also have the API Key for the Intrinio API set up as a Secret. Secrets are environment variables that are encrypted and only exposed to selected actions. Anyone with collaborator access to this repository can use these secrets in a workflow.

Security

Instead of storing passwords as plaintext, I stored the salt and the hash of the password. When users try to log in, the hashed password is compared to the hash in the database.

pwdhash = hashlib.pbkdf2_hmac(
    'sha512',
    password.encode('utf-8'),
    salt.encode('ascii'),
    100000
)

New Features

Feel free to create a GitHub issue for this repository if you have any new ideas!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].