How to detect whether the a future market is open or not?

Is it possible to detect whether the market is open or closed with the Tradovate API? If it is not possible, does anyone have any suggestions? For example, on Saturday and Sunday, the market is closed, and I want to get a signal at the exact time when the market is closed.

You don’t really need the API for this, just use a library to fetch the time and limit your solution from executing during Saturday and Sunday. Make sure that the time that you’re requesting aligns with the exchange’s timezone.

Something like:
if (‘EST’) == Saturday ||‘EST’) == Sunday) { do not trade }
else { trade }

I’m sure you could find better examples on stackoverflow.
Also, confirm that the library you’re using is trusted.