Unified Python interface for brokerage APIs — Schwab, SnapTrade, IBKR, Plaid
Project description
brokerage-connect
Unified Python interface for brokerage APIs. One abstract adapter, multiple brokers.
Supported Brokers
| Broker | Extra | Status |
|---|---|---|
| Schwab | pip install brokerage-connect[schwab] |
Token-based auth via schwab-py |
| SnapTrade | pip install brokerage-connect[snaptrade] |
OAuth connection flow |
| IBKR | pip install brokerage-connect[ibkr] |
Trade adapter via interactive-brokers-mcp PyPI dep |
| Plaid | pip install brokerage-connect[plaid] |
Investments + account APIs via plaid-python |
Install
pip install brokerage-connect
# With broker-specific dependencies:
pip install brokerage-connect[schwab]
pip install brokerage-connect[schwab,plaid]
pip install brokerage-connect[schwab,ibkr]
pip install brokerage-connect[plaid]
Quick Start
from brokerage import BrokerAdapter
# Every broker adapter implements the same interface:
class MyBroker(BrokerAdapter):
provider_name = "my_broker"
def owns_account(self, account_id: str) -> bool: ...
def list_accounts(self): ...
def search_symbol(self, account_id, ticker): ...
def preview_order(self, account_id, ticker, side, quantity, order_type, time_in_force, **kw): ...
def place_order(self, account_id, order_params): ...
def get_orders(self, account_id, state="all", days=30): ...
def cancel_order(self, account_id, order_id): ...
def get_account_balance(self, account_id): ...
def refresh_after_trade(self, account_id): ...
Architecture
BrokerAdapter— abstract base class defining the trade interfacetrade_objects— shared dataclasses (OrderResult,OrderPreview,OrderStatus, etc.)schwab/,snaptrade/,ibkr/,plaid/— broker/provider integrationsconfig.py— broker configuration and credential loading via environment variables
License
PolyForm-Noncommercial-1.0.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
brokerage_connect-0.6.1.tar.gz
(61.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file brokerage_connect-0.6.1.tar.gz.
File metadata
- Download URL: brokerage_connect-0.6.1.tar.gz
- Upload date:
- Size: 61.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46a72bbb713ac4b6cb2f9094e67af3b42a21df91c5c0a6b39a78bcfab2f8614d
|
|
| MD5 |
98a721664cccbf8bb90b73b710e483cb
|
|
| BLAKE2b-256 |
47ee0627c76119bd2ce12a10d6d6a20d3a1764b67b3f5630866cdbf6cc99ac1e
|
File details
Details for the file brokerage_connect-0.6.1-py3-none-any.whl.
File metadata
- Download URL: brokerage_connect-0.6.1-py3-none-any.whl
- Upload date:
- Size: 80.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47a65a0f2b6968829e5d5b4e16c06caad52ab5720d6d01c54759e8e85b5206ea
|
|
| MD5 |
64b915e5f0038d33ad068bb92a8258f4
|
|
| BLAKE2b-256 |
4d0039efa314fd51296d95da1ede8fbe7277a2ed4129081c0f1d41f3dd4becb5
|