You can use the field PRC_QL_CD in TRKD API Quote to know the status of trading. The values might differ for various markets. I have attached file containing all possible values in this field. Some of the important values are OPN for market open, CLS for market closed etc.
hope this helps.list-of-all-possible-values-for-fid-118-prc-ql-cd.txt