Example
Market Status / Holiday-Aware Scheduler
Make production sync jobs aware of market sessions.
Request
This request has no required inputs.
GET https://api.earningsapi.com/v1/market-status?apikey=YOUR_API_KEYCode example
ExamplePython
import requests
API_KEY = "YOUR_API_KEY"
status = requests.get("https://api.earningsapi.com/v1/market-status", params={"apikey": API_KEY}, timeout=30).json()
if status["currentMarketStatus"] == "closed":
print("Skip intraday sync until", status["nextOpenDate"])
else:
print("Run market workflow")Result shape
| signal | value | action |
|---|---|---|
| currentMarketStatus | closed | Delay intraday sync |
| nextOpenDate | 2026-01-27 | Schedule next run |
Build steps
- 1Call market status before intraday or post-close jobs.
- 2Use market holidays for planning early-close and holiday windows.
- 3Skip or reschedule jobs when the market is closed.