Skip to main content

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] Monorepo-only — adapter requires risk_module monorepo (app_platform, options, providers.routing_config). [ibkr] extra installs the SDK but the adapter is not standalone-importable.
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[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 interface
  • trade_objects — shared dataclasses (OrderResult, OrderPreview, OrderStatus, etc.)
  • schwab/, snaptrade/, ibkr/, plaid/ — broker/provider integrations
  • config.py — broker configuration and credential loading via environment variables

License

PolyForm-Noncommercial-1.0.0

Project details


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.5.0.tar.gz (55.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

brokerage_connect-0.5.0-py3-none-any.whl (71.6 kB view details)

Uploaded Python 3

File details

Details for the file brokerage_connect-0.5.0.tar.gz.

File metadata

  • Download URL: brokerage_connect-0.5.0.tar.gz
  • Upload date:
  • Size: 55.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for brokerage_connect-0.5.0.tar.gz
Algorithm Hash digest
SHA256 a671a408d83f632b673be995dc4c9f9a2c2358e98508510a14a5e376b460fd89
MD5 a38716adf530944b40c8a95245afd27b
BLAKE2b-256 489ad4a44c1718ec1bad0a13bd5c3af3ec2419d9e02e261c8d792dd2022c368e

See more details on using hashes here.

File details

Details for the file brokerage_connect-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for brokerage_connect-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 73a857b509cc07899d435e4f36154ec1af59e7ee3850de6604485a9b861cf8d9
MD5 5e084ff0431dd04b9ec5a2575d132062
BLAKE2b-256 d41d518926e80953bc2924a5e718fefa94342351daebdf9bb3348c40300d5876

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page