ibapi
Automated publisher for the Interactive Brokers TWS API Python client on PyPI.
📦 Installation
Two packages available on PyPI:
Latest Version (Recommended)
pip install ibapi-latest
Stable Version
pip install ibapi-stable
You can also install a specific version:
pip install ibapi-latest==10.40.01
pip install ibapi-stable==10.37.02
🚀 Usage
from ibapi.client import EClient
from ibapi.wrapper import EWrapper
from ibapi.contract import Contract
class IBApp(EWrapper, EClient):
def __init__(self):
EClient.__init__(self, self)
app = IBApp()
app.connect("127.0.0.1", 7497, clientId=1)
app.run()
For complete examples and documentation, visit the official IB API documentation.
📋 About This Package
This is an unofficial automated publisher for the Interactive Brokers TWS API Python client. The source code is from Interactive Brokers' official TWS API distribution, packaged and published to PyPI for easy installation.
⚠️ DISCLAIMER
This package is NOT officially affiliated with, endorsed by, or supported by Interactive Brokers LLC. It is an independent community project that automates the packaging and distribution of the official IB API source code.
- The IB API source code is proprietary to Interactive Brokers and is licensed under the TWS API Non-Commercial License
- This automation tool is provided "as is" without any warranties
- For official support, please contact Interactive Brokers
- Trading involves risk. Use at your own discretion.
Two PyPI Packages
ibapi-latest: The newest IB API version (frommainbranch)ibapi-stable: Previous IB API versions (fromstablebranch)
Both packages are automatically updated weekly when new IB API versions are released.
🏗️ Project Structure
ibapi/
├── .github/
│ └── workflows/ # GitHub Actions for automation
│ ├── update-ibapi-latest.yml # Latest version publisher
│ └── update-ibapi-stable.yml # Stable version publisher
├── scripts/ # Automation scripts
│ ├── get_download_url.py # Fetch IB API download URLs
│ ├── update_ibapi.py # Download and commit IB API
│ └── check_and_update.py # Orchestrator (legacy)
├── ibapi/ # IB API Python client (auto-updated)
│ └── ibapi/
│ ├── client.py
│ ├── wrapper.py
│ └── ...
├── pyproject.toml # Package configuration
└── README.md
🔄 How It Works
Automated Workflow
- Weekly Check: GitHub Actions runs every Monday at 9:00 AM UTC
- Version Detection: Scrapes https://interactivebrokers.github.io/ for new versions
- Download & Extract: Downloads the TWS API zip and extracts the Python client
- Auto-Fix: Automatically fixes version strings and package configuration
- Build & Publish: Builds the package and publishes to PyPI
- Tag & Release: Creates git tags and GitHub releases
Version Management
- Versions follow IB's format:
10.40.01,10.37.02, etc. - Git tags:
v10.47.01-latest(latest channel),v10.46.01-stable(stable channel) - PyPI packages:
- Latest:
ibapi-latest==10.40.01 - Stable:
ibapi-stable==10.37.02
- Latest:
📝 License
This project has a dual license structure:
IB API Source Code (ibapi/ directory)
The Interactive Brokers TWS API source code is proprietary software owned by Interactive Brokers LLC and is licensed under the TWS API Non-Commercial License.
Key restrictions:
- ✅ Use for personal trading and account management
- ✅ Develop internal proprietary tools for your own IB account
- ❌ NOT permitted: Selling software to third parties
- ❌ NOT permitted: Distributing software to generate indirect financial benefit (e.g., commissions)
- ⚠️ Requires: Active Interactive Brokers account
For commercial use, contact Interactive Brokers at: opensource@interactivebrokers.com
Full license text: See LICENSE file
Automation Scripts (scripts/ directory, workflows)
The automation tooling that packages and publishes the IB API is licensed under the MIT License.
See the LICENSE file for complete details.
🔗 Links
- PyPI Packages:
- Official IB API: https://interactivebrokers.github.io/tws-api
- Documentation: https://ibkrcampus.com/ibkr-api-page/
- GitHub Repository: https://github.com/yourusername/ibapi
🐛 Support
For issues with:
- The IB API itself: Contact Interactive Brokers
- This package/automation: Open an issue on GitHub
⚙️ Configuration
The package configuration is in pyproject.toml:
[project]
name = "ibapi"
dynamic = ["version"] # Version from ibapi.__version__
dependencies = ["protobuf==5.29.3"]
[tool.setuptools]
packages = ["ibapi", "ibapi.protobuf"]
package-dir = {"" = "ibapi"} # Maps ibapi/ibapi/* to ibapi/*
This ensures imports work as expected:
from ibapi.client import EClient # Not from ibapi.ibapi.client
Metadata
Release files for ibapi-latest 10.50.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ibapi_latest-10.50.2.tar.gz | 167.7 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ibapi_latest-10.50.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 584.5 kB
Release files / ibapi_latest-10.50.2.tar.gz
| Download URL | ibapi_latest-10.50.2.tar.gz |
|---|---|
| Size | 167.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bb0e5c7a4186f25ddfd7b65cd94ffb9523b1611312d3df8f8e11afb18acec8e0
|
|
BLAKE2b-256 checksum How to use checksums |
f824a612b133278af852ad2360044e3b7a3cd36296facf5c088e9f56bdfefeeb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.
Transparency logRelease files / ibapi_latest-10.50.2-py3-none-any.whl
| Download URL | ibapi_latest-10.50.2-py3-none-any.whl |
|---|---|
| Size | 416.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7e5a74fc6b237ea97883d8dca48224f7e3ab7fcad32736b25d27dc4c4f1e5033
|
|
BLAKE2b-256 checksum How to use checksums |
50b4eb273df028ee485dd211a22e175b63276588c409598369f7b3d46e40c8ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.
Transparency logSecurity for ibapi-latest 10.50.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for ibapi_latest-10.50.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.