Why does Interactive Brokers have such poor API design despite being an excellent broker?

Interactive Brokers offers amazing features like cheap fees, honest order handling, smart order routing, tons of global stocks, quick trades, and demo accounts. But if they can nail all these things perfectly, how come their programming interfaces are so frustrating to work with?

The TWS API feels like a nightmare to use. It seems like it was built by a bunch of old school programmers who got stuck in the past and never bothered updating their skills. You have to build one giant messy class that handles everything, and there’s no clean way to break it into smaller pieces. The worst part is tracking request IDs instead of using logical identifiers. Say I want price history for AAPL and MSFT - I have to remember which random request number goes with which stock, rather than just using the actual stock symbols. This gets incredibly messy when you try to build anything more complex than basic stuff. Planning to mix options data with volatility indicators for futures trading? Get ready for the most confusing and untestable code you’ve ever written.

They do offer a web API that solves some issues with simple requests for account details and position info. There’s also a websocket option that should work great for live market data streams, but it only handles basic bid/ask prices.

I’m wondering if I should just stick with their web API and pay for market data from another provider like Polygon, even though that’s really expensive for data I already get free through my IB account.

Has anyone else dealt with these IB API headaches? How did you solve it? External data source? Mixing different APIs? Or just accepting the messy TWS approach?

TWS API sucks but saves me thousands on data costs.

Their legacy systems do what they’re supposed to but feel ancient when building modern trading tools.

I built a simple mapping system that turns their messy request IDs into readable format. More work upfront, but debugging becomes way easier.

Free data access through IB is what keeps me from switching to external providers. Monthly costs pile up fast when you’re trading multiple asset classes.

IB’s API team doesn’t care about developer experience at all. They dump everything into execution speed and compliance, leaving us with garbage interfaces. I use a hybrid setup for live trading - TWS for order management (it’s actually decent there), web API for market data when it works, then fall back to TWS for the gaps. The request ID nightmare? Just track everything in a database table instead of trying to juggle it in memory. Yeah, it’s annoying as hell, but paying for real data feeds costs way more than the time you’ll spend wrestling with their broken API.

TWS API’s dated but does the job once you figure it out. Built a few basic scripts - that request ID tracking’s a pain but you can work around it for simple tasks.

This video got me started. If you’re just trading part-time, the web API handles most of what you need.

Been using IB for years and yeah, TWS API is a nightmare. Built several algos with it and that request ID mess almost made me quit.

I solved it with a wrapper class - maps my logical IDs to their random request numbers. Keep a dictionary linking “AAPL_daily” to whatever number TWS spits out. Not perfect but way cleaner.

For complex strategies I mix APIs. Web API handles account/positions, TWS does the heavy data lifting. Their websocket works for basic streaming but you’re right - pretty limited.

External data providers cost a fortune across multiple markets. IB’s data is solid and free with your account, so I just live with their janky interface.

API hasn’t changed much in years so once you learn the quirks, it’s consistent. Still annoying but saves me $500+ monthly on data feeds.

Just bite the bullet and build wrapper functions.