nautilus-interactive-brokers
NautilusTrader adapter for Interactive Brokers.
The nautilus-interactive-brokers crate wraps the ibapi
client and connects it to NautilusTrader's live data, execution, historical data, and instrument
loading infrastructure. Optional PyO3 bindings expose the same implementation through
nautilus_trader.
NautilusTrader
NautilusTrader is an open‑source, production‑grade, Rust‑native engine for multi‑asset, multi‑venue trading systems.
The system spans research, deterministic simulation, and live execution within a single event‑driven architecture, providing research‑to‑live semantic parity.
What this crate provides
data:InteractiveBrokersDataClientfor market data subscriptions and live streaming.execution:InteractiveBrokersExecutionClientfor order submission, account synchronization, and execution updates.historical:HistoricalInteractiveBrokersClientfor historical data requests.providers:InteractiveBrokersInstrumentProviderfor contract lookup, instrument normalization, and symbology conversion.gateway:DockerizedIBGatewayfor managing a Dockerized IB Gateway when thegatewayfeature is enabled.python: PyO3 bindings exposed throughnautilus_trader.adapters.interactive_brokerswhen thepythonfeature is enabled.
Feature flags
This crate provides feature flags to control source code inclusion during compilation:
python: Enables PyO3 bindings for configs, enums, the historical client, and the instrument provider.gateway: Enables Dockerized IB Gateway support viabollard, including PyO3 bindings when combined withpython.extension-module: Builds the crate as a Python extension module. This is the feature used by thenautilus_traderpackage and includespythonandgateway.
Default ports
Use 127.0.0.1 unless you are connecting to a remote host.
| Endpoint | Trading mode | Default port |
|---|---|---|
| IB Gateway | Paper | 4002 |
| IB Gateway | Live | 4001 |
| TWS | Paper | 7497 |
| TWS | Live | 7496 |
| Dockerized IB Gateway | Paper | 4002 |
| Dockerized IB Gateway | Live | 4001 |
This crate defaults to 4002, which matches paper‑trading IB Gateway and the
default Dockerized IB Gateway paper setup. If you are connecting to TWS or to a
live Gateway session, set the port explicitly in your config.
Market data timestamps
Configure TWS or IB Gateway to return market data timestamps in UTC before connecting NautilusTrader. The adapter does not convert these timestamps automatically at runtime.
Documentation
- Crate docs: generated Rust API reference.
- Interactive Brokers integration guide: setup, configuration, symbology, and usage.
- Rust node examples: live data and execution testers.
- Python live‑node examples: Python configuration examples.
License
The source code for NautilusTrader is available on GitHub under the GNU Lesser General Public License v3.0.
NautilusTrader™ is developed and maintained by Nautech Systems, a technology company specializing in the development of high‑performance trading systems. For more information, visit https://nautilustrader.io.
Use of this software is subject to the Disclaimer.
© 2015-2026 Nautech Systems Pty Ltd. All rights reserved.