Skip to content

Instantly share code, notes, and snippets.

@financial-python
financial-python / get_stocks_from_reddit.py
Last active October 1, 2024 19:00
How to get stock tickers from reddit using Praw
"""
First, we need to create a Reddit account and get an API key to access the Reddit API. Once you have created an account, you can obtain an API key by following these steps:
Go to https://ssl.reddit.com/prefs/apps/
Scroll down to "Developed Applications" and click "Create App"
Choose "Web app" and give your app a name and description.
Set "About url" and "Redirect uri" to "http://localhost:8000"
Click "Create app" and copy the "client_id" and "client_secret" values.
Once you have the API key, you can start coding.