Reddit subreddits like r/wallstreetbets, r/stocks, and r/investing contain early trading signals buried in due diligence posts and discussion threads. Querying Reddit via SERP API returns these posts as structured JSON without OAuth, rate limits, or Reddit API credentials. Each subreddit scan costs $0.005.
Prerequisites
- Python 3.8+
- requests library
- A Scavio API key from scavio.dev
- List of tickers or sectors to scan
Walkthrough
Step 1: Scan financial subreddits for ticker mentions
Search multiple trading subreddits for mentions of target tickers.
import os, requests
from collections import Counter, defaultdict
API_KEY = os.environ['SCAVIO_API_KEY']
SH = {'x-api-key': API_KEY, 'Content-Type': 'application/json'}
SUBREDDITS = ['wallstreetbets', 'stocks', 'investing', 'options']
TICKERS = ['NVDA', 'TSLA', 'AMD', 'PLTR', 'SOFI']
def scan_subreddit(ticker, subreddit):
data = requests.post('https://api.scavio.dev/api/v1/search',
headers=SH, json={'query': f'{ticker} site:reddit.com/r/{subreddit}',
'country_code': 'us'}).json()
posts = data.get('organic_results', [])
return [{'title': p.get('title', ''), 'snippet': p.get('snippet', ''),
'link': p.get('link', '')} for p in posts]
signals = defaultdict(list)
for ticker in TICKERS:
for sub in SUBREDDITS:
posts = scan_subreddit(ticker, sub)
for p in posts:
signals[ticker].append({**p, 'subreddit': sub})
print(f'{ticker}: {len(signals[ticker])} posts across {len(SUBREDDITS)} subreddits')
print(f'Cost: ${len(TICKERS) * len(SUBREDDITS) * 0.005:.3f}')Step 2: Classify signal types from post content
Detect DD posts, YOLO plays, sentiment shifts, and catalysts from titles.
DD_SIGNALS = ['dd', 'due diligence', 'analysis', 'thesis', 'deep dive', 'research']
YOLO_SIGNALS = ['yolo', 'all in', 'bet', 'calls', 'puts', 'options play']
CATALYST_SIGNALS = ['earnings', 'fda', 'merger', 'acquisition', 'guidance', 'contract']
def classify_signal(title, snippet):
text = f'{title} {snippet}'.lower()
if any(s in text for s in DD_SIGNALS): return 'DD'
if any(s in text for s in YOLO_SIGNALS): return 'YOLO'
if any(s in text for s in CATALYST_SIGNALS): return 'CATALYST'
return 'DISCUSSION'
def build_signal_report(signals):
print(f'\n=== Reddit Trading Signals Report ===')
for ticker, posts in sorted(signals.items(), key=lambda x: len(x[1]), reverse=True):
signal_types = Counter(classify_signal(p['title'], p['snippet']) for p in posts)
print(f'\n {ticker} ({len(posts)} posts):')
for stype, count in signal_types.most_common():
print(f' {stype:12}: {count} posts')
# Show top DD post if any
dd_posts = [p for p in posts if classify_signal(p['title'], p['snippet']) == 'DD']
if dd_posts:
print(f' Top DD: {dd_posts[0]["title"][:60]}')
build_signal_report(signals)Step 3: Generate actionable signal summary
Rank tickers by signal strength and output a daily watchlist.
def daily_watchlist(signals):
ranked = []
for ticker, posts in signals.items():
types = Counter(classify_signal(p['title'], p['snippet']) for p in posts)
score = types.get('DD', 0) * 3 + types.get('CATALYST', 0) * 2 + types.get('YOLO', 0) * 1
ranked.append({'ticker': ticker, 'posts': len(posts), 'score': score,
'dd': types.get('DD', 0), 'catalyst': types.get('CATALYST', 0)})
ranked.sort(key=lambda x: x['score'], reverse=True)
print(f'\n=== Daily Watchlist - Reddit Signals ===')
for r in ranked:
heat = 'HOT' if r['score'] >= 5 else 'WARM' if r['score'] >= 2 else 'COOL'
print(f' {r["ticker"]:6} | {heat:4} | Score:{r["score"]:3} | DD:{r["dd"]} CAT:{r["catalyst"]} | {r["posts"]} posts')
total_queries = len(TICKERS) * len(SUBREDDITS)
print(f'\nTotal cost: ${total_queries * 0.005:.3f} ({total_queries} queries)')
daily_watchlist(signals)Python Example
import os, requests
SH = {'x-api-key': os.environ['SCAVIO_API_KEY'], 'Content-Type': 'application/json'}
def reddit_signal(ticker):
data = requests.post('https://api.scavio.dev/api/v1/search',
headers=SH, json={'query': f'{ticker} DD site:reddit.com/r/wallstreetbets', 'country_code': 'us'}).json()
posts = data.get('organic_results', [])
print(f'{ticker}: {len(posts)} DD posts on WSB')
for p in posts[:2]:
print(f' {p.get("title", "")[:60]}')
for t in ['NVDA', 'TSLA']: reddit_signal(t)
print('Cost: $0.010')JavaScript Example
const SH = { 'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json' };
async function redditSignal(ticker) {
const data = await fetch('https://api.scavio.dev/api/v1/search', {
method: 'POST', headers: SH,
body: JSON.stringify({ query: `${ticker} DD site:reddit.com/r/wallstreetbets`, country_code: 'us' })
}).then(r => r.json());
console.log(`${ticker}: ${(data.organic_results || []).length} DD posts`);
}
for (const t of ['NVDA', 'TSLA']) await redditSignal(t);Expected Output
NVDA: 18 posts across 4 subreddits
TSLA: 22 posts across 4 subreddits
AMD: 14 posts across 4 subreddits
Cost: $0.100
=== Daily Watchlist - Reddit Signals ===
NVDA | HOT | Score: 8 | DD:2 CAT:1 | 18 posts
TSLA | WARM | Score: 4 | DD:1 CAT:0 | 22 posts
PLTR | WARM | Score: 3 | DD:1 CAT:0 | 12 posts
AMD | COOL | Score: 1 | DD:0 CAT:0 | 14 posts
SOFI | COOL | Score: 0 | DD:0 CAT:0 | 8 posts
Total cost: $0.100 (20 queries)