{"id":13815233,"url":"https://github.com/iam-abbas/Reddit-Stock-Trends","last_synced_at":"2025-05-15T07:32:15.899Z","repository":{"id":43003896,"uuid":"336531380","full_name":"iam-abbas/Reddit-Stock-Trends","owner":"iam-abbas","description":"Fetch currently trending stocks on Reddit","archived":false,"fork":false,"pushed_at":"2022-03-23T22:57:15.000Z","size":1728,"stargazers_count":1549,"open_issues_count":18,"forks_count":202,"subscribers_count":83,"default_branch":"main","last_synced_at":"2025-04-27T00:56:24.028Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iam-abbas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"iam-abbas"}},"created_at":"2021-02-06T12:22:38.000Z","updated_at":"2025-04-24T13:45:46.000Z","dependencies_parsed_at":"2022-09-02T15:30:17.834Z","dependency_job_id":null,"html_url":"https://github.com/iam-abbas/Reddit-Stock-Trends","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iam-abbas%2FReddit-Stock-Trends","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iam-abbas%2FReddit-Stock-Trends/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iam-abbas%2FReddit-Stock-Trends/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iam-abbas%2FReddit-Stock-Trends/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iam-abbas","download_url":"https://codeload.github.com/iam-abbas/Reddit-Stock-Trends/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254295991,"owners_count":22047183,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T04:03:10.491Z","updated_at":"2025-05-15T07:32:10.888Z","avatar_url":"https://github.com/iam-abbas.png","language":"Python","funding_links":["https://github.com/sponsors/iam-abbas","https://www.buymeacoffee.com/abbas"],"categories":["Python","📦 Legacy \u0026 Inactive Projects"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eReddit Stock Trends 📈\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\nSee trending stock tickers on Reddit and check Stock perfomance \u003cbr\u003e\u003cbr\u003e\n\u003cimg style=\"padding:10px;\" src=\"https://img.shields.io/github/contributors/iam-abbas/Reddit-Stock-Trends?style=flat-square\"\u003e\n\u003cimg style=\"padding:10px;\" src=\"https://img.shields.io/github/stars/iam-abbas/Reddit-Stock-Trends?style=flat-square\"\u003e\n\u003cimg style=\"padding:10px;\" src=\"https://img.shields.io/github/forks/iam-abbas/Reddit-Stock-Trends?label=Forks\u0026style=flat-square\"\u003e\n\u003cimg style=\"padding:10px;\" src=\"https://img.shields.io/github/license/iam-abbas/Reddit-Stock-Trends?style=flat-square\"\u003e\n\u003cimg alt=\"GitHub issues\" src=\"https://img.shields.io/github/issues/iam-abbas/Reddit-Stock-Trends?style=flat-square\"\u003e\n\n\u003c/p\u003e\n\n## Backend\n\n### Reddit API\n\n- Get your reddit API credentials from [here](https://www.reddit.com/prefs/apps).\n- Follow [this](https://towardsdatascience.com/scraping-reddit-with-praw-76efc1d1e1d9) article to get your credentials.\n- Go to `back/` directory.\n- Create a `praw.ini` file with the following\n\n```\n[ClientSecrets]\nclient_id=\u003cyour client id\u003e\nclient_secret=\u003cyour client secret\u003e\nuser_agent=\u003cyour user agent\u003e\n```\n\nNote that the title of this section, `ClientSecrets`, is important because `ticker_counts.py` will specifically look for that title in the `praw.ini` file.\n\n### Local usage\n\n- Install required modules using `pip install -r requirements.txt`.\n- Run `ticker_counts.py` first.\n- Now run `yfinance_analysis.py`.\n- You will be able to find your results in `data/` directory.\n- [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.\n\n## Frontend - Vue\n\nThere's also a JavaScript web app that shows some data visualizations.\n\n### Local usage\n\nStart the local server. This server will generate the csv files if they don't already exist.\n\n```bash\ncd back\npython wsgi.py\n```\n\nThen, launch the client\n\n```bash\ncd front\ncp .env.example .env\nnpm install\nnpm run serve\n```\n\nYou can change the env variables if you need to\n\n### Docker usage\n\n- Requires Docker 17.09.0+ and docker-compose 1.17.0+\n- make sure you have .env or a system wide export for the var VUE_APP_API_URL, see env.example\n- `docker-compose up -d` to start all services in the background. (-d == detatched)\n- `docker-compose up \u003cservicename\u003e` to bring up a specific service.\n- `docker-compose rm` removes the image\n- `docker-compose ps` to list running services\n- `docker-compose up --build` if you made changes to the compose or dockerfiles and need it built into a new image.\n- `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.\n- `compose.yml` determines service names and which ports are bound to your host. By default front=8080 back=5006.\n- Once `up` navigate to http://localhost:8080/. \n- `docker-compose stop` stops all services\n\n---\n\n## Frontend - React\n\nThere's also a React JavaScript web app that has +3 more features than the vue app.\n\n- shows all available data on one site/table\n- you can sort the data by clicking the header name, if you want see what ticker had the most 5d Change for example\n- 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\n\n### Local usage\n\nStart the local server. This server will generate the csv files if they don't already exist.\n\n```bash\ncd back\npython wsgi.py\n```\n\nThen, launch the client\n\n```bash\ncd react-front\ncp .env.example .env\nnpm install\nnpm start\n```\n\nYou can change the env variables if you need to\n\n**No Docker solution for the react app.**\n\n---\n\n#### Ticker Symbol API - EOD Historical Data\n\nIncluded for potential future use is a csv file that contains all the listed ticker symbols for stocks, ETFs, and\nmutual 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.\n\nTo retrieve a csv of all USA ticker symbols, use the following:\n\nhttps://eodhistoricaldata.com/api/exchange-symbol-list/US?api_token={YOUR_API_KEY}\n\n## Contribution\n\nI 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.\n\n- Join the [Discord](https://discord.gg/USsBfc97RM) to discuss development and suggestions.\n\n\u003ca href=\"https://discord.gg/USsBfc97RM\" \u003e\u003cimg src=\"https://preview.redd.it/tpvewx1950311.png?width=1487\u0026format=png\u0026auto=webp\u0026s=be429e3b5e7e51c777497c95b63c5011f9a906b6\" width=\"150px\"\u003e\u003c/a\u003e\n\n### To Do\n\nSee [this](https://github.com/iam-abbas/Reddit-Stock-Trends/labels/feature) page.\n\nSuggestions are appreciated.\n\n### Donation\n\nIf you like what I am doing, consider buying me a coffee this helps me give more time to this project and improve. \u003cbr\u003e\u003cbr\u003e\n\u003ca href=\"https://www.buymeacoffee.com/abbas\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/default-orange.png\" alt=\"Buy Me A Coffee\" height=\"41\" width=\"174\"\u003e\u003c/a\u003e\n\n### Sponsors\n\nTickerHype: https://tickerhype.com/\n\n---\n\nIf you decide to use this anywhere please give a credit to [@abbasmdj](https://twitter.com/abbasmdj) on twitter, also If you like my work, check out other projects on my [Github](https://github.com/iam-abbas) and my [personal blog](https://abbasmj.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiam-abbas%2FReddit-Stock-Trends","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiam-abbas%2FReddit-Stock-Trends","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiam-abbas%2FReddit-Stock-Trends/lists"}