Meaning of spread field in M15/H1 historical bars

Hello,

I retrieve historical USDJPY bars from XMTrading MT5 using the MetaTrader5 Python function copy_rates_range() with TIMEFRAME_M15 and TIMEFRAME_H1.

Each returned bar contains a spread field. XMTrading confirmed that it is expressed in points and that, for USDJPY, 1 point equals 0.001 JPY.

What exactly does the spread field represent for M15 and H1 historical bars?

Is it:

  1. The spread at the opening of the bar
  2. The spread at the closing of the bar
  3. The minimum spread during the bar
  4. The maximum or average spread
  5. Another value calculated from the underlying M1 bars or ticks

The MetaTrader 5 documentation states that an M1 bar contains the minimum Bid–Ask difference recorded during that minute. How is the spread determined for higher timeframes such as M15 and H1 returned by copy_rates_range()?

If possible, please provide an official documentation link.

Thank you.