ib_async
Python sync/async framework for Interactive Brokers API
Decision gist · record as of 2026-08-14
Yes. ib_async is actively maintained, production-stable, has low install friction, and offers a permissive BSD license. It solves a real problem—providing a modern async Python interface to Interactive Brokers—without requiring IB's official ibapi package. Install it if you need programmatic access to IB's trading and market data APIs. The only prerequisite is running IB Gateway or TWS locally.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a running IB Gateway or TWS instance with API enabled on the specified port (default 7497 for TWS, 4001 for Gateway).
- Python 3.10 or higher required.
- Low friction installation with three lightweight runtime dependencies.
License · maintenance · safety
BSD (permissive) — BSD permissive license allows commercial and private use with minimal restrictions, making it suitable for production trading applications and research tools.
last release 2025-12-08 (249 days) · last repo commit 2026-07-15 · 1,715 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 628,366 downloads/mo, #5,674 on PyPI
Alternatives
Verify before relying
pip install ib_async
from ib_async import IB, Stock
ib = IB()
ib.connect('127.0.0.1', 7497, clientId=1)
contract = Stock('AAPL', 'SMART', 'USD')
ticker = ib.reqMktData(contract, '', False, False)
print(f"Last: {ticker.last}")
ib.disconnect()- Whether the package handles reconnection and error recovery automatically in production scenarios
- Performance characteristics when streaming high-frequency market data or managing large portfolios
- Compatibility with different IB Gateway versions and any known breaking changes
What it is and what it does
ib_async is a Python library that wraps the Interactive Brokers API, providing a clean async-first interface to TWS and IB Gateway. It eliminates the need to use IB's official ibapi package by implementing the IBKR binary protocol internally, and handles connection management, data synchronization, and event handling automatically. The library is built on asyncio and eventkit, making it suitable for both simple scripts and high-performance applications.
You use it to stream live market data, request historical bars, place and monitor orders, track positions and account balances, and analyze contract details—all from Python without dealing with callback complexity. It supports Jupyter notebooks through a special loop mode, and includes reconnection logic and comprehensive logging for production use. The library requires a running IB Gateway or TWS instance to connect to, and supports Python 3.10 and later.
Use it for
- Stream live stock, forex, or options quotes and build real-time market data dashboards
- Backtest and deploy algorithmic trading strategies with programmatic order placement and monitoring
- Track portfolio positions, account balances, and P&L in real-time across multiple accounts
- Analyze historical price data and option chains for research and strategy development
- Build risk management tools that monitor exposures and trigger automated hedges or alerts
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
ib_async is actively maintained, production-stable, has low install friction, and offers a permissive BSD license. It solves a real problem—providing a modern async Python interface to Interactive Brokers—without requiring IB's official ibapi package. Install it if you need programmatic access to IB's trading and market data APIs. The only prerequisite is running IB Gateway or TWS locally.
Install
ib-async on PyPI
Before you install
Low friction installation with three lightweight runtime dependencies. Active maintenance with recent commits and production-stable status. Requires Python 3.10 or higher and a running IB Gateway or TWS instance.
Requires a running IB Gateway or TWS instance with API enabled on the specified port (default 7497 for TWS, 4001 for Gateway). Python 3.10 or higher required.
License in practice
BSD permissive license allows commercial and private use with minimal restrictions, making it suitable for production trading applications and research tools.
Quickstart
pip install ib_async
from ib_async import IB, Stock
ib = IB()
ib.connect('127.0.0.1', 7497, clientId=1)
contract = Stock('AAPL', 'SMART', 'USD')
ticker = ib.reqMktData(contract, '', False, False)
print(f"Last: {ticker.last}")
ib.disconnect()
Verify before relying
- Whether the package handles reconnection and error recovery automatically in production scenarios
- Performance characteristics when streaming high-frequency market data or managing large portfolios
- Compatibility with different IB Gateway versions and any known breaking changes
Package facts
| License | BSD permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesaeventkitnest_asynciotzdata |
| Maintenance | Actively maintained 249 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 628,366 / month, #5,674 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: Other/Proprietary LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Office/Business :: Financial :: Investment |
Evidence: ib_async-2.1.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “ib gateway trading client”
- ib_asyncib_async provides a Python interface to Interactive Brokers' Trader…
- ib-insyncProvides a Python async/sync interface to Interactive Brokers' Trader…
- alibabacloud-gateway-spiProvides a service provider interface (SPI) for Alibaba Cloud gateway…
Give your agent the search over MCP, or paste the wish link into any chat.
More Investment packages
Generates country- and subdivision-specific government holiday calendars on demand, supporting 250 country codes with optional language localization and holiday categories.
Fetches financial and market data from Yahoo Finance's public APIs, including ticker information, historical prices, and live streaming data.
However, do not use it for commercial applications or high-volume data collection without confirming compliance with Yahoo's terms of service.
Provides elementary financial functions (IRR, NPV, PMT, and others) that were deprecated and removed from NumPy, offering a dedicated replacement for financial calculations.
However, given the aging status (no releases since 2019) and unclear compatibility with modern Python and recent numpy versions, verify that it works with your target…
CCXT is a unified API library for connecting to and trading on more than 100 cryptocurrency exchanges and prediction markets, supporting both REST and WebSocket protocols with normalized cross-exchange data access.
Official Python client for accessing live and historical market data from Databento, supporting multiple asset classes, schemas, and data formats with normalized message structures.
Install it if you need programmatic access to Databento's historical or live market data; skip it if you don't have a Databento account or need data from a different…
EdgarTools parses SEC EDGAR filings into typed Python objects and pandas DataFrames, extracting financial statements, insider trades, fund holdings, and other filing types with a consistent API.
The main gotcha is that you must provide an email to the SEC with every request, but that is a documented requirement.
See also ib-insync · kiteconnect · snaptrade-python-sdk · python-binance · py-clob-client · growwapi · injective-py · fyers-apiv3 · polymarket-client