upstox
Upstox API v2: portfolio, market data, orders, P&L (Indian F&O)
Install / Use
npx skills add taracodlabs/aiden --skill upstoxInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of upstox
upstox scores 85/100 on our quality scale, 2740th of 4,702 Development & Engineering skills we index.
Its SKILL.md is 3.6 KB long, well organised into 12 sections with 7 code examples: a solid amount of guidance for an agent.
It has 843 GitHub stars, a meaningful sign that others use it.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so upstox is actively maintained.
- Our last check on 2026-11-05 found the source still online.
- It is released under AGPL-3.0, a copyleft license: you can use it, but modified versions you distribute must carry the same license.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-10-06. Automated pattern scan on 2026-10-06. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
upstox compared with similar skills
All 4 of these similar skills score higher than upstox; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| upstox (this skill)by taracodlabs | 85 | 843 | 2mo ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 117.6k | 9d ago | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 112.7k | 9d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 79.9k | today | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 72.3k | today | CLAUDE.md |
Frequently asked questions
- How do I install upstox?
- Run
npx skills add taracodlabs/aiden --skill upstox. The install tabs above show the steps for each supported agent. - Which AI agents does upstox work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is upstox safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is AGPL-3.0-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is upstox still maintained?
- The repository was last updated about 2 months ago, so upstox is actively maintained.
Skill content
View source on GitHubname: upstox description: "Upstox API v2: portfolio, market data, orders, P&L (Indian F&O)" category: india version: 1.0.0 tags: upstox, broker, india, trading, orders, portfolio, equity, fno, market license: Apache-2.0
Upstox
Access your Upstox brokerage account via the Upstox API v2 — live quotes, holdings, positions, order placement, and margin data. Requires Upstox API credentials.
When to Use
- User wants to check Upstox portfolio holdings or positions
- User asks for live market quotes on NSE/BSE instruments
- User wants to place, modify, or cancel an Upstox order
- User asks about today's P&L, order book, or trade history
- User wants margin or funds information
How to Use
Set up credentials
$env:UPSTOX_TOKEN = "your_access_token" # Bearer token from OAuth flow
$baseUrl = "https://api.upstox.com/v2"
$headers = @{
"Authorization" = "Bearer $env:UPSTOX_TOKEN"
"Accept" = "application/json"
}
Get holdings
$resp = Invoke-RestMethod -Uri "$baseUrl/portfolio/long-term-holdings" -Headers $headers
$resp.data | Select-Object tradingsymbol, quantity, average_price, last_price,
@{N='PnL';E={[math]::Round(($_.last_price - $_.average_price)*$_.quantity,2)}}
Get short-term positions (intraday / F&O)
$resp = Invoke-RestMethod -Uri "$baseUrl/portfolio/short-term-positions" -Headers $headers
$resp.data | Select-Object tradingsymbol, quantity, average_price, last_price, pnl, product
Get live market quote
$instrument = "NSE_EQ|INE009A01021" # INFOSYS ISIN-based instrument key
$resp = Invoke-RestMethod -Uri "$baseUrl/market-quote/quotes?instrument_key=$instrument" -Headers $headers
$resp.data | Select-Object last_price, net_change, volume, ohlc
Get funds and margin
$resp = Invoke-RestMethod -Uri "$baseUrl/user/get-funds-and-margin" -Headers $headers
$resp.data | Select-Object equity
Place a market order
$order = @{
quantity = 1
product = "D" # D = delivery, I = intraday
validity = "DAY"
price = 0
tag = "aiden"
instrument_token = "NSE_EQ|INE009A01021"
order_type = "MARKET"
transaction_type = "BUY"
disclosed_quantity = 0
trigger_price = 0
is_amo = $false
} | ConvertTo-Json
$resp = Invoke-RestMethod -Uri "$baseUrl/order/place" -Method POST `
-Headers ($headers + @{"Content-Type"="application/json"}) -Body $order
Write-Host "Order ID: $($resp.data.order_id)"
Get order book
$resp = Invoke-RestMethod -Uri "$baseUrl/order/retrieve-all" -Headers $headers
$resp.data | Select-Object order_id, tradingsymbol, transaction_type,
quantity, price, status, order_timestamp |
Sort-Object order_timestamp -Descending
Examples
"Show my Upstox portfolio" → Fetch long-term holdings, calculate unrealized P&L per position, sum total.
"What's the live price of Reliance?"
→ Use instrument key NSE_EQ|INE002A01018 and fetch /market-quote/quotes.
"Place a buy order for 5 shares of TCS"
→ POST to /order/place with instrument key for TCS, qty 5, product D, order_type MARKET — confirm first.
Cautions
- Access tokens expire after 24 hours — regenerate via Upstox OAuth flow each trading day
- Instrument keys use the format
EXCHANGE|ISIN— look up via Upstox instruments CSV download - Always confirm order parameters with the user before calling the place order endpoint
- Use product
I(intraday) only if you intend to square off before 3:20 PM IST — auto square-off applies - F&O instruments require appropriate margin — check funds before placing F&O orders
Related Skills
taste-skill
117.6kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
Agent-Reach
112.7kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
79.9kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
ai-job-search
72.3kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
