NSE stock market analysis using Groww API. Use when users ask about Indian stocks, live prices, technical analysis, RSI, moving averages, or market comparison.
85
81%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Advisory
Suggest reviewing before use
Read-only NSE stock analysis using Groww Trading API.
┌─────────────────────────────────────────┐
│ Opencode Agent │
│ (handles reasoning & decisions) │
└─────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────┐
│ Markdown Skills │
├─────────────────────────────────────────┤
│ stock-data.md - Live/HIST data │
│ technical.md - RSI, MA, MACD │
│ compare.md - Stock comparison │
│ news-analysis.md - News & sentiment │
│ analysis-workflow.md - Complete workflow │
└─────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────┐
│ Data Sources │
├─────────────────────────────────────────┤
│ Groww API - Live prices, RSI │
│ Web Search - News, sentiment │
│ Python Tools - Analysis scripts │
└─────────────────────────────────────────┘# Install dependencies
pip install growwapi pyotp python-dotenv
# Set environment variables
cp .env.example .env
# Edit .env with your Groww API credentials# Option 1: API Key + Secret
GROWW_API_KEY=your_api_key
GROWW_API_SECRET=your_api_secret
# Option 2: TOTP (no daily re-auth)
GROWW_API_KEY=your_totp_token
GROWW_USE_TOTP=true
GROWW_TOTP_SECRET=your_totp_secret
# Option 3: Pre-generated access token
GROWW_ACCESS_TOKEN=your_access_token# Get stock data with RSI
python tools/stock_data.py RELIANCE INFY --quote --rsi
# Calculate technical indicators
python tools/technical.py RELIANCE --indicators rsi,ma,macd
# Compare multiple stocks
python tools/compare.py RELIANCE INFY TCS --fullfrom tools.groww_client import GrowwClient
from tools.portfolio_analyzer import PortfolioAnalyzer
from tools.technical import calculate_indicators
from tools.compare import compare_stocks
# Initialize
client = GrowwClient()
# Get prices
prices = client.get_ltp(["RELIANCE", "INFY"])
# {'NSE_RELIANCE': 2500.5, 'NSE_INFY': 1580.25}
# Get full quote
quote = client.get_quote("RELIANCE")
# Calculate RSI
rsi = client.calculate_rsi("RELIANCE")
# 58.5
# Get moving averages
ma = client.calculate_moving_averages("RELIANCE")
# {'sma_20': 2450.0, 'sma_50': 2400.0}
# Portfolio - Holdings
holdings = client.get_holdings()
# {'holdings': [{'trading_symbol': 'RELIANCE', 'quantity': 10, 'average_price': 2500}]}
# Portfolio - Positions
positions = client.get_positions()
# {'positions': [{'trading_symbol': 'RELIANCE', 'segment': 'CASH', 'realised_pnl': 500}]}
# Full Portfolio Analysis
analyzer = PortfolioAnalyzer()
summary = analyzer.analyze_portfolio()
# {'total_invested': 65500, 'current_value': 65900, 'total_pl_percentage': 0.61, ...}
# Compare stocks
comparison = compare_stocks(["RELIANCE", "INFY", "TCS"], full=True)skills/stock-data.md)skills/technical.md)skills/compare.md)skills/portfolio.md)skills/news-analysis.md)websearch tool to fetch newsskills/analysis-workflow.md)User: "What's the RSI for RELIANCE and INFY?"
Agent:
python tools/stock_data.py RELIANCE INFY --rsiResponse:
{
"RELIANCE": {"ltp": 2500.5, "rsi": 58.5},
"INFY": {"ltp": 1580.25, "rsi": 62.3}
}Interpretation: Both in neutral zone (30-70), INFY slightly overbought.
User: "Compare RELIANCE vs TCS for short-term trading"
Agent:
python tools/compare.py RELIANCE TCS --full
python tools/technical.py RELIANCE --indicators rsi,ma,trend
python tools/technical.py TCS --indicators rsi,ma,trend| Tool | Purpose | Example |
|---|---|---|
stock_data.py | Get prices/data | python tools/stock_data.py RELIANCE --quote |
technical.py | Calculate indicators | python tools/technical.py RELIANCE --indicators rsi,ma |
compare.py | Compare stocks | python tools/compare.py RELIANCE INFY |
portfolio_analyzer.py | Portfolio analysis | python tools/portfolio_analyzer.py --analyze |
groww_client.py | API wrapper | client.get_holdings() |
news_tools.py | Sentiment analysis | analyze_sentiment(news_data) |
# View your holdings with P&L
python tools/portfolio_analyzer.py --holdings
# Full portfolio analysis
python tools/portfolio_analyzer.py --analyze
# View positions (intraday/F&O)
python tools/portfolio_analyzer.py --positions --segment FNOfrom tools.groww_client import GrowwClient
from tools.portfolio_analyzer import PortfolioAnalyzer
client = GrowwClient()
# Get holdings
holdings = client.get_holdings()
# {'holdings': [{'trading_symbol': 'RELIANCE', 'quantity': 10, 'average_price': 2500, ...}]}
# Get positions
positions = client.get_positions()
# {'positions': [{'trading_symbol': 'RELIANCE', 'segment': 'CASH', 'realised_pnl': 500, ...}]}
# Full analysis with P&L
analyzer = PortfolioAnalyzer()
summary = analyzer.analyze_portfolio()
# Returns total invested, current value, P&L, best/worst performersSearch news: Use agent's websearch tool
websearch(query="HDFCBANK stock news March 2026", numResults=10)Analyze sentiment: Use analyze_sentiment() from news_tools
from skills.news_tools import analyze_sentiment
sentiment = analyze_sentiment({"results": news_articles})Assess impact: Combine with technical data for complete analysis
This agent only reads market data. No order placement, no trading.
aa3e399
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.