brokerage-connect
Status: CURRENT / ACTIVE REFERENCE Last reviewed: 2026-09-15 Role: Package entrypoint for brokerage-connect (install, supported integrations, BrokerAdapter sketch).
Unified Python interface for brokerage APIs. One abstract adapter, multiple brokers.
Supported Integrations
| Integration | Extra | Status |
|---|---|---|
| Schwab | pip install brokerage-connect[schwab] |
Token-based auth via schwab-py (BrokerAdapter) |
| SnapTrade | pip install brokerage-connect[snaptrade] |
OAuth connection flow (BrokerAdapter) |
| IBKR | pip install brokerage-connect[ibkr] |
Trade adapter and IBKR client modules (BrokerAdapter) |
| Plaid | pip install brokerage-connect[plaid] |
Investments + account data APIs via plaid-python (not a BrokerAdapter trade implementation) |
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 trade broker adapter implements the same interface (sketch; see brokerage/broker_adapter.py):
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, currency: str): ...
def preview_order(
self, account_id, ticker, side, quantity, order_type, time_in_force,
currency: str, limit_price=None, stop_price=None, symbol_id=None,
): ...
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): ...
# Full ABC also requires: fetch_market_snapshot, get_live_positions,
# query_open_orders, query_completed_orders, preview_roll/place_roll,
# preview_multileg_option/place_multileg_option
Architecture
BrokerAdapter— abstract base class defining the trade interfacetrade_objects— shared dataclasses (OrderResult,OrderPreview,OrderStatus, etc.)schwab/,snaptrade/,ibkr/,plaid/— broker/provider integrationsfutures/— futures contract specs, notionals, pricing helpers, and source adaptersconfig.py— broker configuration and credential loading via environment variables
Application integration
The wheel has no dependency on a Risk checkout. Install a provider extra before
using that provider's SDK; importing the Flex parser and connection helpers does
not initialize an SDK or load a checkout .env.
IBKRClient(authorized_accounts=...)accepts the application's account policy; absent an explicit value, it usesIBKR_AUTHORIZED_ACCOUNTSfrom the process environment.- SnapTrade connection creation accepts
frontend_base_url=...(default: processFRONTEND_BASE_URL, thenhttp://localhost:3000). ASnapTradeBrokerAdapter(..., trade_limiter=...)requires a callable that serializes/paces submissions by account. Without coordination, trading raisesTradeRateLimitUnavailable; it does not submit an unpaced order. brokerage.futures.load_contract_specs()reads the bundled catalog. Applications own database-backed reference-data policy. IBKR futures metadata helpers acceptspec_loader=....FMPFuturesPriceSourceacceptsfetch_monthly_close,infer_currency, andnormalize_minor_currency_pricecallables. Pass a source toget_default_pricing_chain(fmp_source=...)or configure an application factory withconfigure_futures_pricing(factory=...). Unconfigured standalone pricing has no FMP source and uses IBKR.- At process bootstrap, applications may call
brokerage._shared.budget_guard.configure_budget(guard=..., cost_per_call=...). The standalone default executes the operation directly and carries no billing rates; it does not discover a host budget service. brokerage.ibkr.flex.configure_flex(ticker_alias_resolver=..., futures_spec_loader=...)binds application normalization policy before parsing. Without configuration, Flex keeps native equity symbols and reads bundled futures roots.normalize_flex_tradesalso accepts a per-callticker_alias_resolver.brokerage.config.CACHE_ROOTaccepts an application-ownedPath. ExplicitIBKR_CACHE_DIR/IBKR_TIMESERIES_CACHE_DIRenvironment values take precedence; without application configuration, IBKR uses the user's.cache/ibkr-mcptree.
Risk supplies these dependencies once from its own brokerage/__init__.py
composition point. Its database, distributed trade limiter, logging, and FMP
pricing policies remain application code and are not bundled into this wheel.
License
PolyForm-Noncommercial-1.0.0
Metadata
Release files for brokerage-connect 0.6.7
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 | |
|---|---|---|---|---|
| brokerage_connect-0.6.7.tar.gz | 129.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| brokerage_connect-0.6.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 287.7 kB
Release files / brokerage_connect-0.6.7.tar.gz
| Download URL | brokerage_connect-0.6.7.tar.gz |
|---|---|
| Size | 129.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9aa1c1f73406b5d8fb9d3e027de51e5932eb7f7cb7bbbde406090c55c1fc0d6a
|
|
BLAKE2b-256 checksum How to use checksums |
4a4bb008ed9c42f1f67af8c4bafb8c3926a693387bb54235ffc6dcb7ed6ea58f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.2
|
Release files / brokerage_connect-0.6.7-py3-none-any.whl
| Download URL | brokerage_connect-0.6.7-py3-none-any.whl |
|---|---|
| Size | 158.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e839221afecf31fbe2d1a460a2af35f6ef8e0fe0cfdcbb18cac02435e1192773
|
|
BLAKE2b-256 checksum How to use checksums |
a7f729b5bc67b14e9a54f1c8b1847268ad995e2852812831163dd8dc7917dc19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.2
|
Security for brokerage-connect 0.6.7
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.