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 requests pandas beautifulsoup4
# (until published to PyPI, install locally:)
pip install -e .

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 (DD-MM-YYYY for NSE)
df = client.get_actions_df(from_date="01-01-2025", to_date="31-03-2025")

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

# Combine NSE + BSE
df = client.get_actions_df(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 NSE symbol
    from_date="01-01-2025", # DD-MM-YYYY — defaults to today
    to_date="31-03-2025",   # DD-MM-YYYY — defaults to 3 months ahead
    action_type="dividend", # Optional: dividend/bonus/split/rights/agm/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.
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.

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.1.0.tar.gz (3.2 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.1.0-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: india_corp_actions-0.1.0.tar.gz
  • Upload date:
  • Size: 3.2 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.1.0.tar.gz
Algorithm Hash digest
SHA256 51403b1f5ee60e87e594bd006920e6fe8146374f3d8ceff3fb72a0d6fb35bf81
MD5 aea07c6ced508dab13e11035a3ea9889
BLAKE2b-256 304399ae30b5dfb676a9b1190f835500299d59f5523895b611d0fc5f6fa4eeb3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for india_corp_actions-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b0ea57e990bab4cce82d52f387dcee74584306b3d9317080ca939460caf91235
MD5 f049d2443d239f849e95dd1fbbd488c8
BLAKE2b-256 82d109bcb030dda5e39f90c95af497119dc86628edc413b1d8442c6a9734090f

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