Nse corporate actions

From taracodlabs/aiden · View interactive version

Nse corporate actions is an AI agent skill from the GitHub repository taracodlabs/aiden. NSE corp actions: dividends, bonus, splits, rights, buybacks

How to use this skill

Skill file

NSE Corporate Actions

Fetch upcoming and recent corporate actions for NSE-listed stocks — dividends, bonus issues, stock splits, rights issues, and buybacks — using NSE's public API.

When to Use

How to Use

Get corporate actions for a specific stock

$symbol = "INFY"
$headers = @{ "User-Agent" = "Mozilla/5.0"; "Referer" = "https://www.nseindia.com" }
Invoke-WebRequest -Uri "https://www.nseindia.com" -SessionVariable nse -Headers $headers | Out-Null
$resp = Invoke-RestMethod `
  -Uri "https://www.nseindia.com/api/corporates-corporateActions?index=equities&symbol=$symbol" `
  -Headers $headers -WebSession $nse
$resp | Select-Object subject, exDate, recordDate, bcStartDate, bcEndDate, series |
  Sort-Object exDate -Descending | Select-Object -First 10

Get upcoming dividends across the market

$headers = @{ "User-Agent" = "Mozilla/5.0"; "Referer" = "https://www.nseindia.com" }
Invoke-WebRequest -Uri "https://www.nseindia.com" -SessionVariable nse -Headers $headers | Out-Null
$today = (Get-Date).ToString("dd-MM-yyyy")
$resp = Invoke-RestMethod `
  -Uri "https://www.nseindia.com/api/corporates-corporateActions?index=equities&from_date=$today&category=dividend" `
  -Headers $headers -WebSession $nse
$resp | Select-Object symbol, subject, exDate, series |
  Sort-Object exDate | Select-Object -First 20

Get upcoming bonus issues

$headers = @{ "User-Agent" = "Mozilla/5.0"; "Referer" = "https://www.nseindia.com" }
Invoke-WebRequest -Uri "https://www.nseindia.com" -SessionVariable nse -Headers $headers | Out-Null
$resp = Invoke-RestMethod `
  -Uri "https://www.nseindia.com/api/corporates-corporateActions?index=equities&category=bonus" `
  -Headers $headers -WebSession $nse
$resp | Select-Object symbol, subject, exDate, bcStartDate | Sort-Object exDate

Get upcoming stock splits

$headers = @{ "User-Agent" = "Mozilla/5.0"; "Referer" = "https://www.nseindia.com" }
Invoke-WebRequest -Uri "https://www.nseindia.com" -SessionVariable nse -Headers $headers | Out-Null
$resp = Invoke-RestMethod `
  -Uri "https://www.nseindia.com/api/corporates-corporateActions?index=equities&category=splits" `
  -Headers $headers -WebSession $nse
$resp | Select-Object symbol, subject, exDate | Sort-Object exDate

Check if a stock's ex-date has passed (for dividend eligibility)

$symbol = "TCS"
$headers = @{ "User-Agent" = "Mozilla/5.0"; "Referer" = "https://www.nseindia.com" }
Invoke-WebRequest -Uri "https://www.nseindia.com" -SessionVariable nse -Headers $headers | Out-Null
$resp = Invoke-RestMethod `
  -Uri "https://www.nseindia.com/api/corporates-corporateActions?index=equities&symbol=$symbol" `
  -Headers $headers -WebSession $nse
$latest = $resp | Where-Object { $_.subject -match "dividend" } |
  Sort-Object exDate -Descending | Select-Object -First 1
if ($latest) {
  $exDate = [DateTime]::ParseExact($latest.exDate, "dd-MMM-yyyy", $null)
  $status = if ($exDate -gt (Get-Date)) { "UPCOMING (buy before $($latest.exDate))" } else { "PAST (ex-date was $($latest.exDate))" }
  Write-Host "$symbol dividend: $($latest.subject) | Ex-date: $status"
}

Examples

"When is TCS next dividend and what is the ex-date?"

→ Fetch corporate actions for TCS filtered by dividend, sort by exDate, display the most recent upcoming entry.

"Are there any bonus issues this month?"

→ Fetch bonus category from corporate actions API, filter by exDate within current month.

"Has Wipro announced a stock split?"

→ Fetch splits category for WIPRO and check if any entries exist.

Cautions

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.