While live trading with Interactive Brokers via Quantconnect, I experience significant latency. It's a two-part problem. The most curious for me is for 2 orders submitted sequentially.
(I attach full order logs below.)
Basically it looks like 2nd trade gets to "PlaceOrder" only after the first one receives "PreSubmitted". I'm using market_order(asynchronous=True), but I assume it's irrelevant here.
As far as I understand it's some limitation or even a feature of BrokerageTransactionHandler?
Does anyone have experience with getting around it?
Here SPY is the first trade and QQQ is the 2nd.

Also regarding the delay between PlaceOrder → PreSubmitted. In my case it's ~620ms even for the first order. But my IB account server is in Asia and I host Quantconnect algo on AWS ec2 instance in us-east1. I'm yet to move it to US East over the weekend. What is the average latency people have in US equities when trading at IB via Quantconnect?
Logs:
2025-07-17T14:00:00.0613288Z TRACE:: BrokerageTransactionHandler.Process(): 07/17/2025 14:00:00 UTC: Submit Order: (3) - OrderId: 3 (BrokerId: ) New Market order for 5 units of SPY Status: Unprocessed
2025-07-17T14:00:00.0856101Z TRACE:: InteractiveBrokersBrokerage.PlaceOrder(): Symbol: SPY Quantity: 5. Id: 3
2025-07-17T14:00:00.1235485Z TRACE:: BrokerageTransactionHandler.Process(): 07/17/2025 14:00:00 UTC: Submit Order: (4) - OrderId: 4 (BrokerId: ) New Market order for 5 units of QQQ Status: Unprocessed
2025-07-17T14:00:00.7114528Z TRACE:: InteractiveBrokersBrokerage.HandleOpenOrder(): OrderId: 34, Contract: STK SPY USD SMART, OrderStatus: PreSubmitted
2025-07-17T14:00:00.7139514Z TRACE:: InteractiveBrokersBrokerage.HandleOrderStatusUpdates(): OrderId: 34, Status: PreSubmitted, Filled: 0, Remaining: 5, AverageFillPrice: 0, PermId: 1033435928, ParentId: 0, LastFillPrice: 0, ClientId: 0, WhyHeld: ,MktCapPrice: 0
2025-07-17T14:00:00.7142161Z TRACE:: InteractiveBrokersBrokerage.PlaceOrder(): Symbol: QQQ Quantity: 5. Id: 4
* 2025-07-17T14:00:00.7614844Z TRACE:: InteractiveBrokersBrokerage.HandleExecutionDetails(): Liquidation: 0 ClientId 0 RequestId: -1, Symbol: SPY, OrderId: 34, Time: 20250717 10:00:00 US/Eastern, Side: BOT, Shares: 5, Price: 625.8493, CumQty: 5, PermId: 1033435928, Account: U16711738, ExecId: 00030e5e.695fab48.01.01
2025-07-17T14:00:00.8014803Z TRACE:: InteractiveBrokersBrokerage.HandleOpenOrder(): OrderId: 34, Contract: STK SPY USD SMART, OrderStatus: Filled
2025-07-17T14:00:00.8037790Z TRACE:: InteractiveBrokersBrokerage.HandleOrderStatusUpdates(): OrderId: 34, Status: Filled, Filled: 5, Remaining: 0, AverageFillPrice: 625.8493, PermId: 1033435928, ParentId: 0, LastFillPrice: 625.8493, ClientId: 0, WhyHeld: ,MktCapPrice: 0
2025-07-17T14:00:00.8040480Z TRACE:: InteractiveBrokersBrokerage.HandleOpenOrder(): OrderId: 34, Contract: STK SPY USD SMART, OrderStatus: Filled
2025-07-17T14:00:00.8073384Z TRACE:: InteractiveBrokersBrokerage.HandleOrderStatusUpdates(): OrderId: 34, Status: Filled, Filled: 5, Remaining: 0, AverageFillPrice: 625.8493, PermId: 1033435928, ParentId: 0, LastFillPrice: 625.8493, ClientId: 0, WhyHeld: ,MktCapPrice: 0
2025-07-17T14:00:00.8130086Z TRACE:: InteractiveBrokersBrokerage.HandleCommissionReport(): ExecId: 00030e5e.695fab48.01.01, Commission: 0.383018, Currency: USD
2025-07-17T14:00:00.8364242Z TRACE:: LiveTradingResultHandler.OrderEvent(): Time: 07/17/2025 14:00:00 OrderID: 3 EventID: 2 Symbol: SPY Status: Filled Quantity: 5 FillQuantity: 5 FillPrice: $625.8493 OrderFee: 0.383018 USD Message: Interactive Brokers Order Fill Event BrokerId: 34
2025-07-17T14:00:01.3350216Z TRACE:: InteractiveBrokersBrokerage.HandleOpenOrder(): OrderId: 35, Contract: STK QQQ USD SMART, OrderStatus: PreSubmitted
2025-07-17T14:00:01.3352580Z TRACE:: InteractiveBrokersBrokerage.HandleOrderStatusUpdates(): OrderId: 35, Status: PreSubmitted, Filled: 0, Remaining: 5, AverageFillPrice: 0, PermId: 1033435929, ParentId: 0, LastFillPrice: 0, ClientId: 0, WhyHeld: ,MktCapPrice: 0
2025-07-17T14:00:01.3356650Z TRACE:: LiveTradingResultHandler.OrderEvent(): Time: 07/17/2025 14:00:01 OrderID: 4 EventID: 1 Symbol: QQQ Status: Submitted Quantity: 5 Message: Interactive Brokers Order Event BrokerId: 35
* 2025-07-17T14:00:01.3386782Z TRACE:: InteractiveBrokersBrokerage.HandleExecutionDetails(): Liquidation: 0 ClientId 0 RequestId: -1, Symbol: QQQ, OrderId: 35, Time: 20250717 10:00:01 US/Eastern, Side: BOT, Shares: 5, Price: 559.3293, CumQty: 5, PermId: 1033435929, Account: U16711738, ExecId: 00030e5e.695fab66.01.01
2025-07-17T14:00:01.3427807Z TRACE:: InteractiveBrokersBrokerage.HandleOpenOrder(): OrderId: 35, Contract: STK QQQ USD SMART, OrderStatus: Filled
2025-07-17T14:00:01.3430063Z TRACE:: InteractiveBrokersBrokerage.HandleOrderStatusUpdates(): OrderId: 35, Status: Filled, Filled: 5, Remaining: 0, AverageFillPrice: 559.3293, PermId: 1033435929, ParentId: 0, LastFillPrice: 559.3293, ClientId: 0, WhyHeld: ,MktCapPrice: 0
2025-07-17T14:00:01.3431579Z TRACE:: InteractiveBrokersBrokerage.HandleOpenOrder(): OrderId: 35, Contract: STK QQQ USD SMART, OrderStatus: Filled
2025-07-17T14:00:01.3432618Z TRACE:: InteractiveBrokersBrokerage.HandleOrderStatusUpdates(): OrderId: 35, Status: Filled, Filled: 5, Remaining: 0, AverageFillPrice: 559.3293, PermId: 1033435929, ParentId: 0, LastFillPrice: 559.3293, ClientId: 0, WhyHeld: ,MktCapPrice: 0
2025-07-17T14:00:01.3504138Z TRACE:: InteractiveBrokersBrokerage.HandleCommissionReport(): ExecId: 00030e5e.695fab66.01.01, Commission: 0.383018, Currency: USD
2025-07-17T14:00:01.3509236Z TRACE:: LiveTradingResultHandler.OrderEvent(): Time: 07/17/2025 14:00:01 OrderID: 4 EventID: 2 Symbol: QQQ Status: Filled Quantity: 5 FillQuantity: 5 FillPrice: $559.3293 OrderFee: 0.383018 USD Message: Interactive Brokers Order Fill Event BrokerId: 35
Mia Alissi
Here’s a detailed response for Danil’s two-part latency question with supporting documentation from QuantConnect:
1. Sequential Order Submission & Processing Delay
What You’re Seeing
Your logs show that the second order (QQQ) only reaches
PlaceOrderafter the first (SPY) getsPreSubmitted. This is not unique to your setup—QuantConnect’s BrokerageTransactionHandler typically handles order submission serially, meaning each order is processed one after the other.Documentation Insight
But:
What This Means
2. Order Latency (
PlaceOrder→PreSubmitted)You experienced ~620ms for the first order, which is within QuantConnect’s typical range (100ms–5s roundtrip). Your setup—AWS EC2 in US East, while your IB server/account is in Asia—introduces unavoidable transoceanic network latency. Move your server closer to IB's data center for your listed market.
Best Latency in Practice:
Best Practices to Reduce Latency
References:
Summary:
Let me know if you’d like detailed code snippets for queuing, alternate order logic, or monitoring order round-trip times in your algorithm!
Sources: US Equities - QuantConnect.com, Crypto - QuantConnect.com, Trading and Orders - QuantConnect.com, Opening Range Breakout for Stocks in Play, Key Concepts - QuantConnect.com
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Danil
"carefully batch logic to reduce serial dependency." - can you elaborate, please?
Danil
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!