¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: First filled API Order completes longer than subsequent ones (100x or more)


 

Nothing is impossible, but I somehow cannot convince myself (yet?) that what you see is an issue with TWS API, TWS, or the paper account. Is there any chance that the kind of order you are placing just doesn't get filled immediately around market open due to market conditions?

A few things I would try next:

  • You could try and place the same order manually in TWS to see whether it also takes 10 seconds for it to get filled. That way you could eliminate your client and the TWS API you use from the "suspect" list.
  • What about the various order status and order state callbacks. Which state and status updates do you receive after you place the order and before it fills? Do you get "Submitted" or "Pre-Submitted" status messages, and do they arrive right after you place the order or much closer when it fills 10 seconds later?
  • I have not seen any case where TWS API had to be "warmed up", but I am sure there are pieces of information TWS might need to request from IBKR or check permissions before certain operations get executed for the first time. Just to make sure there is no such situation, try and place the same order as a "WhatIf" order before you place the first real order. Does that make the "WhatIf" order take 10 seconds but the real order executes right away?
Hope this helps,
´³¨¹°ù²µ±ð²Ô

Join [email protected] to automatically receive all group messages.