I noticed a possible inconsistency in the get_holidays() API response for 21st October 2025 (Diwali Laxmi Pujan).
Here’s the response snippet returned by the API:
{
'_date': datetime.datetime(2025, 10, 21, 0, 0),
'closed_exchanges': [],
'description': 'Diwali Laxmi Pujan',
'holiday_type': 'TRADING_HOLIDAY',
'open_exchanges': [
{'exchange': 'NSCOM', 'start_time': 1761034500000, 'end_time': 1761038100000},
{'exchange': 'CDS', 'start_time': 1761034500000, 'end_time': 1761038100000},
{'exchange': 'NFO', 'start_time': 1761034500000, 'end_time': 1761038100000},
{'exchange': 'BSE', 'start_time': 1761034500000, 'end_time': 1761038100000},
{'exchange': 'BCD', 'start_time': 1761034500000, 'end_time': 1761038100000},
{'exchange': 'BFO', 'start_time': 1761034500000, 'end_time': 1761038100000},
{'exchange': 'NSE', 'start_time': 1761034500000, 'end_time': 1761038100000},
{'exchange': 'MCX', 'start_time': 1761034500000, 'end_time': 1761038100000}
]
}
Issue Observed:
- The
holiday_typeis correctly set to"TRADING_HOLIDAY", butclosed_exchangesis empty, andopen_exchangesincorrectly lists all exchanges. - According to the NSE holiday calendar, 21st Oct 2025 is a full trading holiday for Equity, F&O, and CDS segments, with only a short evening Muhurat Trading session.
The timestamps (start_time: 1761034500000 → 18:15 IST, end_time: 1761038100000 → 19:15 IST) likely correspond to the Muhurat trading session.
Expected Behavior:
- The API should ideally mark this date as a holiday,
and either:- keep
closed_exchangespopulated with all exchanges, or - provide a separate field or flag to indicate a special session (e.g., Muhurat Trading), instead of including it under
open_exchangesfor aTRADING_HOLIDAY.
- keep
The backend seems to be misclassifying the short Muhurat Trading window as normal open hours, causing all exchanges to appear under open_exchanges even though the holiday_type is "TRADING_HOLIDAY".
Could the team please verify and clarify how special sessions like Muhurat Trading are intended to be represented in the API response?
It would help ensure correct downstream handling for users who rely on closed_exchanges for scheduling trades and simulations.