Receiving Error Messages
Introduction
When a client application sends a message to TWS which requires a response which has an expected response (i.e. placing an order, requesting market data, subscribing to account updates, etc.), TWS will almost either always
- Respond with the relevant data or
- Send an error message to EWrapper.error().
Error messages sent by the TWS are handled by the EWrapper.error() method. The EWrapper.error() event contains the originating request Id (or the orderId in case the error was raised when placing an order), a numeric error code and a brief description. It is important to keep in mind that this function is used for true error messages as well as notifications that do not mean anything is wrong.
Receiving Error Messages
EWrapper.error(reqId, errorTime, errorCode, errorMsg, advancedOrderRejectJson)
The request identifier corresponding to the most recent reqId that maintained the error stream.
This does not pertain to the orderId from placeOrder, but whatever the most recent requestId is.
The Unix timestamp of when the error took place.
The Unix timestamp of when the error took place.
The Unix timestamp of when the error took place.
The Unix timestamp of when the error took place.

