We're developing a trading app where one can enter previous trades including date and time of the trade. For validation purposes I need to know if a stock exchange was open on the day the user specifies.
Does anyone know of an API or similar where I can query whether a specific stock exchange is open today? Preferably the API should cover all world stock exchanges, not just those in the US.
Also, I need to know if the stock exchange was open on a specific date before today, i.e. was the NYSE open last friday? (validating for weekdays is not enough as exchanges are not only closed on weekends but also on national holidays etc).
I have googled for an API/answer but haven't been able to find it. Also tried to google for "stock exchange api" as well as "bank holidays api" as banks are probably open on the same days as stock exchanges, but couldn't find any API or similar for that either. The closest I have found is http://www.holidaywebservice.com/ but it returns mainly US bank holidays. Also, http://www.xignite.com/xExchanges.asmx is available, but it's a bit on the expensive side IMHO.
Hope my question is clear, otherwise please ask :)
There is Bank-holidays.com site selling historical data around the world from 2000 to 2070 for 2 euro/country/year: http://www.bank-holidays.com/default.php