Hello community, so I need to fetch data of the Last Trading Day from the API, but I couldn’t find any consistent way of doing it in the docs, I would really appreciate any info regarding this.
Hi @Gopesh_49853956
You can check whether a particular day is a trading holiday using this API:
Market Holidays API
Additionally, Saturdays and Sundays are always holidays.
To find the last trading day, I suggest looping backwards from today and checking each day against the holiday list. The first day that is not a holiday will be your last trading day.
Thanks!