atreyuxtrading / atreyu-backtrader-api

Atreyu's integration of IB Native API with backtrader
BSD 2-Clause "Simplified" License
91 stars 58 forks source link

End Date/Time Error on Historical Quote #6

Closed tshumay closed 1 year ago

tshumay commented 1 year ago

Also having a problem with the historical quote example. In this case:

data = IBData(host='127.0.0.1', port=7497, clientId=35,
               name="GOOG",     # Data name
               dataname='GOOG', # Symbol name
               secType='STK',   # SecurityType is STOCK 
               exchange='SMART',# Trading exchange IB's SMART exchange 
               currency='USD',  # Currency of SecurityType
               historical=True,
               what='BID_ASK',  # Update this parameter to select data type
              )

Is returning the following error on execution:

Error: {'reqId': 16777217, 'errorCode': 10314, 'errorString': 'End Date/Time: The date, time, or time-zone entered is invalid. The correct format is yyyymmdd hh:mm:ss xx/xxx where yyyymmdd and xx/xxx are optional. E.g.: 20031126 15:59:00 US/Eastern Note that there is a space between the date and time, and between the time and time-zone. If no date is specified, current date is assumed. If no time-zone is specified, local time-zone is assumed(deprecated). You can also provide yyyymmddd-hh:mm:ss time is in UTC. Note that there is a dash between the date and time in UTC notation.', 'advancedOrderRejectJson': ''}

atreyuxtrading commented 1 year ago

Ok - this was a real issue. It manifested in your previous bug. Looks like IBKR changed the format of the datetime format they are processing. I have fixed this and will create a new release.

tshumay commented 1 year ago

Thank you!