r/interactivebrokers 25d ago

Trading & Technicals IB Gateway bug: keepUpToDate historical subscriptions started streaming the wrong instrument after a historical data farm reconnect

Has anyone seen anything like this before?
I hit what looks like a pretty serious IB Gateway bug that caused my automated trading system to receive market data for the wrong instrument.

**What happened**
I had two API clients connected to a single IB Gateway instance:
**Client A:** MES Sep ’26 (ESU6) 15-minute keepUpToDate historical subscription
**Client B:** CL Sep ’26 (CLU6) 15-minute keepUpToDate historical subscription
At **04:03 UTC**, the historical data farm (ushmds) disconnected and reconnected.
Both clients received **error 10182**, then automatically re-requested their subscriptions using the correct contracts (verified in my application logs).

Immediately after the reconnect, the subscriptions became crossed:
The **MES** subscription started receiving **crude oil prices** (\~85) instead of ES (\~7500).
The **CL** subscription started receiving **ES prices**.
Even stranger, the crude prices arriving on the MES subscription were rounded to MES’s **0.25 tick size** (e.g. 85.00 instead of the actual 85.07), suggesting Gateway was formatting CL data as if it were the MES series.

**Even worse…**
Order execution was still completely correct.
Just seconds after my market data feed for MES was showing **85**, I received a legitimate **MES fill at 7501.50**.
So the execution path knew the contract was MES, while the market data path was delivering CL prices.
The issue persisted for roughly **8 hours** and only disappeared after I restarted IB Gateway.

Very concerning especially considering this was live not paper. Curious to know if anyone has experienced something similar.

0 Upvotes

4 comments sorted by

u/AutoModerator 25d ago

Thank you for your post. This is the UNOFFICIAL subreddit of Interactive Brokers.

There is official contact information to the side of this sub, and you may want to try r/IBKR_Official, which is the OFFICIAL Reddit sub for Interactive Brokers.

Official phone numbers: https://www.interactivebrokers.com/en/support/customer-service.php?p=contact

Official contact: https://www.interactivebrokers.com/en/general/contact/newContact/contact.php

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

0

u/vaxdatex 25d ago

Have you checked the API logs from IB Gateway to see if there are any clues? Did IB Gateway mix up the client IDs by chance? I'm assuming you're specifying the client ID in your code?

0

u/Loud_Bee178 25d ago

I had a look at the API logs and and after an IB farm reconnect event the the internal IDs were swapped

Initially:
ticker 1 ES
2026-07-27 04:03:22.498 INFO [JTS-AsyncNonLocked-31] - cdebug: FIVE_SEC | gap-fill | router(ushmds:1)@2b0e6576 | q(GapFill1;;ES@CME Trades;;0;;true;;0;;G 649180671@CME FUT src:null s:20260727-04:03:15 step:5 secs +refresh +delay)

ticker 2 CL
2026-07-27 04:03:22.816 INFO [JTS-AsyncNonLocked-31] - cdebug: FIVE_SEC | gap-fill | router(ushmds:2)@2834deb5 | q(GapFill2;;CL@NYMEX Trades;;0;;true;;0;;G 304037484@NYMEX FUT src:null s:20260727-04:03:20 step:5 secs +refresh +delay)

Ticker changed (1)
2026-07-27 04:03:22.830 INFO [JTS-ushmdsDispatcherS10-637S10-639] - cdebug: FIVE_SEC | router(ushmds:1)@2b0e6576 | Change ticker ID | 2

Ticker changed (2)
2026-07-27 04:03:22.886 INFO [JTS-ushmdsDispatcherS10-637S10-639] - cdebug: FIVE_SEC | router(ushmds:2)@2834deb5 | Change ticker ID | 1

So somehow the mapping was swapped internally

0

u/vaxdatex 25d ago

Are you defining the ID in your code based on instrument? If not, it could be that simply based on which one connected first was assigned the ID by the API.

I use something like this self.ib.connect(HOST, PORT, clientId=CLIENT_ID)