I am trying to pull MT4 trade history data using the PyMT4ManagerAPI hosted here:
https://github.com/ipenn/PyMT4ManagerAPI
The API works fine to get open trades and users info. But when I try to get the historical trades, using the function TradesUserHistory(self, login, arg3, to, total)
from the file MT4ManagerAPI.py
, I get a strange error:
argument 3 of type '__time32_t const'
The parameters that I am using are login
(Login ID of the user account), arg3
(datetime.date(2015,1,5)
) to Pull history starting this date, to ( datetime.date(2019,1,5)
) to Pull history till this date and total i.e. MT4ManagerAPI.intp()
as required by the setup.
I am certain that the way in which I am passing the dates is not correct and am unable to find anything about converting Python datetime
to __time32_t const
type.
So, any guidance around that conversion would be appreciated.