MT5 Python Library Updated ? Not returning OHLC

 
import MetaTrader5 as mt5

rates = mt5.copy_rates_from_pos("EURUSD", mt5.TIMEFRAME_H4, 0, 2)
df = pd.DataFrame(rates)
print(df)
This code used to return OHLC 

But now it returns 
         time      bid      ask     last               volume  time_msc  flags  volume_real
0  1732176000  1.05466  1.05545  1.05138  4607415254900752463     13192      0          0.0
1  1732190400  1.05170  1.05313  1.05140  4607416425836655579      6294      0          0.0


I also tried copy_rates_from It returns the same thing 

Does anyone know any alternative
How can i fetch OHLC from mt5 in python

Thanks. 

 

Same thing!

How to fix it?

 
slipsnot111 #:

Same thing!

How to fix it?

I Installed old version of MT5 library and now It's returning OHLC like before
This version specifically https://pypi.org/project/MetaTrader5/5.0.4424/ 
MetaTrader5
  • 2024.06.28
  • pypi.org
API Connector to MetaTrader 5 Terminal
 
occupied #:
https://pypi.org/project/MetaTrader5/5.0.4424/
Thanks, I'll try!
 
Thanks, the fix will be released in version 5.0.4687.