Is this not possible?

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
As in the title, I want to have realtime information via MT5 in Python whether a given symbol currently allows trading or not. I want to have the same real-time information as what I have when opening MetaTrader and attempting to buy/sell a given instrument. The UI will not allow me do that for Forex pairs in weekends, for instance. But I don't see how to get that same information programmatically.
First I attempted this:
which prints:
At the moment of writing this, it is weekend, hence I know for certain that BITCOIN is the only one tradeable out of the three. But based on the above output alone, I see that trade_mode is 4 for both BITCOIN and EURUSD while USDTRY only allows order close. I'm not ahead either by checking exemode and filling mode, nor the spread value. So I tried another approach:
which, when feeding the same three symbol strings, prints the following:
Again, I see no indication from either 3 outputs that BITCOIN is open and actively tradeable while the other two are not. I find the `'comment': 'Done'` in case of EURUSD particularly confusing as when I attempt to send a real order for the same pair, it'll fail as the market is closed.
How can I get real time information whether a given instrument is open and tradeable at a given time?