IB API - Delayed order execution

Discussion in 'Order Execution' started by Robco, Jun 6, 2018.

  1. I don't see how IB Controller could have any influence on this as it is neither involved in the communication between Gateway and IB's servers nor in the communication between your application and Gateway.
    I am also using IB Controller and Gateway and did a quick check of the ibgateway.log file. I don't trade at the exact same time as you though. I see that the time delay between the "Placing orderId" message and "Sending open order." message is about 10 milli seconds in my log file.
    I also noticed that in your log file there is a "Updating base currency" message in between. I see those same messages very often in my log file, but not in between the messages related to placing an order.
    Is your Gateway handling one application at the time of trading? Or are multiple applications connected to it?
     
    #21     Jun 12, 2018
  2. Robco

    Robco

    Actually not in all cases there is an "Update base currency" in between, but also not in all cases, when it is present, there is also a delay.

    Here is an example without delay:
    2018-06-07 15:59:51.099 [IB] INFO [JTS-EServerSocket-73] - [2019957:104:104:1:0:0:0:INFO] Placing orderId - 4
    2018-06-07 15:59:51.099 [IB] INFO [JTS-EServerSocket-73] - [2019957:104:104:1:0:0:0:INFO] Processing of order {4} completed.
    2018-06-07 15:59:51.099 [IB] INFO [JTS-EServerSocket-73] - [2019957:104:104:1:0:0:0:DET] Finished processing message:
    2018-06-07 15:59:52.052 [IB] INFO [JTS-CCPDispatcherS2-33] - Updating base currency: accountSpec=U2019957., currency=USD
    2018-06-07 15:59:52.052 [IB] INFO [JTS-CCPDispatcherS2-33] - Updating base currency: accountSpec=U2019957., currency=USD
    2018-06-07 15:59:52.068 [IB] INFO [JTS-CCPDispatcherS2-33] - [2019957:104:104:1:0:5:34:INFO] Sending open order.

    I have just one app connected to the Gateway.
    Regarding IB Controller, there is a chance that it runs IB Gateway with different initial parameters. I'm on a Windows machine, may be you have different OS.
     
    #22     Jun 12, 2018