r/WallStreetBets is noisy, funny, and sometimes early. Whether you treat it as a signal or just as a crowd to watch, the first job is the same: find out which tickers people are talking about right now, and whether the mood is bullish or bearish.
This guide builds a small tracker in Python. It reads the newest posts and the busiest comment threads with SteadyAPI's Reddit API, pulls out ticker symbols, checks them against SteadyAPI's stock quotes endpoint so random capital words are dropped, scores each mention as bullish, bearish or neutral, and prints a table with each stock's price change for the day. It also appends every run to a CSV, so you can compare snapshots.
This is a research tool, not trading advice. The sentiment step is a word list, and the sample is small. The limits are listed below.
Prerequisites
- A SteadyAPI API key from steadyapi.com. One run costs 11 requests.
- Python 3.8+ with
requests.
The two data sources
The script uses two SteadyAPI APIs with the same key:
GET /v1/reddit/posts(weight 2) lists the newest posts, 25 per page. The script reads two pages, skips pinned posts, and keeps each title and body.GET /v1/reddit/post(weight 1) returns a thread's nested comments. The script reads the five busiest threads. A response holds about 40 comments, so you see a slice of each discussion, not all of it.GET /v1/markets/stock/quotes(weight 2) takes up to 200 comma-separated symbols and returns a quote for each one it knows. The script sends all candidates in one call.
Finding tickers in free text
Pulling tickers out of text sounds easy until you try it. The script uses three rules:
1. Cashtags are strong. $TSLA is almost certainly a ticker. 2. Bare capital words are candidates. Two to five capital letters, such as NVDA. This catches most of how people actually write. 3. The quotes call is the filter. Symbols the API does not know as a stock or ETF are dropped. In my tests, ZZZZ returned nothing and CEO came back with a quote type of NONE.
The filter alone is not enough. Many ordinary words are real symbols: ALL, A, IT and YOLO all returned quotes in my tests. So the script also carries a short list of words to ignore, such as CEO, FED, DD, ATH and YOLO. A bare word seen only once, and never as a cashtag, is dropped as noise.
Crypto is handled differently. A small map recognizes BTC, ETH, SOL, DOGE and XRP, plus the names Bitcoin, Ethereum and Solana, and counts them without a price lookup.
Scoring the mood
Each text, whether it is a post or a comment, gets one score. The script counts bullish words (calls, moon, squeeze, buy, 🚀) and bearish words (puts, crash, short, bubble, 📉). More bullish words means +1, more bearish means -1, and a tie means 0. That score is added to every ticker mentioned in the text.
This is crude on purpose. It misses sarcasm, and a word like "short" can describe a position or a time frame. It is a baseline you can replace with a proper classifier.
The script
Save this as wsb_sentiment_tracker.py:
import csv
import html
import os
import re
import time
from collections import defaultdict
import requests
BASE = "https://api.steadyapi.com"
HEADERS = {"Authorization": f"Bearer {os.environ['STEADYAPI_KEY']}"}
SUBREDDIT = "wallstreetbets"
LISTING_PAGES = 2 # 25 posts per page, weight 2 each
THREADS = 5 # busiest threads whose comments we also read, weight 1 each
CASHTAG = re.compile(r"\$([A-Za-z]{1,5})\b")
BARE = re.compile(r"\b[A-Z]{2,5}\b")
CRYPTO = {"BTC": "BTC", "BITCOIN": "BTC", "ETH": "ETH", "ETHEREUM": "ETH",
"SOL": "SOL", "SOLANA": "SOL", "DOGE": "DOGE", "XRP": "XRP"}
# All-caps words that are valid ticker symbols but are almost never meant as one here.
NOT_TICKERS = set("""A ALL AI AN ARE AT ATH BE BUY BY CEO CPI DD EDIT EPS ETF EV FED FOMO FOR FUD GDP GO HAS
HOLD IMO IN IPO IRS IS IT ITM IV LOL MY NEW NOT NOW OF ON ONE OR OTM OUT PUT SEC SO THE TO TLDR UK UP US USA
VERY WSB YOLO YOU CALL CALLS PUTS CFO PC PM AM DOJ FDA IRA HR TV NYSE""".split())
BULL = re.compile(r"\b(calls?|bull\w*|long|moon\w*|rally|squeeze|buy|buying|rocket|green|breakout|undervalued)\b|🚀|📈", re.I)
BEAR = re.compile(r"\b(puts?|bear\w*|short\w*|crash\w*|dump\w*|red|bubble|overvalued|sell|selling|bagholder\w*)\b|📉|🩸", re.I)
def call(path, **params):
failures = 0
for attempt in range(4):
r = requests.get(f"{BASE}/v1/{path}", headers=HEADERS, params=params, timeout=90)
if r.status_code in (429, 500, 502, 503):
time.sleep(2 ** attempt)
continue
r.raise_for_status()
data = r.json()
if data.get("success") is False:
failures += 1
if failures < 2:
time.sleep(2) # some requests fail once and then work, so retry one time
continue
raise ValueError(data["message"])
return data
raise RuntimeError(f"{path} failed after retries")
def flatten(comments):
for c in comments:
yield c
yield from flatten(c["replies"])
def collect_texts():
"""Post titles and bodies from the newest listings, plus comments from the busiest threads."""
texts, posts, cursor = [], [], None
for _ in range(LISTING_PAGES):
params = {"subreddit": SUBREDDIT, "sortType": "new"}
if cursor:
params["cursor"] = cursor
data = call("reddit/posts", **params)
posts += [p for p in data["body"] if not p.get("stickied")]
cursor = data["meta"].get("cursor")
for p in posts:
texts.append(html.unescape(p["title"] + " " + (p.get("selftext") or "")))
for p in sorted(posts, key=lambda p: -(p.get("num_comments") or 0))[:THREADS]:
try:
thread = call("reddit/post", url="https://www.reddit.com" + p["permalink"])
except ValueError:
continue # some threads fail; skip them instead of stopping
texts += [html.unescape(c["content"]) for c in flatten(thread["body"]["post_comments"])]
return texts
def mood(text):
bull, bear = len(BULL.findall(text)), len(BEAR.findall(text))
return 1 if bull > bear else -1 if bear > bull else 0
def candidates(text):
found = {t.upper() for t in CASHTAG.findall(text)}
found |= {t for t in BARE.findall(text) if t not in NOT_TICKERS}
return found
def validate(symbols):
"""Keep symbols that SteadyAPI knows as a stock or ETF, with the day's price change."""
known, symbols = {}, sorted(symbols)
for i in range(0, len(symbols), 200):
data = call("markets/stock/quotes", ticker=",".join(symbols[i:i + 200]))
for q in data["body"]:
if q.get("quoteType") in ("EQUITY", "ETF") and q.get("regularMarketChangePercent") is not None:
known[q["symbol"]] = q["regularMarketChangePercent"]
return known
def save_history(rows, path="wsb_history.csv"):
"""Append this run to a CSV so you can compare snapshots over the day."""
new_file = not os.path.exists(path)
with open(path, "a", newline="") as f:
w = csv.writer(f)
if new_file:
w.writerow(["time", "ticker", "type", "mentions", "bull", "bear", "day_change_pct"])
stamp = time.strftime("%Y-%m-%d %H:%M")
for t, kind, change, s in rows:
w.writerow([stamp, t, kind, s["mentions"], s["bull"], s["bear"], "" if change is None else round(change, 2)])
def track():
texts = collect_texts()
stats = defaultdict(lambda: {"mentions": 0, "tags": 0, "bull": 0, "bear": 0})
stock_candidates = set()
for text in texts:
m = mood(text)
tickers = {CRYPTO[t] for t in candidates(text) if t in CRYPTO}
tickers |= {CRYPTO[w.upper()] for w in re.findall(r"\b(?:bitcoin|ethereum|solana)\b", text, re.I)}
stock_here = {t for t in candidates(text) if t not in CRYPTO}
stock_candidates |= stock_here
tagged = {t.upper() for t in CASHTAG.findall(text)}
for t in tickers | stock_here:
s = stats[t]
s["mentions"] += 1
s["tags"] += t in tagged
s["bull"] += m == 1
s["bear"] += m == -1
known = validate(stock_candidates)
rows = []
for t, s in stats.items():
if t in CRYPTO.values():
rows.append((t, "crypto", None, s))
elif t in known and (s["tags"] or s["mentions"] >= 2): # a bare word seen once is probably noise
rows.append((t, "stock", known[t], s))
rows.sort(key=lambda r: -r[3]["mentions"])
save_history(rows)
print(f"{len(texts)} texts read from r/{SUBREDDIT}")
print(f"{'ticker':7}{'type':8}{'mentions':>9}{'bull':>6}{'bear':>6}{'net':>6}{'day %':>9}")
for t, kind, change, s in rows[:12]:
day = f"{change:+.1f}" if change is not None else "-"
print(f"{t:7}{kind:8}{s['mentions']:>9}{s['bull']:>6}{s['bear']:>6}{s['bull'] - s['bear']:>+6}{day:>9}")
if __name__ == "__main__":
track()
Run it:
export STEADYAPI_KEY="your_api_key"
python wsb_sentiment_tracker.py
A real run
This is the output from one run:
248 texts read from r/wallstreetbets
ticker type mentions bull bear net day %
GME stock 3 2 0 +2 -1.0
NVDA stock 3 0 2 -2 -14.0
MS stock 3 1 0 +1 -5.3
ORCL stock 1 0 0 +0 -8.5
TTWO stock 1 0 1 -1 +0.6
MSTR stock 1 0 1 -1 -9.7
Read it with care. Two hundred and forty-eight texts produced a top count of three mentions. That is a thin sample, and one run is a snapshot. No crypto symbols appeared in this window, so none are listed. MS may be Morgan Stanley or a stray abbreviation, and the script cannot tell. The row for NVDA pairs two bearish texts with a 14% drop that day, which fits, but three mentions prove nothing.
Turning a snapshot into a tracker
Each run appends its rows to wsb_history.csv with a timestamp. Schedule the script, for example hourly with cron, and you build a record you can chart: mentions per ticker over the day, and mood next to price.
Consecutive runs overlap, because the same recent posts appear in both. That is fine for watching a trend, but do not add up mentions across runs. To count unique posts over time, store the post IDs you have already read and skip them.
Limits to plan for
- Small samples. About 50 posts and 5 threads is a window of recent chatter, not the whole subreddit. Raise
LISTING_PAGESandTHREADSfor more text, and expect the cost to rise. - Comments are partial. A thread response holds about 40 comments.
- Cached for about 15 minutes. Running more often returns the same data.
- Word-list sentiment is crude. Replace
mood()with a model when the data matters. - False positives remain. Add the words you see in the output to
NOT_TICKERS. - Check Reddit's terms for how you may use post content, especially in a paid product, and remember that none of this is financial advice.
Cost
One run costs 11 requests: 2 listing pages at weight 2, 5 threads at 1 each, and 1 quotes call at weight 2. Running it hourly is 264 requests a day, or about 7,900 a month, which fits the Starter plan ($14.99/mo, 10,000 requests). Every 15 minutes is about 31,700 a month, which fits the Developer plan ($39.99/mo, 50,000 requests). The Free plan's 500 requests a month covers about 45 runs. The standard rate limit is 10 requests per second per account, and only HTTP 200 responses count toward your quota.
Bonus: ask the question directly
If you use Claude Code, Cursor, VS Code, or any MCP client, you can connect it to https://api.steadyapi.com/mcp with your API key. Then you can ask what r/wallstreetbets is talking about, and what a ticker did today, in plain English, before you write any code.
Conclusion
You read recent posts and comments, extracted tickers, filtered them with a live quotes call, scored the mood with a simple word list, and saved each run to a CSV. The pieces are separate on purpose, so you can swap in a better ticker list or a better classifier without touching the rest.
Create a free account at steadyapi.com (no card required) and run it once to see what the crowd is talking about. The API documentation lists every Reddit and markets parameter with ready-made examples in cURL, JavaScript, PHP, and Python.