“Logo for ‘IBCP’”
Overview
Please see https://ibcp.readthedocs.io for the full documentation.
Features
Simple REST API wrapper
Easy to use and understand
Supports all Interactive Brokers Client Portal Web API endpoints
Handles authentication and session management
Supports both SSL and non-SSL connections
Requirements
IBCP assumes a gateway session is active and authenticated.
Installation
IBCP was developed under the Voyz/IBeam docker image environment.
Once a gateway session is running, pip command can be used to install IBCP:
pip install ibcp
Usage
import ibcp
ib = ibcp.REST() # default parameters: url="https://localhost:5000", ssl=False
# Get account information
account = ib.get_account()
# Get portfolio
portfolio = ib.get_portfolio()
# Get positions
positions = ib.get_positions()
# Get orders
orders = ib.get_orders()
# Get trades
trades = ib.get_trades()
# Get market data
market_data = ib.get_market_data("AAPL")
# Place order
order = ib.place_order({
"symbol": "AAPL",
"secType": "STK",
"currency": "USD",
"exchange": "SMART",
"tif": "DAY",
"side": "BUY",
"totalQuantity": 100,
"orderType": "MKT"
})
For the complete reference, please visit https://ibcp.readthedocs.io/en/latest/reference.html.
Configuration
By default, IBCP assumes the gateway session is open at https://localhost:5000 without an SSL certificate. A custom URL and SSL certificate can be set by:
ib = ibcp.REST(url="https://localhost:5000", ssl=False)
Documentation of available functions is at https://ibcp.readthedocs.io/en/latest/reference.html.
Release files for ibcp 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ibcp-0.0.3.tar.gz | 7.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ibcp-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.9 kB
Release files / ibcp-0.0.3.tar.gz
| Download URL | ibcp-0.0.3.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b23291976f253aff9cffb065befbcad4c9b8909f9283b07bdf807a5e049d847
|
|
BLAKE2b-256 checksum How to use checksums |
8f5afaf0e40e170f2cc1eff2c54157916f6da6356f80119ad555e8224a7c721f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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 1, 2025.
Transparency logRelease files / ibcp-0.0.3-py3-none-any.whl
| Download URL | ibcp-0.0.3-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0916127cd9f0edf1b9b32702272982aabc35280fd7a9423d509446a69d4a3f46
|
|
BLAKE2b-256 checksum How to use checksums |
914ba87dfc98958263be4fdd4c7aa4924da46b4ad91d83bfb30660dc9de9b33e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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 1, 2025.
Transparency log