Broker & exchange APIs
Libraries and APIs to place orders and read your accounts from code, on any market.
Quick comparison
| Tool | Cost | Price | Open source | Level | Markets / uses |
|---|---|---|---|---|---|
| Alpaca (alpaca-py) | Via account | Check the official website | Yes | Beginner | Stocks, Crypto, Options |
| Binance Python connectors | Free | Free (open source); Binance trading fees apply | Yes | Intermediate | Crypto, Crypto futures, Crypto options |
| CCXT | Free | Free (open source) | Yes | Intermediate | Crypto, Prediction markets |
| Coinbase Advanced API Python SDK | Free | Free (open source); Coinbase trading fees apply | Yes | Intermediate | Crypto |
| ib_async (Interactive Brokers) | Free | Free (open source); your Interactive Brokers account has its own terms | Yes | Intermediate | Whatever your Interactive Brokers account offers |
| Kraken API | Via account | Free with a Kraken account; trading fees apply | No | Intermediate | Crypto |
| OANDA v20 API | Via account | API access free with an OANDA v20 account; trading costs apply | No | Intermediate | Forex, CFDs |
| pybit (Bybit) | Free | Free (open source); Bybit trading fees apply | Yes | Intermediate | Crypto, Crypto futures, Crypto options |
| python-binance | Free | Free (open source); Binance trading fees apply | Yes | Beginner | Crypto, Crypto futures |
| schwab-py | Free | Free (open source); requires a Schwab account | Yes | Intermediate | Stocks, Options |
| tastytrade Python SDK | Free | Free (open source); requires a tastytrade account | Yes | Intermediate | Stocks, Options, Futures |
| Tradier | Via account | Lite $0/mo ($0.35 per stock trade and options contract), Pro $10/mo, Pro Plus $35/mo ($0 commissions); regulatory fees extra | No | Intermediate | Stocks, Options |
Reviews
Alpaca (alpaca-py)
Alpaca's official Python SDK to trade stocks, crypto and options via API and download market data.
Binance Python connectors
Binance's official, auto-generated Python SDKs for its APIs, split into separate packages for spot, USDⓈ-M and COIN-M futures, options, margin and more.
CCXT
Library that unifies the APIs of 100+ crypto exchanges behind a single interface, available in seven languages.
Coinbase Advanced API Python SDK
Coinbase's official Python SDK for the Advanced Trade REST and WebSocket APIs.
ib_async (Interactive Brokers)
Python library to connect to Interactive Brokers through TWS or IB Gateway; successor of the popular ib_insync.
Kraken API
Kraken's trading APIs over REST, WebSocket and FIX, plus a command-line tool with paper trading against live market data.
OANDA v20 API
OANDA's REST API for forex and CFD trading, with real-time rates, historical prices back to 2005 and a practice environment.
pybit (Bybit)
Bybit's official lightweight Python connector for its HTTP and WebSocket APIs, covering spot, derivatives and options.
python-binance
Popular unofficial Python wrapper for the Binance API, with spot, futures and WebSocket support.
schwab-py
Unofficial Python wrapper for the Charles Schwab trader API: quotes, option chains, streaming data, orders and account information.
tastytrade Python SDK
Unofficial, fully typed and asynchronous Python SDK for the tastytrade API, with DXLink streaming of quotes and greeks.
Tradier
US broker built around an API, with commission-based or subscription plans and API access included on every plan.
Not sure which one fits?
Tell us your goal and we will recommend, or build, the right bot.
What people build with these
Portfolio daily summary
Balances across brokers, exchanges and wallets in one evening message.
Indicator and price alerts
Alerts on any market when price or indicators hit your levels, without staring at charts.
Portfolio rebalancing and DCA
Buys a fixed amount on schedule or rebalances to target weights across ETFs or crypto.