Skip to main content

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 Token

Track your positions, holdings, mutual fund investments, and detailed profit & loss reports including trade charges.

Market Data

Analytics Token

Power your strategies with real-time quotes, historical candles, option chains, expired instruments, market information, fundamentals, and news.

Realtime & Streaming

Analytics Token

Stay ahead with live WebSocket feeds for market data and portfolio updates, plus webhooks for order and GTT notifications.


Special Token

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
curl --location 'https://api.upstox.com/v2/portfolio/long-term-holdings' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {analytics_token}'
Integrate with AI Assistants

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 →
JSON
{
  "mcpServers": {
    "Upstox MCP": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://mcp.upstox.com/mcp"
      ]
    }
  }
}
Risk-free Testing

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
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
}'
AI Coding Agents

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 →
Shell · 30-second tour
# 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 confirmation
On the roadmap

What's coming next

Coming Soon

Upstox Cloud

Cloud infrastructure purpose-built for algorithmic trading — deploy, run and scale strategies on reliable, low-latency infra without managing servers.

Low-latency runtime
Run strategies on reliable, low-latency infrastructure tuned for live market execution.
Auto-scale strategies
Go from one strategy to hundreds — no servers to provision, no scaling logic to write.
Production-grade by default
Built-in monitoring, logs, and failover — your strategies stay live without ops work.