SkillAgentSearch skills...

upstox

Upstox API v2: portfolio, market data, orders, P&L (Indian F&O)

Install / Use

npx skills add taracodlabs/aiden --skill upstox

Installs into whichever agent you are using.

About this skill
📄

SKILL.md

Installable skill definition

Quality Score

85/100

Supported Platforms

Universal

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.

Substance
26/30
Structure
20/20
Description
12/15
Adoption
12/20
Freshness
15/15

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 found

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.

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.

SkillScoreStarsUpdatedFormat
upstox (this skill)by taracodlabs858432mo agoSKILL.md
taste-skillby Leonxlnx100117.6k9d agoCLAUDE.md
Agent-Reachby Panniantong100112.7k9d agoCLAUDE.md
headroomby headroomlabs-ai10079.9ktodayCLAUDE.md
ai-job-searchby ai-job-search-dev10072.3ktodayCLAUDE.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.

name: 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

View on GitHub
GitHub Stars843
CategoryDevelopment
Updated2mo ago
Forks147

Languages

TypeScript

Trust signals

100/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

No cautions