CCXT Library Setup Guide for Beginners
What Is CCXT?
CCXT supports 100+ exchanges with one unified API. Write code once, trade on any supported exchange.
Install
pip install ccxt
Basic Usage
import ccxt
exchange = ccxt.binance()
ticker = exchange.fetch_ticker("BTC/USDT")
print(ticker["last"])
exchange = ccxt.binance({"apiKey": "KEY", "secret": "SECRET"})
balance = exchange.fetch_balance()
order = exchange.create_market_buy_order("BTC/USDT", 0.001)
Switch Exchanges Instantly
exchange = ccxt.bybit({"apiKey": "...", "secret": "..."})
exchange = ccxt.okx({"apiKey": "...", "secret": "..."})
exchange = ccxt.hyperliquid({"privateKey": "..."})
Or Use CCXT MCP
claude mcp add ccxt -- npx @ccxt/mcp-server
Then just ask Claude to trade in plain English.