Docs › Dates and calendars
Working days API
Bank, market, settlement and government working days.
Is a date a working day, what is the next one, and what date is N working days away. Bank days follow the Reserve Bank's holidays for a state plus Sundays and the second and fourth Saturdays; market and settlement days follow NSE's trading and clearing holidays. Only years with a published holiday list are answered.
Is a date a working day
GET/v1/working-days/{date}
Whether the date is a working day and why not, the previous and next working days, and with add=N the date N working days later (negative for earlier). A T+1 settlement date is calendar=settlement&add=1.
| Parameter | Description |
|---|---|
datepath, required | Date, YYYY-MM-DD. |
calendarquery | bank (default; needs state), market (NSE trading), settlement (NSE clearing) or central (central government offices). One of: bank, market, settlement, central. |
statequery | State code or name. Required for the bank calendar. |
officequery | Bank calendar only. One Reserve Bank office's list, such as Srinagar or Kochi, for a state with several offices (Maharashtra, Uttar Pradesh, Jammu and Kashmir, Kerala). Without it, a day off at any of the state's offices counts. |
addquery | Working days to add, -366 to 366. |
curl
curl "https://api.dharun.dev/v1/working-days/2026-01-16?calendar=bank&state=TN&add=3"JavaScript
const response = await fetch("https://api.dharun.dev/v1/working-days/2026-01-16?calendar=bank&state=TN&add=3");
const body = await response.json();
if (!response.ok) throw new Error(body.error.message);
console.log(body.data);Python
import requests
response = requests.get("https://api.dharun.dev/v1/working-days/2026-01-16?calendar=bank&state=TN&add=3", timeout=10)
body = response.json()
if not response.ok:
raise RuntimeError(body["error"]["message"])
print(body["data"])Response
{
"data": {
"date": "2026-01-16",
"weekday": "Friday",
"calendar": "bank",
"state": "TN",
"working": false,
"reasons": [
"Thiruvalluvar Day/Kanuma"
],
"previousWorkingDay": "2026-01-14",
"nextWorkingDay": "2026-01-19",
"add": 3,
"shifted": "2026-01-21"
},
"meta": {
"source": {
"name": "Bank holidays in India",
"url": "https://www.rbi.org.in/Scripts/HolidayMatrixDisplay.aspx",
"licence": "Official publication",
"version": "2026",
"retrieved": "2026-10-13",
"attribution": "Bank holidays from the Reserve Bank of India holiday matrix, by regional office."
},
"note": "Sundays, the second and fourth Saturdays, and the Reserve Bank's holidays for the state's regional office."
}
}Count working days between two dates
GET/v1/working-days
Counts working days from one date to another, both included, and lists each day off with its reason. At most 366 days.
| Parameter | Description |
|---|---|
fromquery, required | First date, YYYY-MM-DD. |
toquery, required | Last date, YYYY-MM-DD. |
calendarquery | bank (default; needs state), market (NSE trading), settlement (NSE clearing) or central (central government offices). One of: bank, market, settlement, central. |
statequery | State code or name. Required for the bank calendar. |
officequery | Bank calendar only. One Reserve Bank office's list, such as Srinagar or Kochi, for a state with several offices (Maharashtra, Uttar Pradesh, Jammu and Kashmir, Kerala). Without it, a day off at any of the state's offices counts. |
curl
curl "https://api.dharun.dev/v1/working-days?from=2026-01-01&to=2026-01-31&calendar=market"JavaScript
const response = await fetch("https://api.dharun.dev/v1/working-days?from=2026-01-01&to=2026-01-31&calendar=market");
const body = await response.json();
if (!response.ok) throw new Error(body.error.message);
console.log(body.data);Python
import requests
response = requests.get("https://api.dharun.dev/v1/working-days?from=2026-01-01&to=2026-01-31&calendar=market", timeout=10)
body = response.json()
if not response.ok:
raise RuntimeError(body["error"]["message"])
print(body["data"])Response, with lists and long text shortened
{
"data": {
"from": "2026-01-01",
"to": "2026-01-31",
"calendar": "market",
"days": 31,
"workingDays": 20,
"daysOff": [
{
"date": "2026-01-03",
"weekday": "Saturday",
"reasons": [
"Saturday"
]
},
{
"date": "2026-01-04",
"weekday": "Sunday",
"reasons": [
"Sunday"
]
},
{
"date": "2026-01-10",
"weekday": "Saturday",
"reasons": [
"Saturday"
]
}
]
},
"meta": {
"source": {
"name": "Trading and clearing holidays, NSE equities",
"url": "https://www.nseindia.com/resources/exchange-communication-holidays",
"licence": "Official publication",
"version": "2026",
"retrieved": "2026-10-13",
"attribution": "Trading and clearing holidays from the National Stock Exchange of India, capital market segment."
},
"note": "Weekends and NSE trading holidays. Special sessions, such as Muhurat trading or a Saturday budget session, are announced separately by the exchange."
}
}Is the stock market open
GET/v1/market/status
NSE equities session at a moment: pre_open, open, closing or closed, the reason it is closed, and when it next opens. Without at, the current moment.
| Parameter | Description |
|---|---|
atquery | Moment with its offset, RFC 3339, for example 2026-10-13T10:30:00+05:30. |
curl
curl "https://api.dharun.dev/v1/market/status?at=2026-01-26T10:00:00%2B05:30"JavaScript
const response = await fetch("https://api.dharun.dev/v1/market/status?at=2026-01-26T10:00:00%2B05:30");
const body = await response.json();
if (!response.ok) throw new Error(body.error.message);
console.log(body.data);Python
import requests
response = requests.get("https://api.dharun.dev/v1/market/status?at=2026-01-26T10:00:00%2B05:30", timeout=10)
body = response.json()
if not response.ok:
raise RuntimeError(body["error"]["message"])
print(body["data"])Response
{
"data": {
"at": "2026-01-26T10:00:00+05:30",
"exchange": "NSE equities",
"session": "closed",
"open": false,
"reasons": [
"Republic Day"
],
"hours": {
"preOpen": "09:00-09:15",
"normal": "09:15-15:30",
"closing": "15:30-16:00"
},
"nextOpen": "2026-01-27T09:15:00+05:30"
},
"meta": {
"source": {
"name": "Trading and clearing holidays, NSE equities",
"url": "https://www.nseindia.com/resources/exchange-communication-holidays",
"licence": "Official publication",
"version": "2026",
"retrieved": "2026-10-13",
"attribution": "Trading and clearing holidays from the National Stock Exchange of India, capital market segment."
},
"note": "Regular NSE equities hours. Special sessions (Muhurat trading, Saturday budget sessions, mock sessions) are announced separately by the exchange."
}
}Data source
Bank holidays in India, 2026. Retrieved 2026-10-13. Licence: Official publication. Bank holidays from the Reserve Bank of India holiday matrix, by regional office.
Trading and clearing holidays, NSE equities, 2026. Retrieved 2026-10-13. Licence: Official publication. Trading and clearing holidays from the National Stock Exchange of India, capital market segment.
Central government holidays, 2026, 2027. Retrieved 2026-10-13. Licence: Official publication. Gazetted and restricted holidays for central government offices, from the yearly Department of Personnel and Training memorandum.
Guides
Using an AI assistant? Connect the MCP server and it can call this API by itself.