Holidays
Get market holidays for a specific year including special trading sessions.
Endpoint URL
Local Host : POST http://127.0.0.1:5000/api/v1/market/holidays
Ngrok Domain : POST https://<your-ngrok-domain>.ngrok-free.app/api/v1/market/holidays
Custom Domain: POST https://<your-custom-domain>/api/v1/market/holidaysSample API Request
{
"apikey": "<your_app_apikey>",
"year": 2026
}Sample cURL Request
curl -X POST http://127.0.0.1:5000/api/v1/market/holidays \
-H 'Content-Type: application/json' \
-d '{
"apikey": "<your_app_apikey>",
"year": 2026
}'Sample API Response
Request Body
apikey
Your OpenAlgo API key
Mandatory
-
year
Year to get holidays for, integer between 2020 and 2050
Optional
Current year
MarketHolidaysSchema declares only these two fields. Any other field, including an exchange filter, returns HTTP 400: this endpoint always returns every exchange's status for each holiday. Filter closed_exchanges and open_exchanges on the client.
Response Fields
status
string
"success" or "error"
year
number
Year for which holidays are returned
timezone
string
Timezone (Asia/Kolkata)
data
array
Array of holiday objects
Holiday Object Fields
date
string
Holiday date (YYYY-MM-DD)
description
string
Holiday name/reason
holiday_type
string
Type of holiday
closed_exchanges
array
Exchanges fully closed
open_exchanges
array
Exchanges with special sessions
Open Exchanges Object Fields
exchange
string
Exchange code
start_time
number
Session start (epoch milliseconds)
end_time
number
Session end (epoch milliseconds)
Holiday Types
TRADING_HOLIDAY
Full market closure
SETTLEMENT_HOLIDAY
Settlement closed, trading may be open
SPECIAL_SESSION
Modified trading hours (e.g., Muhurat)
Notes
Year must be between 2020 and 2050
closed_exchanges lists exchanges that are completely closed
open_exchanges lists exchanges with special/partial sessions
Times are in epoch milliseconds
MCX often has evening sessions on NSE/BSE holidays
The calendar tracks nine exchanges:
NSE,BSE,NFO,BFO,MCX,BCD,CDS,NCO, andCRYPTO.CRYPTOtrades continuously, so it does not appear inclosed_exchangesfor ordinary trading holidays.
Use Cases
Calendar planning: Know trading days in advance
Strategy scheduling: Adjust strategies for holidays
Risk management: Plan for reduced liquidity days
Back to: API Documentation
Last updated