MetaTrader5 Python API: No access to SymbolInfoSessionQuote/Trade session windows?

 

Hi everyone,
I’m using the official MetaTrader5 Python package and trying to retrieve per-day quote/trade session time windows for symbols.

From MQL5 docs, I can see session window functions exist:

In Python docs, I’m using symbol_info():

My findings in Python (MetaTrader5 package version 5.0.5640):

  1. symbol_info() returns fields like session_open / session_close, but these appear to be prices (or 0.0), not quote/trade session time windows.
  2. The module does not expose symbol_info_session_quote or symbol_info_session_trade (attribute missing). Or rather it does but they are empty on all symbols

    "session_quote_windows": {}, "session_trade_windows": {}


So I currently cannot get weekday session windows from Python the same way MQL5 can.



Questions:

  1. Is this expected (i.e., not supported yet in Python API)?
  2. Are there plans to expose SymbolInfoSessionQuote / SymbolInfoSessionTrade equivalents in the Python package?
  3. If yes, is there an ETA or roadmap version?

Use case: strategy/backtest session-aware rules (e.g., exchange/session-specific ORB windows) need reliable per-symbol session-time metadata. Especially in regards to the upcoming change in daylights savings time.

Thanks!

Documentation on MQL5: SymbolInfoSessionQuote / Market Info
Documentation on MQL5: SymbolInfoSessionQuote / Market Info
  • www.mql5.com
Allows receiving time of beginning and end of the specified quoting sessions for a specified symbol and day of week. Parameters name [in]  ...
 
v3ritas1989:

Hi everyone,
I’m using the official MetaTrader5 Python package and trying to retrieve per-day quote/trade session time windows for symbols.

From MQL5 docs, I can see session window functions exist:

In Python docs, I’m using symbol_info():

My findings in Python (MetaTrader5 package version 5.0.5640):

  1. symbol_info() returns fields like session_open / session_close, but these appear to be prices (or 0.0), not quote/trade session time windows.
  2. The module does not expose symbol_info_session_quote or symbol_info_session_trade (attribute missing). Or rather it does but they are empty on all symbols

    "session_quote_windows": {}, "session_trade_windows": {}


So I currently cannot get weekday session windows from Python the same way MQL5 can.



Questions:

  1. Is this expected (i.e., not supported yet in Python API)?
  2. Are there plans to expose SymbolInfoSessionQuote / SymbolInfoSessionTrade equivalents in the Python package?
  3. If yes, is there an ETA or roadmap version?

Use case: strategy/backtest session-aware rules (e.g., exchange/session-specific ORB windows) need reliable per-symbol session-time metadata. Especially in regards to the upcoming change in daylights savings time.

Thanks!

Where do you see that "session_quote_windows": {}, "session_trade_windows": {} ?

I reported it to MetaQuotes attention.

 

I see it in the output of my own metadata endpoint/wrapper, where I persist symbol metadata snapshots (from Python MT5 calls) and include those two computed fields.

To be explicit: those two fields are not native symbol_info() fields. I build them by calling:

  • mt5.symbol_info_session_quote(symbol, day_of_week, session_index)
  • mt5.symbol_info_session_trade(symbol, day_of_week, session_index)

and aggregating results. In my environment, those calls return no usable rows, so both objects remain {}.

Main point of this post is MQL5 parity:

  • I understand symbol_info() docs in Python don’t promise these windows.
  • But MQL5 has dedicated session-window APIs (SymbolInfoSessionQuote/Trade), and Python has equivalent function names.
  • So I tested the Python parity path, and currently it yields empty session windows for me.
Documentation on MQL5: symbol_info / Python Integration
Documentation on MQL5: symbol_info / Python Integration
  • www.mql5.com
Get data on the specified financial instrument. symbol [in]  Financial instrument name. Required unnamed parameter. Return Value Return info...