Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Accesses the Upstox API v2 to check holdings, positions, live quotes, orders and margins for Indian markets.
77% 100%+23 ptsof test cases passed
Passed 22 of 22 test cases with the skill, and 17 of 22 without it.
3 of 3 safety checks passed
41 agent runs
Access your Upstox brokerage account via the Upstox API v2 — live quotes, holdings, positions, order placement, and margin data. Requires Upstox API 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"
}
$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)}}
$resp = Invoke-RestMethod -Uri "$baseUrl/portfolio/short-term-positions" -Headers $headers
$resp.data | Select-Object tradingsymbol, quantity, average_price, last_price, pnl, product
$instrument = "NSE_EQ|INE009A01021" # INFOSYS ISIN-based instrument key
Next to this one in the catalogue, plus more from the same author.