Install any skill in seconds. Free to start, no credit card required.
Get Started Free →NSE options chain: OI buildup, PCR, max pain, IV (Nifty/BankNifty)
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-11 | ✗→✓ | ▲ Improved | 20% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 165% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 36% | 0% |
| case-19 | ✗→✓ | ▲ Improved | 75% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 14% | 0% |
Analyze NSE options chain for Nifty and BankNifty — open interest buildup, put-call ratio, max pain level, and implied volatility — using NSE's public JSON API.
powershell$headers = @{ "User-Agent" = "Mozilla/5.0"; "Referer" = "https://www.nseindia.com" } Invoke-WebRequest -Uri "https://www.nseindia.com" -SessionVariable nse -Headers $headers | Out-Null $chain = Invoke-RestMethod -Uri "https://www.nseindia.com/api/option-chain-indices?symbol=NIFTY" ` -Headers $headers -WebSession $nse $chain.records.data | Select-Object strikePrice, @{N='CE_OI';E={$_.CE.openInterest}}, @{N='CE_IV';E={$_.CE.impliedVolatility}}, @{N='PE_OI';E={$_.PE.openInterest}}, @{N='PE_IV';E={$_.PE.impliedVolatility}} | Where-Object { $_.CE_OI -or $_.PE_OI } | Sort-Object strikePrice
powershell$headers = @{ "User-Agent" = "Mozilla/5.0"; "Referer" = "https://www.nseindia.com" } Invoke-WebRequest -Uri "https://www.nseindia.com" -SessionVariable nse -Headers $headers | Out-Null $chain = Invoke-RestMethod -Uri "https://www.nseindia.com/api/option-chain-indices?symbol=NIFTY" ` -Headers $headers -WebSession $nse $totalCE_OI = ($chain.records.data | ForEach-Object { $_.CE.openInterest } | Measure-Object -Sum).Sum $totalPE_OI = ($chain.records.data | ForEach-Object { $_.PE.openInterest } | Measure-Object -Sum).Sum $pcr = [math]::Round($totalPE_OI / $totalCE_OI, 2) Write-Host "Nifty PCR: $pcr (CE OI: $totalCE_OI | PE OI: $totalPE_OI)"
powershell$headers = @{ "User-Agent" = "Mozilla/5.0"; "Referer" = "https://www.nseindia.com" } Invoke-WebRequest -Uri "https://www.nseindia.com" -SessionVariable nse -Headers $headers | Out-Null $chain = Invoke-RestMethod -Uri "https://www.nseindia.com/api/option-chain-indices?symbol=NIFTY" ` -Headers $headers -WebSession $nse $strikes = $chain.records.data | Select-Object strikePrice, @{N='CE_OI';E={$_.CE.openInterest}}, @{N='PE_OI';E={$_.PE.openInterest}} | Where-Object { $_.strikePrice } # Max pain = strike where total dollar loss for option holders is maximum $maxPainStrike = $strikes | ForEach-Object { $s = $_.strikePrice $pain = ($strikes | ForEach-Object { $ceVal = [math]::Max(0, $s - $_.strikePrice) * $_.CE_OI $peVal = [math]::Max(0, $_.strikePrice - $s) * $_.PE_OI $ceVal + $peVal } | Measure-Object -Sum).Sum [PSCustomObject]@{ Strike = $s; TotalPain = $pain } } | Sort-Object TotalPain | Select-Object -First 1 Write-Host "Max Pain Strike: $($maxPainStrike.Strike)"
powershell$chain.records.data | Where-Object { $_.CE.openInterest -gt 0 } | Sort-Object { $_.CE.openInterest } -Descending | Select-Object -First 5 strikePrice, @{N='CE_OI';E={$_.CE.openInterest}}, @{N='CE_OI_Change';E={$_.CE.changeinOpenInterest}}
powershell$chain.records.data | Where-Object { $_.PE.openInterest -gt 0 } | Sort-Object { $_.PE.openInterest } -Descending | Select-Object -First 5 strikePrice, @{N='PE_OI';E={$_.PE.openInterest}}, @{N='PE_OI_Change';E={$_.PE.changeinOpenInterest}}
"What is the current Nifty PCR?" → Fetch chain, sum all CE and PE OI, divide PE by CE — PCR > 1.2 is bullish, < 0.8 is bearish.
"Where is max pain for this week's expiry?" → Run the max pain calculation across all strikes and return the strike with minimum total option holder loss.
"Show me the top 5 CE and PE OI strikes for BankNifty" → Change URL to symbol=BANKNIFTY and sort by OI descending.
Other measured skills in the registry, with their headline benchmark lift.