Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Queries Zerodha Kite Connect for holdings, positions, live NSE/BSE quotes, orders, margins and P&L via REST API.
55% 86%+32 ptsof test cases passed
Passed 19 of 22 test cases with the skill, and 12 of 22 without it.
3 of 3 safety checks passed
Not used yet
Access your Zerodha account via the Kite Connect REST API — fetch portfolio, live quotes, place orders, and check order history. Requires a Kite Connect API subscription.
$env:KITE_API_KEY = "your_api_key"
$env:KITE_ACCESS_TOKEN = "your_access_token" # Obtained after daily login flow
$baseUrl = "https://api.kite.trade"
$headers = @{
"X-Kite-Version" = "3"
"Authorization" = "token $($env:KITE_API_KEY):$($env:KITE_ACCESS_TOKEN)"
}
$holdings = Invoke-RestMethod -Uri "$baseUrl/portfolio/holdings" -Headers $headers
$holdings.data | Select-Object tradingsymbol, quantity, average_price, last_price,
@{N='PnL';E={[math]::Round(($_.last_price - $_.average_price) * $_.quantity, 2)}}
$positions = Invoke-RestMethod -Uri "$baseUrl/portfolio/positions" -Headers $headers
$positions.data.net | Select-Object tradingsymbol, quantity, average_price, last_price, pnl
Next to this one in the catalogue, plus more from the same author.