IBKR TWS API

TWS API 10.33 has several additional changes that should be reflected in coming upgrades:

  • The [EWrapper.Error()]/(tws-api/doc/error-handling/receiving-error-messages) function has been updated in include a new parameter as the second argument, “errorTime”. This variable is a long value denoting the epoch timestamp of when the error was returned.
  • The Order State source file now contains a new class object, [OrderAllocation]. The class includes information about client allocation for a given order and declares the position change for a client.
  • The [OrderState] class has updated the margin fields to clarify “initMarginBeforeOutsideRth” or similar updates to the other fields to reflect changes based on market close. New values such as “rejectReason”, “orderAllocations” and “suggestedSize” are included to improve transparency.
  • All instances referring to “commissions” have been updated to “commissionAndFees”
  • The EClient.cancelOrder() function’s second argument is now an [OrderCancel object] in place of a string. This object takes an extOperator, manualOrderIndicator, and manualOrderCancelTime parameters.