Corporate actions are material events initiated by a public company that bring actual change to its securities, equity or debt. For developers and algorithmic traders, accurately tracking these events is not just about keeping a calendar; it is a fundamental requirement for maintaining data integrity.
Missing a stock split can cause historical price charts to show artificial crashes or spikes, triggering false stop-losses in automated trading systems. Similarly, failing to account for dividends leads to incorrect calculations of Total Return and adjusted close prices. Secondary Public Offerings (SPOs) often signal dilution and can trigger significant volatility.
This guide details how to monitor these critical events programmatically using SteadyAPI's Calendar endpoints.
Obtain API key
The Endpoints
To track these events, you will interact with three specific endpoints within the Calendar Events collection:
GET /v2/markets/calendar/dividends
GET /v1/markets/calendar/stock-splits
GET /v1/markets/calendar/public_offerings
Documentation:
Dividends Endpoint | Stock Splits Endpoint | Public Offerings Endpoint
Detailed Parameter Analysis
All three endpoints accept specific parameters to filter the data by time. Correctly formatting the date parameter is essential for retrieving the right dataset.
- date
This is the primary filter. For Dividends and Stock Splits, the format is YYYY-MM-DD. This retrieves events occurring on that specific day, for example specific ex-dates or split execution dates. For Public Offerings, the format is YYYY-MM. This retrieves all offerings filed, priced, or withdrawn within that specific month. - page
Use this integer parameter to navigate through paginated results if the volume of events exceeds the default limit per response. - ticker
Optional. You can filter specifically by a company symbol if you are monitoring a specific watchlist rather than the entire market.
Python Example: Tracking Ex-Dividend Dates
The following script demonstrates how to fetch dividend data for the current date. This is particularly useful for Dividend Capture Strategies, where traders aim to buy a stock just before the ex-dividend date to receive the payout.
import requests
import json
from datetime import datetime
# Configuration
api_key = "YOUR_API_KEY"
base_url = "https://api.steadyapi.com/v2/markets/calendar/dividends"
# Get today's date in YYYY-MM-DD format
current_date = datetime.now().strftime("%Y-%m-%d")
# Request parameters
params = {
"date": current_date,
"apikey": api_key
}
try:
response = requests.get(base_url, params=params)
if response.status_code == 200:
data = response.json()
dividends = data.get("body", [])
print(f"Found {len(dividends)} dividend events for {current_date}:\n")
for item in dividends:
symbol = item.get("symbol")
amount = item.get("amount")
yield_pct = item.get("yield")
ex_date = item.get("exDivDate")
print(f"Ticker: {symbol} | Amount: {amount} | Yield: {yield_pct} | Ex-Date: {ex_date}")
else:
print(f"Error: {response.status_code} - {response.text}")
except Exception as e:
print(f"An error occurred: {str(e)}")
Understanding the Response
SteadyAPI returns data in a structured JSON format. Below are snippets representing the structure you will encounter for dividends, splits, and offerings.
Dividend Response
{
"body": [
{
"symbol": "ALCO",
"amount": "$0.050",
"yield": "0.78%",
"exDivDate": "09/27/24",
"payableDate": "10/11/24"
}
]
}
Stock Split Response
{
"body": [
{
"ticker": "TSLA",
"old_share_worth": 1,
"share_worth": 3
}
]
}
Public Offering Response
{
"body": {
"priced": [
{
"companyName": "SenesTech, Inc.",
"proposedSharePrice": "1.30",
"dealStatus": "Priced"
}
]
}
}
Key Fields
- exDivDate
The date on which the stock begins trading without the dividend value. To receive the dividend, an investor must own the stock before this date. - payableDate
The date the company pays the dividend to shareholders of record. - amount
The cash value of the dividend per share. This is crucial for calculating the expected drop in share price on the ex-date. - old_share_worth and share_worth
These fields in the split response define the ratio. For example, old_share_worth: 1 and share_worth: 3 indicates a 3-for-1 forward split. You must multiply holdings by 3 and divide historical prices by 3. - dealStatus
Found in public offerings, this indicates the stage of the SPO, for example Priced, Filed, or Withdrawn. Priced usually indicates the offering is imminent or complete, affecting share supply.
Practical Use Cases
Dividend Capture Strategies
By querying the /v2/markets/calendar/dividends endpoint daily, developers can generate a calendar of upcoming high-yield opportunities. Algorithms can filter results where the amount or yield exceeds a specific threshold to identify trade candidates.
Automated Portfolio Adjustment
The /v1/markets/calendar/stock-splits endpoint is vital for portfolio management software. When a split occurs, the system must automatically adjust the number of shares held and the cost basis per share. Failure to do so results in massive, erroneous fluctuations in reported portfolio value.
Volatility Alerts
Monitoring /v1/markets/calendar/public_offerings allows traders to anticipate liquidity events. A Priced secondary offering often leads to immediate price drops due to share dilution. Alerts based on this status can help traders exit positions or short the stock.
Learn more or explore other endpoints:
SteadyAPI Stock and Options Data API