You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.
Hey guys, im trying to work on error handling, because the wrapper errors are too extensive:
Error 321, reqId 194: Error al validar la solicitud.-'bS' : causa - El tama\u00f1o de la orden no se ajusta a la normativa del mercado.
Canceled order: Trade(contract=Stock(symbol='AMZN', exchange='SMART', currency='USD'), order=MarketOrder(orderId=194, clientId=1, action='BUY', totalQuantity=100000000000), orderStatus=OrderStatus(orderId=194, status='Cancelled', filled=0.0, remaining=0.0, avgFillPrice=0.0, permId=0, parentId=0, lastFillPrice=0.0, clientId=0, whyHeld='', mktCapPrice=0.0), fills=[], log=[TradeLogEntry(time=datetime.datetime(2023, 8, 29, 17, 39, 41, 26849, tzinfo=datetime.timezone.utc), status='PendingSubmit', message='', errorCode=0), TradeLogEntry(time=datetime.datetime(2023, 8, 29, 17, 39, 41, 26849, tzinfo=datetime.timezone.utc), status='Cancelled', message="Error 321, reqId 194: Error al validar la solicitud.-'bS' : causa - El tama\u00f1o de la orden no se ajusta a la normativa del mercado.", errorCode=321)], advancedError='')
Is there any form to catch errors with the IB object like in IBAPI?
def error(self, reqId, errorCode, errorString):
# 502: Error Socket o 504: No está conectado
if(errorCode == 502) or (errorCode == 504):
print("ERROR: Fallo de conexión - Comprobar sockets TWS")
exit()
elif(errorCode not in self.goodErrors):
print("Error {} {} {}".format(reqId,errorCode,errorString))
#self.disconnect()
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey guys, im trying to work on error handling, because the wrapper errors are too extensive:
Is there any form to catch errors with the IB object like in IBAPI?
Beta Was this translation helpful? Give feedback.
All reactions