API Reference
Base URL: https://api.tradingdays.net
Authentication
Send your API key via the X-Api-Key header or Authorization: Bearer. Keys start with td_live_ (production) or td_test_ (test).
GET /holidays
List market holidays for an exchange. Filters: exchange (code or MIC), country, year, date_from, date_to, type, status, limit, offset.
curl -H "X-Api-Key: YOUR_KEY" "https://api.tradingdays.net/holidays?exchange=NYSE&year=2026"
GET /status
Is this exchange open on this date? Returns is_open, status (open / closed / partial / weekend), and holiday name.
curl -H "X-Api-Key: YOUR_KEY" "https://api.tradingdays.net/status?exchange=NYSE&date=2026-12-25"
GET /next-trading-day
Given a date, returns the next trading day for the exchange.
curl -H "X-Api-Key: YOUR_KEY" "https://api.tradingdays.net/next-trading-day?exchange=NYSE&date=2026-12-24"
GET /exchanges
List supported exchanges. Public — no API key required.
GET /calendar.ics Pro
iCal subscription feed for an exchange and year. Pro plan only.
POST /signup
Create a free account and receive an API key (100 requests/month, 1 key). Body: { "email": "[email protected]", "name": "Ada" }. The key is returned once — save it. One key per email.
Errors
| Status | code | Meaning |
|---|---|---|
| 400 | invalid_email | Signup: invalid email format |
| 400 | invalid_json | Signup: request body is not valid JSON |
| 401 | invalid_api_key | Missing or invalid API key |
| 403 | quota_exceeded | Monthly quota exhausted |
| 403 | plan_required | Endpoint requires Pro plan |
| 403 | key_disabled | Key revoked or temporarily banned |
| 404 | not_found | Unknown exchange or resource |
| 405 | method_not_allowed | Signup: POST required |
| 409 | email_exists | Signup: email already registered |
| 429 | rate_limited | Rate limit exceeded (10 req/s) or too many signups from this IP |
| 500 | internal_error | Server error |