diff --git a/atreyu_backtrader_api/ibstore.py b/atreyu_backtrader_api/ibstore.py index 15e7852..8ce97a4 100644 --- a/atreyu_backtrader_api/ibstore.py +++ b/atreyu_backtrader_api/ibstore.py @@ -1234,7 +1234,8 @@ def reqHistoricalDataEx(self, contract, enddate, begindate, self.conn.reqHistoricalData( tickerId, contract, - bytes(intdate.strftime('%Y%m%d %H:%M:%S') + ' GMT'), + #bytes(intdate.strftime('%Y%m%d %H:%M:%S') + ' GMT'), + bytes(intdate.strftime('%Y%m%d-%H:%M:%S')), bytes(duration), bytes(barsize), bytes(what), @@ -1270,7 +1271,8 @@ def reqHistoricalData(self, contract, enddate, duration, barsize, self.conn.reqHistoricalData( tickerId, contract, - bytes(enddate.strftime('%Y%m%d %H:%M:%S') + ' GMT'), + # bytes(enddate.strftime('%Y%m%d %H:%M:%S') + ' GMT'), + bytes(enddate.strftime('%Y%m%d-%H:%M:%S')), bytes(duration), bytes(barsize), bytes(what), @@ -1328,8 +1330,10 @@ def reqHistoricalTicksEx(self, contract, enddate=None, begindate=None, self.conn.reqHistoricalTicks( tickerId, contract, - bytes(begindate.strftime('%Y%m%d %H:%M:%S') + ' GMT') if begindate else '', - bytes(enddate.strftime('%Y%m%d %H:%M:%S') + ' GMT') if enddate else '', + # bytes(begindate.strftime('%Y%m%d %H:%M:%S') + ' GMT') if begindate else '', + # bytes(enddate.strftime('%Y%m%d %H:%M:%S') + ' GMT') if enddate else '', + bytes(begindate.strftime('%Y%m%d-%H:%M:%S')) if begindate else '', + bytes(enddate.strftime('%Y%m%d-%H:%M:%S')) if enddate else '', 100, bytes(what), int(useRTH), @@ -1366,9 +1370,11 @@ def reqHistoricalTicks(self, contract, enddate, begindate, self.conn.reqHistoricalTicks( tickerId, contract, - bytes(begindate.strftime('%Y%m%d %H:%M:%S') + ' GMT') if begindate else '', + # bytes(begindate.strftime('%Y%m%d %H:%M:%S') + ' GMT') if begindate else '', + bytes(begindate.strftime('%Y%m%d-%H:%M:%S')) if begindate else '', # bytes(enddate.strftime('%Y%m%d %H:%M:%S') + ' GMT'), - bytes(enddate.strftime('%Y%m%d %H:%M:%S') + ' GMT') if enddate else '', + # bytes(enddate.strftime('%Y%m%d %H:%M:%S') + ' GMT') if enddate else '', + bytes(enddate.strftime('%Y%m%d-%H:%M:%S')) if enddate else '', 10, bytes(what), # int(useRTH),