Script getting terminated on national holiday

tusharwagh10
I have developed trading algorithm in python which trades every week days but gets terminated/fails on national holiday.
Can I holiday details through api like holidays of current year/month or if today is holiday or not so that I can keep such condition in my program and avoid it from getting terminated.
  • rakeshr
    Can I holiday details through api like holidays of current year/month
    No, currently we don't have any holiday calendar APIs as such. But, these holidays are easy to maintain at your end as it's fixed and is released at the start of the year on NSE portal. Something like:
    nse_holiday = [
    "2021-01-26",
    "2021-03-11",
    "2021-03-29",
    "2021-04-02",
    "2021-04-14",
    "2021-04-21",
    "2021-05-13",
    "2021-07-21",
    "2021-08-19",
    "2021-09-10",
    "2021-10-15",
    "2021-11-04",
    "2021-11-05",
    "2021-11-19"
    ]
  • tusharwagh10
    It is fixed for the year but changes after a year. We make script and deploy on cloud, script keeps running. Once we deploy it or give to client then we do not edit it.
Sign In or Register to comment.