Groww MCP Server
A comprehensive Model Context Protocol (MCP) server for the Groww Trading API. This server provides tools to interact with Groww’s trading platform, enabling you to place orders, manage your portfolio, access live market data, and more.
Features
This MCP server provides access to all major Groww API endpoints:
Instruments & Search
download_instruments_csv
- Download/refresh complete tradeable instruments datasearch_instruments
- Search for instruments by name, trading symbol, groww symbol, or criteriaget_instrument_details
- Get detailed information about a specific instrument
Orders Management
place_order
- Place new orders (stocks, F&O)modify_order
- Modify existing pending/open orderscancel_order
- Cancel pending/open ordersget_order_status
- Get order status by Groww order IDget_order_status_by_reference
- Get order status by user reference IDget_order_list
- Get list of all orders for the dayget_order_details
- Get detailed order informationget_order_trades
- Get all trades/executions for an order
Portfolio Management
get_holdings
- Get current stock holdings in DEMAT accountget_positions
- Get all trading positionsget_position_by_symbol
- Get position for specific trading symbol
Margin Management
get_user_margin
- Get available margin detailscalculate_margin_requirement
- Calculate required margin for orders
Live Market Data
get_live_quote
- Get complete live market data for instrumentsget_ltp
- Get Last Traded Price for multiple instruments (up to 50)get_ohlc
- Get OHLC data for multiple instruments (up to 50)
Historical Data
get_historical_data
- Get historical candle data for instruments
Technical Analysis
calculate_moving_averages
- Calculate SMA and EMA for trend analysiscalculate_rsi
- Calculate Relative Strength Index for momentum analysiscalculate_bollinger_bands
- Calculate Bollinger Bands for volatility analysiscalculate_support_resistance
- Identify key support and resistance levelscalculate_volatility_metrics
- Calculate various volatility metrics for risk assessmentcalculate_macd
- Calculate MACD for trend and momentum analysiscalculate_stochastic
- Calculate Stochastic Oscillator for momentum analysiscalculate_williams_r
- Calculate Williams %R for momentum analysiscalculate_adx
- Calculate ADX for trend strength analysiscalculate_fibonacci_levels
- Calculate Fibonacci retracement and extension levelsanalyze_candlestick_patterns
- Identify common candlestick patterns
Prerequisites
- Groww Account: You need a Groww account with F&O trading enabled
- API Subscription: Active Trading API subscription (₹499 + taxes per month)
- API Key: Generate your API access token from Groww account settings
Generating API Key
- Log in to your Groww account
- Click on the profile section at the top-right
- Click on the settings icon
- Navigate to ‘Trading APIs’
- Create and manage your API tokens
Configuration
The server requires the following configuration:
{
"apiKey": "your_groww_api_key_here",
"debug": false
}
API Enums and Constants
Exchanges
NSE
- National Stock ExchangeBSE
- Bombay Stock Exchange
Segments
CASH
- Regular equity marketFNO
- Futures and Options
Order Types
MARKET
- Execute immediately at best available priceLIMIT
- Execute at specified price or betterSL
- Stop Loss orderSL_M
- Stop Loss Market order
Transaction Types
BUY
- Long positionSELL
- Short position
Product Types
CNC
- Cash and Carry (delivery-based)MIS
- Margin Intraday Square-offNRML
- Regular margin trading
Validity
DAY
- Valid until market close
Usage Examples
Search for Instruments
// Search for instruments containing "reliance"
search_instruments({
query: "reliance",
exchange: "NSE",
segment: "CASH",
limit: 5
})
// Search for NIFTY options
search_instruments({
query: "nifty",
segment: "FNO",
instrument_type: "CE",
limit: 10
})
// Get details for a specific symbol
get_instrument_details({
trading_symbol: "RELIANCE",
exchange: "NSE"
})
Place a Market Order
// Buy 10 shares of RELIANCE at market price
place_order({
trading_symbol: "RELIANCE",
quantity: 10,
exchange: "NSE",
segment: "CASH",
product: "CNC",
order_type: "MARKET",
transaction_type: "BUY"
})
Place a Limit Order
// Buy 100 shares of WIPRO at ₹250 per share
place_order({
trading_symbol: "WIPRO",
quantity: 100,
exchange: "NSE",
segment: "CASH",
product: "CNC",
order_type: "LIMIT",
transaction_type: "BUY",
price: 250
})
Place a Stop Loss Order
// Stop loss order for RELIANCE
place_order({
trading_symbol: "RELIANCE",
quantity: 10,
exchange: "NSE",
segment: "CASH",
product: "CNC",
order_type: "SL",
transaction_type: "SELL",
price: 2450,
trigger_price: 2400
})
Get Live Market Data
// Get live quote for NIFTY
get_live_quote({
trading_symbol: "NIFTY",
exchange: "NSE",
segment: "CASH"
})
// Get LTP for multiple symbols
get_ltp({
segment: "CASH",
exchange_symbols: ["NSE_RELIANCE", "NSE_TCS", "NSE_INFY"]
})
Get Historical Data
// Get 5-minute candles for RELIANCE
get_historical_data({
trading_symbol: "RELIANCE",
exchange: "NSE",
segment: "CASH",
start_time: "2024-01-01 09:15:00",
end_time: "2024-01-01 15:30:00",
interval_in_minutes: 5
})
Technical Analysis Examples
// Calculate moving averages
calculate_moving_averages({
trading_symbol: "RELIANCE",
exchange: "NSE",
segment: "CASH",
start_time: "2024-01-01 09:15:00",
end_time: "2024-01-31 15:30:00",
periods: [5, 10, 20, 50]
})
// Calculate RSI
calculate_rsi({
trading_symbol: "NIFTY",
exchange: "NSE",
segment: "CASH",
start_time: "2024-01-01 09:15:00",
end_time: "2024-01-31 15:30:00",
period: 14
})
// Calculate Bollinger Bands
calculate_bollinger_bands({
trading_symbol: "RELIANCE",
exchange: "NSE",
segment: "CASH",
start_time: "2024-01-01 09:15:00",
end_time: "2024-01-31 15:30:00",
period: 20,
std_dev: 2
})
// Find support and resistance levels
calculate_support_resistance({
trading_symbol: "RELIANCE",
exchange: "NSE",
segment: "CASH",
start_time: "2023-12-01 09:15:00",
end_time: "2024-01-31 15:30:00",
interval_in_minutes: 60,
min_touches: 2
})
// Calculate volatility metrics
calculate_volatility_metrics({
trading_symbol: "RELIANCE",
exchange: "NSE",
segment: "CASH",
start_time: "2023-01-01 09:15:00",
end_time: "2024-01-31 15:30:00",
interval_in_minutes: 1440 // Daily candles
})
// Calculate MACD
calculate_macd({
trading_symbol: "RELIANCE",
exchange: "NSE",
segment: "CASH",
start_time: "2024-01-01 09:15:00",
end_time: "2024-01-31 15:30:00",
fast_period: 12,
slow_period: 26,
signal_period: 9
})
// Calculate Stochastic Oscillator
calculate_stochastic({
trading_symbol: "NIFTY",
exchange: "NSE",
segment: "CASH",
start_time: "2024-01-01 09:15:00",
end_time: "2024-01-31 15:30:00",
k_period: 14,
d_period: 3
})
// Calculate Williams %R
calculate_williams_r({
trading_symbol: "RELIANCE",
exchange: "NSE",
segment: "CASH",
start_time: "2024-01-01 09:15:00",
end_time: "2024-01-31 15:30:00",
period: 14
})
// Calculate ADX for trend strength
calculate_adx({
trading_symbol: "RELIANCE",
exchange: "NSE",
segment: "CASH",
start_time: "2024-01-01 09:15:00",
end_time: "2024-01-31 15:30:00",
period: 14
})
// Calculate Fibonacci levels
calculate_fibonacci_levels({
trading_symbol: "RELIANCE",
exchange: "NSE",
segment: "CASH",
start_time: "2023-12-01 09:15:00",
end_time: "2024-01-31 15:30:00",
trend_direction: "AUTO"
})
// Analyze candlestick patterns
analyze_candlestick_patterns({
trading_symbol: "RELIANCE",
exchange: "NSE",
segment: "CASH",
start_time: "2024-01-25 09:15:00",
end_time: "2024-01-31 15:30:00",
lookback_candles: 5
})
Calculate Margin Requirements
// Calculate margin for basket orders
calculate_margin_requirement({
segment: "CASH",
orders: [
{
trading_symbol: "RELIANCE",
transaction_type: "BUY",
quantity: 10,
order_type: "LIMIT",
product: "CNC",
exchange: "NSE",
price: 2500
},
{
trading_symbol: "TCS",
transaction_type: "BUY",
quantity: 5,
order_type: "MARKET",
product: "CNC",
exchange: "NSE"
}
]
})
Rate Limits
The Groww API has rate limits applied at the category level:
Category | Requests | Per Second | Per Minute | Per Day |
---|---|---|---|---|
Orders | Create, Modify, Cancel | 15 | 250 | 3000 |
Live Data | Quote, LTP, OHLC | 10 | 300 | 5000 |
Non-Trading | Status, List, Holdings, Margin | 10 | 250 | 3000 |
Error Handling
The server handles various types of errors:
- API Authentication Errors: Invalid API key
- Rate Limit Errors: Exceeded API rate limits
- Validation Errors: Invalid parameters
- Trading Errors: Market closed, insufficient margin, etc.
All errors are returned with descriptive messages to help identify and resolve issues.
Support and Documentation
- Groww API Documentation
- Rate Limits
- Error Codes
Disclaimer
Trading Risk Warning:
- Trading in financial markets involves substantial risk of loss
- Past performance does not guarantee future results
- Only trade with money you can afford to lose
- This tool is for educational and development purposes
- Always verify orders and trades manually
- The developers are not responsible for any trading losses
License
This project is licensed under the MIT License.
Groww MCP Server
Project Details
- arkapravasinha/groww-mcp-server
- Last Updated: 6/10/2025
Recomended MCP Servers
An MCP (Model Context Protocol) server that integrates with the ArgoCD API, enabling agentic tools to manage ArgoCD...
Model Context Protocol Servers
AI-powered local MCP server for terminal commands, surgical file editing, process management, and intelligent codebase exploration. FastMCP-powered, file...
A PubMed MCP server.
PayPal-Java-MCP Server
MCP server to connect to the Alpha Vantage APIs
An MCP server that integrates with the Freqtrade cryptocurrency trading bot.
Model Context Protocol (MCP) server for interacting with Meta Ads API
MCP server for analyzing claims, validating sources, and detecting manipulation using multiple epistemological frameworks