• Stars
    star
    1,489
  • Rank 31,555 (Top 0.7 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 4 years ago
  • Updated over 2 years ago

Reviews

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

Repository Details

Fetch currently trending stocks on Reddit

Reddit Stock Trends 📈

See trending stock tickers on Reddit and check Stock perfomance

GitHub issues

Backend

Reddit API

  • Get your reddit API credentials from here.
  • Follow this article to get your credentials.
  • Go to back/ directory.
  • Create a praw.ini file with the following
[ClientSecrets]
client_id=<your client id>
client_secret=<your client secret>
user_agent=<your user agent>

Note that the title of this section, ClientSecrets, is important because ticker_counts.py will specifically look for that title in the praw.ini file.

Local usage

  • Install required modules using pip install -r requirements.txt.
  • Run ticker_counts.py first.
  • Now run yfinance_analysis.py.
  • You will be able to find your results in data/ directory.
  • [Optional] Run wsgi.py to start a server that returns the data in JSON format. This step will generate the csv files if they don't already exist.

Frontend - Vue

There's also a JavaScript web app that shows some data visualizations.

Local usage

Start the local server. This server will generate the csv files if they don't already exist.

cd back
python wsgi.py

Then, launch the client

cd front
cp .env.example .env
npm install
npm run serve

You can change the env variables if you need to

Docker usage

  • Requires Docker 17.09.0+ and docker-compose 1.17.0+
  • make sure you have .env or a system wide export for the var VUE_APP_API_URL, see env.example
  • docker-compose up -d to start all services in the background. (-d == detatched)
  • docker-compose up <servicename> to bring up a specific service.
  • docker-compose rm removes the image
  • docker-compose ps to list running services
  • docker-compose up --build if you made changes to the compose or dockerfiles and need it built into a new image.
  • docker-compose build --no-cache if you made changes to specific files and docker does not recognize as new thereby reusing cached layers incorrectly. This takes about 3 minutes on a gaming pc with 0 docker tuning.
  • compose.yml determines service names and which ports are bound to your host. By default front=8080 back=5006.
  • Once up navigate to http://localhost:8080/.
  • docker-compose stop stops all services

Frontend - React

There's also a React JavaScript web app that has +3 more features than the vue app.

  • shows all available data on one site/table
  • you can sort the data by clicking the header name, if you want see what ticker had the most 5d Change for example
  • the tickername is a direct link to the tradeview overview site for the ticker if you find a ticker interesting and want to analyse it

Local usage

Start the local server. This server will generate the csv files if they don't already exist.

cd back
python wsgi.py

Then, launch the client

cd react-front
cp .env.example .env
npm install
npm start

You can change the env variables if you need to

No Docker solution for the react app.


Ticker Symbol API - EOD Historical Data

Included for potential future use is a csv file that contains all the listed ticker symbols for stocks, ETFs, and mutual funds (~50,000 tickers). This was retrieved from https://eodhistoricaldata.com/. You can register for a free api key and get up to 20 api calls every 24 hours.

To retrieve a csv of all USA ticker symbols, use the following:

https://eodhistoricaldata.com/api/exchange-symbol-list/US?api_token={YOUR_API_KEY}

Contribution

I would love to see more work done on this, I think this could be something very useful at some point. All contributions are welcome. Go ahead and open a PR.

  • Join the Discord to discuss development and suggestions.

To Do

See this page.

Suggestions are appreciated.

Donation

If you like what I am doing, consider buying me a coffee this helps me give more time to this project and improve.

Buy Me A Coffee

Sponsors

TickerHype: https://tickerhype.com/


If you decide to use this anywhere please give a credit to @abbasmdj on twitter, also If you like my work, check out other projects on my Github and my personal blog.

More Repositories

1

cs-algorithms

💻 Algorithms that you must know as computer science student
C++
218
star
2

FastAPI-Production-Boilerplate

A scalable and production ready boilerplate for FastAPI
Python
129
star
3

ML-FromScratch

Machine Learning Algorithms implemented in various languages from scratch
Jupyter Notebook
21
star
4

URL-Shortener

A quick URL shortner built using Flask + MySQL and containerized using Docker
VBA
6
star
5

Transformer-Stories

Generating horror stories using GPT-2
Jupyter Notebook
4
star
6

pepper

Pepper is React Template for Developer Portfolio
JavaScript
3
star
7

Parked

App developed for INDENG 85 - Amazoogle Challenge Lab
JavaScript
3
star
8

Lost-n-Found

PHP
3
star
9

Reddit-Crypto-Trends

Show currently trending crypto currencies in Reddit
3
star
10

Coronavirus-Data-Visualization

Visualization of 2019-nCov Data
Jupyter Notebook
3
star
11

Campus-Maintenance-System

JavaScript
3
star
12

smart-surveillance-using-pi

Implementation of person detection using SSD-MobileNet on Microcomputer platform
CSS
2
star
13

bar-chart-race-py

Attempting to recrfeate "Bar Chart Race" the new famous animation using python
Python
2
star
14

uc-berkeley-bit

Berkeley Index for Tenacity
Jupyter Notebook
2
star
15

violence-detection

Used AWS' Rekognition API to detect violent in every 5th frame of the video
Python
2
star
16

Live-Face-Blur

Jupyter Notebook
2
star
17

ellipse-limb-detection

bounds limbs into ellipses using openpose
Python
2
star
18

OOP-Java-CS301-Lab

LAB problems in JAVA for CS301 course
Java
2
star
19

NeedCovidHelp

A public directory built for covid-19 related resources in India
CSS
1
star
20

tuya-api-tetris

JavaScript
1
star
21

Forest-Fires-Prediction

Understanding Forest Fires through data
Jupyter Notebook
1
star
22

gradient-descent

Visualize gradient descent in 2D Plane using
Python
1
star
23

rawfiles

Raw Hosted Files
JavaScript
1
star
24

object-detection-tf

Object Detection using Tensorflow
Jupyter Notebook
1
star
25

React-Community-Elements

Collection of React Styled Components created by the community.
JavaScript
1
star
26

LaHacks2020

CSS
1
star
27

PicoCTF-2021

Write ups for PicoCTF 2021 challenges that I completed
1
star
28

Handwritten-Digit-Recognition

99.5% Accuracy Score with MNIST Dataset
Jupyter Notebook
1
star
29

Docs

Personal Docs site
1
star
30

limeprompt

Light weight prompter and parser for language models
Python
1
star