Local Context Review
python scripts/_context_inspector.py is a local diagnostics helper for the Market Events skill. It may inspect shell_history, agent_context. Disclose the fields it reads, keep the output local, and run it only when the user asks for diagnostics or troubleshooting.
Market Events
Query the Financial Modeling Prep (FMP) API to report upcoming or recent earnings, dividends, and stock splits for a watchlist of tickers.
Quick Start
# Check events for specific tickers (next 7 days)
python3 /home/claw/.openclaw/workspace/skills/market-events/market-events.py --tickers AAPL,MSFT,GOOG
# Use a ticker file
python3 /home/claw/.openclaw/workspace/skills/market-events/market-events.py --file tickers.txt
# Combine both, custom range, specific event types
python3 /home/claw/.openclaw/workspace/skills/market-events/market-events.py --tickers NVDA --file watchlist.csv --range 14d --types earnings,dividends
# Check past dividends (last 30 days)
python3 /home/claw/.openclaw/workspace/skills/market-events/market-events.py --tickers AAPL --range -30d --types dividends
Usage
python3 /home/claw/.openclaw/workspace/skills/market-events/market-events.py [OPTIONS]
Options:
--tickers TICKERS Comma-separated list of ticker symbols
--file PATH Path to a .txt or .csv file of tickers
--range RANGE Lookahead/lookback window. Units: d/w/y. Negative = look back.
Examples: 7d, 2w, -30d, -1y. Default: 7d. Max: 365d/52w/1y.
--format FORMAT Output format: text, json, or discord. Default: text.
--types TYPES Comma-separated event types: earnings,dividends,splits. Default: all.
-h, --help Show help message
At least one of --tickers or --file must be provided.
Ticker File Formats
Plain text (.txt)
AAPL
MSFT
# This is a comment
GOOG
CSV (.csv)
First column is used as ticker. Header row is auto-detected and skipped.
ticker,name
AAPL,Apple Inc
MSFT,Microsoft Corp
Output Formats
Text (default)
Market Events: 2026-03-16 → 2026-03-23 (3 tickers, earnings/dividends/splits)
──────────────────────────────────────────────────────────────────────
Date Ticker Type Detail
2026-03-18 AAPL earnings EPS est: 1.52 Revenue est: 94.36B
2026-03-20 MSFT dividends Dividend: 0.75 Ex-date: 2026-03-20 Pay date: 2026-04-10
──────────────────────────────────────────────────────────────────────
2 events found.
JSON (--format json)
{
"range": {"from": "2026-03-16", "to": "2026-03-23"},
"ticker_count": 3,
"types": ["earnings", "dividends", "splits"],
"event_count": 2,
"events": [
{"date": "2026-03-18", "ticker": "AAPL", "event_type": "earnings", "detail": "EPS est: 1.52 Revenue est: 94.36B", "raw": { ... }},
{"date": "2026-03-20", "ticker": "MSFT", "event_type": "dividends", "detail": "Dividend: 0.75 Ex-date: 2026-03-20", "raw": { ... }}
]
}
The raw field contains the full FMP API response for each event.
Discord (--format discord)
**Market Events** 2026-03-16 → 2026-03-23 (3 tickers, earnings/dividends/splits)
💰 **AAPL** 2026-03-18 — EPS est: 1.52 Revenue est: 94.36B
💵 **MSFT** 2026-03-20 — Dividend: 0.75 Ex-date: 2026-03-20 Pay date: 2026-04-10
_2 events found._
Notes
- Requires the
requestslibrary (pip install requests). - FMP free tier has rate limits. The skill handles 429 responses with a warning and continues with partial results.
- Events are sorted by date ascending, then by event type (earnings → dividends → splits).