• Stars
    star
    304
  • Rank 136,773 (Top 3 %)
  • Language
    Python
  • Created over 4 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Build a Stock Screener using FastAPI (Python)

Didn't see a lot of examples out there for this framework, so decided to create one.

Step 1: Hello World of FastAPI, Stub out the API endpoints

  • Display Hello World
  • Map out endpoints we will need, comment what they will do

Step 2: Mock the UI with Semantic UI and Jinja2 Templates

  • Including CSS and JavaScript from the CDN

Step 3: Database Design

  • To design our database, we create SQLAlchemy models
  • See what yfinance provides
  • forwardPE, forwardEps, dividendYield, 50 Day, 200 Day, Close
  • SQLAlchemy create_all

Step 4: Add a stock endpoint

  • Background task to fetch info and add to db also
  • Use Insomnia to test it

Step 5: Wire home screen

  • Show added stocks in a table

Step 6: Filters to filter table

  • Filter boxes on UI
  • Use SQLALchemy to filter in db
  • Use query parameters to filter

Step 7: Modal to add stock tickers via UI

More Repositories

1

binance-tutorials

Real-Time Candlestick Charts and Crypto Trading Bot using Binance API and Websockets
Python
858
star
2

tradekit

a collection of open source server components and Python libraries for financial data projects and automated trading
HTML
637
star
3

candlestick-screener

web-based technical screener for candlestick patterns using Python and Flask
Python
516
star
4

supertrend-crypto-bot

supertrend bot using python, pandas, and ccxt
Python
368
star
5

tradingview-binance-strategy-alert-webhook

TradingView Strategy Alert Webhook that buys and sells crypto with the Binance API
Python
350
star
6

chatgpt-api-whisper-api-voice-assistant

chatgpt api and whisper api tutorial - voice conversation with therapist
Python
330
star
7

fullstack-trading-app

A full stack Python app for trading using the Alpaca API
Python
194
star
8

streamlit-dashboards

Streamlit dashboard examples - Twitter cashtags, StockTwits, WSB, Charts, SQL Pattern Scanner
Python
182
star
9

tradingview-alpaca-strategy-alert-webhook-heroku

TradingView Strategy Alert Webhook for Alpaca and Discord, including Heroku Procfile
Python
170
star
10

tradingview-interactive-brokers

TradingView Interactive Brokers Integration using Webhooks
Python
156
star
11

financial-news-llama-index

Financial News Analysis with Llama Index, GPT-4, and Streamlit
HTML
145
star
12

ttm-squeeze

TTM Squeeze Scanner For Stocks in Python using Pandas and YFinance
Python
126
star
13

interactive-brokers-demo

Examples for using Interactive Brokers API with ib_insync
Python
122
star
14

sentiment-fear-and-greed

Backtesting the Fear and Greed Index and Put Call Ratio with Python and Backtrader
Python
110
star
15

tradingview-webhooks

AWS Lambda endpoint for executing Alpaca bracket orders
Python
104
star
16

wallstreetbets-tracker

Using Python and Pushshift.io to Track stocks on the WallStreetBets subreddit
Python
98
star
17

gridbot-websockets

build a gridbot using real-time market data over websockets
JavaScript
95
star
18

ark-funds-tracker

Track the holdings of ARK ETF funds in PostgreSQL
Python
88
star
19

openai-whisper-voice-commands

use openai to trade stocks with your voice
Python
87
star
20

tradingview-tdameritrade-option-bot

TD Ameritrade API option orders from TradingView webhook alerts
Python
85
star
21

qa-assistant-eleven-labs-voice-cloning

Voice Q&A Using ChatGPT API, Embeddings, Gradio, and Eleven Labs API For Voice Cloning
Python
83
star
22

alpaca-websockets

stock trading bot using real-time websocket data and alpaca api
Python
72
star
23

opensea-nft-api-tutorial

OpenSea NFT API App using Python and Streamlit
Python
64
star
24

tdameritrade

Trading stocks with the TD Ameritrade API and Python
Python
59
star
25

alpaca-market-data-streaming-api

Example Alpaca streaming market data over websockets
Python
49
star
26

pyalgotrade-tutorials

backtesting strategies using pyalgotrade
Python
48
star
27

iex-cloud-dashboard

IEX Cloud Stock Fundamental Dashboard with Streamlit
Python
48
star
28

timescaledb-aiohttp-asyncpg

Python
44
star
29

pandas-ta-tutorial

Python
42
star
30

backtrader-interactive-brokers

integrate backtrader with interactive brokers
Python
41
star
31

web3py-etherscan

Build your own Etherscan with web3.p6
Python
40
star
32

openai-whisper-live-transcription

near real-time transcription of audio from microphone
Python
39
star
33

alpaca-react-native

react native frontend for alpaca trading api
JavaScript
38
star
34

tdameritrade-streaming

streaming order book data from TD Ameritrade API
Python
32
star
35

opensea-nft-trading-bot

automate buying and selling of NFT's using the OpenSea JavaScript SDK
JavaScript
31
star
36

gap-trading

Python
31
star
37

crossover

S&P 500 golden cross strategy
Python
31
star
38

stochastic-alpaca-crypto-trading-api

buys and sells solana on a schedule using the alpaca crypto api
Python
27
star
39

datasets

stock price datasets
25
star
40

option-history

capture option price history to SQLite using Tradier API
Python
24
star
41

vix-strategy

backtesting spikes in the vix against historical S&P 500 data
Python
22
star
42

historical-data

retrieve and chart stock market data using yahoo finance, IEX Cloud, and Alpaca / Polygon
Python
19
star
43

semantic-search-frontend

Python
19
star
44

alpaca-market-data-bta-lib

applying technical indicators to alpaca market data with bta-lib
Python
19
star
45

website

Jupyter Notebook
17
star
46

candlestick-patterns

15
star
47

alpaca-bracket-order

place bracket orders with the alpaca api
Python
15
star
48

alpaca

python scripts for alpaca trading api
Python
15
star
49

walk-forward-optimization

Python
13
star
50

quantstats-demo

demonstration of quantstats library
HTML
12
star
51

hackingthemarkets.github.io

hackingthemarkets website
HTML
8
star
52

tradier-api

Basic Tradier API examples for equity and option orders
Python
8
star
53

prediction-markets

Notebooks for exploring prediction markets (eg. Kalshi, Polymarket, ForecastTrader)
Jupyter Notebook
6
star
54

screener-watchlist

creating a fundamental screener with IEXCloud and building a watchlist
5
star
55

interactive-brokers-web-api

A docker container and flask app for use with the Interactive Brokers Web API 1.0
HTML
4
star
56

financehacks.github.io

CSS
3
star