Connect your system to Upstox
and trade your way
Comprehensive API suite for all your needs.
Getting Started
Everything you need before your first API call — set up auth, explore API structure, test in sandbox, browse instruments, understand rate limits, and connect via SDK.
Account & Funds
Access user profiles, check your fund balances, initiate payouts, track brokerage charges, check margin requirements for your trade, and configure kill switch and static IP controls.
Orders & Trading
Full order lifecycle in one place — place, modify, cancel, exit all positions, manage GTT and multi-orders, and explore IPOs.
Portfolio
Analytics TokenTrack your positions, holdings, mutual fund investments, and detailed profit & loss reports including trade charges.
Market Data
Analytics TokenPower your strategies with real-time quotes, historical candles, option chains, expired instruments, market information, fundamentals, and news.
Realtime & Streaming
Analytics TokenStay ahead with live WebSocket feeds for market data and portfolio updates, plus webhooks for order and GTT notifications.
Analytics Token
Generated once, no daily re-authorization needed — unlike the standard access token, which must be regenerated every day. Powers Market Data and Realtime & Streaming APIs.
Portfolio (read-only) and Account & Funds (read-only) APIs are also supported when accessed from a registered static IP.
Learn how to generate an analytics token →curl --location 'https://api.upstox.com/v2/portfolio/long-term-holdings' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {analytics_token}'MCP Integration
Connect your Upstox trading account to AI assistants like Claude, ChatGPT, Cursor, and VS Code using the Model Context Protocol.
Add the configuration to your AI client and authorize once — your assistant gains read-only access to your holdings, orders, funds, positions, mutual funds and profile.
Set up MCP Integration →{
"mcpServers": {
"Upstox MCP": {
"command": "npx",
"args": [
"mcp-remote",
"https://mcp.upstox.com/mcp"
]
}
}
}Sandbox
Test your integration without touching the live market. The sandbox environment closely emulates the real API with no risk and no time restrictions.
Currently supports place, modify, and cancel order APIs.
Explore Sandbox →curl --location 'https://sandbox.upstox.com/v2/order/place' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {sandbox_token}' \
--data '{
"quantity": 1,
"product": "D",
"validity": "DAY",
"price": 0,
"instrument_token": "NSE_EQ|INE669E01016",
"order_type": "MARKET",
"transaction_type": "BUY",
"disclosed_quantity": 0,
"trigger_price": 0
}'Agent Skills
Open SKILL.md packs that give your AI coding agent deep knowledge of Upstox APIs — from order placement and portfolio access to live market feeds and option strategies. Works with Claude Code, Codex, and any SKILL.md-compatible agent.
Built-in guardrails: order confirmation before every place, modify, or cancel. LIMIT-by-default pricing. Lot-size validation for F&O. Your agent stays a knowledgeable assistant, not an autonomous trader.
Explore Agent Skills →# 1. Install the skill pack
$ npx skills add upstox/upstox-skills --skill upstox
✓ installed (10 references · 10 examples)
# 2. Authenticate once
$ export UPSTOX_ACCESS_TOKEN="<your-daily-token>"
# 3. Talk to your agent
> "Buy 10 SBIN at 820, intraday"
✓ Order summary shown — awaiting your confirmationWhat's coming next
Upstox Cloud
Cloud infrastructure purpose-built for algorithmic trading — deploy, run and scale strategies on reliable, low-latency infra without managing servers.