Skip to main content

Fetch Indian stock market corporate actions from NSE and BSE India. Free, no API keys required.

Project description

india-corp-actions

Fetch Indian stock market corporate actions (dividends, splits, bonus issues, rights, AGMs, buybacks, mergers) directly from NSE and BSE India.

🆓 100% free — no API keys, no paid services required.


Install

pip install india-corp-actions

Quick Start

from india_corp_actions import IndiaCorpActions

client = IndiaCorpActions()

# All upcoming corporate actions (NSE, next 3 months)
df = client.get_actions_df()
print(df)

# Filter by stock symbol
df = client.get_actions_df(symbol="RELIANCE")

# Get only dividends
df = client.get_dividends()

# Get splits, bonus, rights, buybacks
df = client.get_splits()
df = client.get_bonus()
df = client.get_rights()
df = client.get_buybacks()

# Custom date range — pass either DD-MM-YYYY or YYYY-MM-DD, both work
df = client.get_actions_df(from_date="01-01-2025", to_date="31-03-2025")
df = client.get_actions_df(from_date="2025-01-01", to_date="2025-03-31")

# Use BSE as source
df = client.get_actions_df(source="BSE")

# Combine NSE + BSE
df = client.get_actions_df(source="both")

# symbol filter works across both sources
df = client.get_actions_df(symbol="RELIANCE", source="both")

All Methods

Method Description
get_actions_df(...) All corporate actions → DataFrame
get_actions(...) Same but returns List[CorporateAction]
get_dividends() Upcoming dividends
get_bonus() Upcoming bonus issues
get_splits() Upcoming stock splits
get_rights() Upcoming rights issues
get_buybacks() Upcoming buybacks
get_upcoming_results() Quarterly result dates (NSE)
get_board_meetings() Board meeting schedule (NSE)
get_announcements(symbol) Latest announcements (NSE)

Parameters

client.get_actions_df(
    symbol="TCS",           # Optional: filter by symbol (NSE + BSE)
    from_date="01-01-2025", # DD-MM-YYYY or YYYY-MM-DD — defaults to today
    to_date="31-03-2025",   # DD-MM-YYYY or YYYY-MM-DD — defaults to 3 months ahead
    action_type="dividend", # Optional: dividend/bonus/split/rights/agm/egm/buyback/merger/demerger/other
    source="NSE",           # "NSE" (default), "BSE", or "both"
)

DataFrame Columns

Column Description
symbol Stock symbol
company_name Full company name
action_type Classified type (dividend, bonus, split, ...)
ex_date Ex-date ⭐ (most important for trading)
record_date Record date
details Raw description from exchange
series EQ / BE / etc. (NSE only)
face_value Face value of share
bc_start_date Book closure start
bc_end_date Book closure end
source NSE or BSE

How it works

  • NSE: Wraps the official nseindia.com JSON API endpoints. A session is established by warming cookies via the homepage first (required by NSE's anti-bot setup).
  • BSE: Wraps the api.bseindia.com endpoints.
  • No scraping of HTML, no paid APIs, no rate-limited public APIs.
  • Date inputs are accepted as either DD-MM-YYYY or YYYY-MM-DD — the client normalises them automatically for each exchange.

Run Tests

pip install pytest
pytest tests/

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

india_corp_actions-0.2.0.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

india_corp_actions-0.2.0-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file india_corp_actions-0.2.0.tar.gz.

File metadata

  • Download URL: india_corp_actions-0.2.0.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for india_corp_actions-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0c7346453a5546d079b8513b4ccee45e7c91b55dddec85f2f369c174a6b64885
MD5 5cf8f18cb3947ab050fce24f152bb8b9
BLAKE2b-256 c335d4fe2fd937d922bf6b0c42db40f6cd87ee2a0cb0242af042c136ec3dee82

See more details on using hashes here.

File details

Details for the file india_corp_actions-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for india_corp_actions-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 93a88ea3485fd073a3f7443ca087c9bd1f03a4847a72edbf45acf8bf6df988a6
MD5 cf306bc149cb467b8e19f75f517b45da
BLAKE2b-256 13e58a57a0012598de6ff6776dbc780c2eb1d7ac0c16790d5d133e43f010e4f8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page