@stoqey/ib started with a practical frustration: I wanted to automate parts of my own trading workflow from Node.js, but Interactive Brokers' API was built around Java and C++. The existing JavaScript package had fallen behind, so I picked it up and rebuilt the developer experience I needed.
The result is a TypeScript client for Interactive Brokers TWS and IB Gateway that speaks directly to the broker's socket protocol. It keeps the familiar request-and-event model of the official API while making it feel at home in a modern Node.js codebase.
What the library makes possible
- Connect to TWS or IB Gateway from Node.js without a Java or C++ runtime dependency.
- Work with typed contracts, orders, account data, positions, historical data, and market-data events.
- Use the event-driven
IBApiinterface for a close match to the official API, or the in-progress RxJS-basedIBApiNextinterface for a more composable experience. - Build everything from small trading tools to portfolio services and automated research workflows on the same core client.
Maintaining it means tracking changes to Interactive Brokers' TWS API, keeping the TypeScript surface dependable, and giving developers a path from the official request/callback model to something more ergonomic. The repository now carries 328 GitHub stars, 60 forks, and more than 700 commits—a real community around a very specialized problem.
What began as a personal automation project has now passed 530K npm downloads, with more than 40K downloads in a typical week. That is a humbling reminder that the best open source work often starts by solving one sharp problem well enough that other builders can trust it too.
Explore the package on npm · View the source on GitHub · Read the API documentation
