├── README.md └── paper_trading ├── accounts ├── __init__.py ├── __pycache__ │ ├── __init__.cpython-39.pyc │ ├── admin.cpython-39.pyc │ ├── apps.cpython-39.pyc │ ├── models.cpython-39.pyc │ └── views.cpython-39.pyc ├── admin.py ├── apps.py ├── migrations │ ├── __init__.py │ └── __pycache__ │ │ └── __init__.cpython-39.pyc ├── models.py ├── templates │ ├── account_settings.html │ ├── change_password.html │ ├── portfolio.html │ └── signup.html ├── tests.py └── views.py ├── manage.py ├── paper_trading ├── __init__.py ├── __pycache__ │ ├── __init__.cpython-39.pyc │ ├── settings.cpython-39.pyc │ ├── urls.cpython-39.pyc │ └── wsgi.cpython-39.pyc ├── asgi.py ├── settings.py ├── urls.py └── wsgi.py ├── requirements.txt ├── templates ├── base.html ├── foreign_base.html └── registration │ └── login.html └── trader ├── __init__.py ├── __pycache__ ├── __init__.cpython-39.pyc ├── admin.cpython-39.pyc ├── apps.cpython-39.pyc ├── models.cpython-39.pyc ├── stockModule.cpython-39.pyc └── views.cpython-39.pyc ├── admin.py ├── apps.py ├── migrations ├── 0001_initial.py ├── __init__.py └── __pycache__ │ ├── 0001_initial.cpython-39.pyc │ └── __init__.cpython-39.pyc ├── models.py ├── stockModule.py ├── templates ├── home.html ├── search.html ├── ticker.html └── trader_leaderboards.html ├── tests.py └── views.py /README.md: -------------------------------------------------------------------------------- 1 | # Django_Trading 2 | Stock Paper Trading website using Django and Bootstrap. The app allows users to create a portfolio of stocks in real time. The starting balance per new user created is $1 million dollars. 3 | 4 | # Overview 5 | Progam languages mostly used: Django, python (for backend framework). Used HTML, Bootstrap for front end framework. To get live stock data I used Finnhub (for API), yfinance, and Plotly/Pandas. 6 | 7 | # How to Use 8 | Once you've made an account by hitting signup on the home page, using Django Trading is simple! Use the portfolio tab to monitor the stocks you've bought and sell any. Use the search tab to find stocks, stock info, and to buy stocks. Click the leaderboard tab to monitor other users, and that's about it. 9 | 10 | # Try this app 11 | I welcome pull requests! Please make sure to download all of the packages in the requirements.txt file. Then run the server and enjoy! 12 | -------------------------------------------------------------------------------- /paper_trading/accounts/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trahyns/Django_Trading/9eee9a56918228372050dce69b868f99ed072474/paper_trading/accounts/__init__.py -------------------------------------------------------------------------------- /paper_trading/accounts/__pycache__/__init__.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trahyns/Django_Trading/9eee9a56918228372050dce69b868f99ed072474/paper_trading/accounts/__pycache__/__init__.cpython-39.pyc -------------------------------------------------------------------------------- /paper_trading/accounts/__pycache__/admin.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trahyns/Django_Trading/9eee9a56918228372050dce69b868f99ed072474/paper_trading/accounts/__pycache__/admin.cpython-39.pyc -------------------------------------------------------------------------------- /paper_trading/accounts/__pycache__/apps.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trahyns/Django_Trading/9eee9a56918228372050dce69b868f99ed072474/paper_trading/accounts/__pycache__/apps.cpython-39.pyc -------------------------------------------------------------------------------- /paper_trading/accounts/__pycache__/models.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trahyns/Django_Trading/9eee9a56918228372050dce69b868f99ed072474/paper_trading/accounts/__pycache__/models.cpython-39.pyc -------------------------------------------------------------------------------- /paper_trading/accounts/__pycache__/views.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trahyns/Django_Trading/9eee9a56918228372050dce69b868f99ed072474/paper_trading/accounts/__pycache__/views.cpython-39.pyc -------------------------------------------------------------------------------- /paper_trading/accounts/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /paper_trading/accounts/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AccountsConfig(AppConfig): 5 | name = 'accounts' 6 | -------------------------------------------------------------------------------- /paper_trading/accounts/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trahyns/Django_Trading/9eee9a56918228372050dce69b868f99ed072474/paper_trading/accounts/migrations/__init__.py -------------------------------------------------------------------------------- /paper_trading/accounts/migrations/__pycache__/__init__.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trahyns/Django_Trading/9eee9a56918228372050dce69b868f99ed072474/paper_trading/accounts/migrations/__pycache__/__init__.cpython-39.pyc -------------------------------------------------------------------------------- /paper_trading/accounts/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /paper_trading/accounts/templates/account_settings.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 | 5 |
Username: {{user.username}}
15 | Change Password 16 |User since: {{user.date_joined}}
17 | 18 |Cash: ${{CurrentTrader.cash}}
17 |AUM: ${{CurrentTrader.AUM}}
23 |Ticker | 38 |Count | 39 |Share Price | 40 |Position Value | 41 |42 | 43 | |
---|---|---|---|---|
{{position.ticker}} | 50 |{{position.count}} | 51 |${{position.price}} | 52 |${{position.value}} | 53 | 54 |55 | 62 | 63 | 64 | 65 | 66 | | 67 | 68 |
11 | Welcome future investor! This is a free, online paper trading platorm. Start off with 1 million dollars and 12 | be the best investor! Sign up to get started! 13 |
14 |15 | 17 |
18 | 19 |{{Summary.longBusinessSummary}}
127 |Industry | 135 |Exchange | 136 |Location | 137 |Founded | 138 |
{{Summary.industry}} | 142 |{{Profile.exchange}} | 143 |{{Summary.city}} | 144 |{{Summary.currency}} | 145 |
Previous Close | 149 |Market Open | 150 |Market Cap | 151 |Volume | 152 |
${{Summary.previousClose}} | 156 |${{Summary.regularMarketOpen}} | 157 |${{Summary.marketCap}} | 158 |{{Summary.volume}} | 159 |
Trailing PE | 163 |Forward PE | 164 |Beta | 165 |Short Ratio | 166 |
{{Summary.trailingPE}} | 170 |{{Summary.forwardPE}} | 171 |{{Summary.beta}} | 172 |{{Summary.shortRatio}} | 173 |
Position | 23 |Username | 24 |AUM | 25 |
---|---|---|
{{Summary.marketCap}} | 32 |{{trader.user.username}} | 33 |${{trader.AUM}} | 34 |