get_social_sentiment
Analyze social media sentiment for NSE stocks from Reddit and Twitter. Get bullish/bearish percentages, a BUY/HOLD/SELL signal, and key themes.
Instructions
Analyze social media sentiment for any NSE stock using Reddit + Twitter.
Scrapes up to limit posts from r/IndiaInvestments, r/DalalStreetTalks,
and Twitter/X, classifies each as bullish/bearish/neutral, extracts key
themes, and returns a BUY/HOLD/SELL signal with confidence level.
Falls back to yFinance news headlines if social APIs are not configured.
Args: symbol: NSE stock symbol (e.g. RELIANCE, TCS, INFY) limit: Max posts to analyze (default 100, max 200)
Returns JSON with: - bullish_pct / bearish_pct / neutral_pct - signal (BUY / HOLD / SELL) - confidence (low / medium / high) - key_themes: top recurring topics in the posts - summary: single-line readable summary - sample_posts: top 5 posts with sentiment tag
Setup (optional, for real social data): pip install praw tweepy REDDIT_CLIENT_ID=... REDDIT_CLIENT_SECRET=... TWITTER_BEARER_TOKEN=...
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| symbol | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |