Overview
The CCXT library is a collection of available crypto exchanges or exchange classes. Each class implements the public and private API for a particular crypto exchange. All exchanges are derived from the base Exchange class and share a set of common methods.
The library structure consists of:
- Public API: Market data access
 - Private API: Trading and account management
 - Custom Exchange API: Exchange-specific implementations
 - Base Exchange Class: Core functionality
 
Full public and private HTTP REST APIs for all exchanges are implemented. WebSocket implementations are available in CCXT Pro.
Key Features
Exchanges
Supported Exchange Markets
The CCXT library currently supports the following cryptocurrency exchanges:
| Exchange ID | Exchange Name | 
|---|---|
| binance | Binance | 
| coinbase | Coinbase | 
| kraken | Kraken | 
| bitfinex | Bitfinex | 
| huobi | Huobi | 
| okx | OKX | 
| kucoin | KuCoin | 
View full list of supported exchanges
Instantiation
To connect to an exchange:
const ccxt = require('ccxt');
const exchange = new ccxt.binance();Rate Limit
All exchanges enforce rate limits. The CCXT library includes a built-in rate limiter enabled by default:
exchange.enableRateLimit = true; // Enable rate limitingMarkets
Markets represent trading pairs. Each market has:
- Symbol (e.g., BTC/USD)
 - Base currency
 - Quote currency
 - Precision settings
 - Trade limits
 
const markets = await exchange.loadMarkets();
console.log(markets['BTC/USD']);Unified API
The CCXT library provides a consistent interface across all exchanges:
// Fetch order book
const orderbook = await exchange.fetchOrderBook('BTC/USDT');
// Fetch ticker
const ticker = await exchange.fetchTicker('ETH/BTC');
// Create order
await exchange.createLimitBuyOrder('BTC/USDT', 1, 50000);FAQ
How do I handle pagination?
Use the since and limit parameters:
const trades = await exchange.fetchTrades('BTC/USDT', since, 100);What if my API call fails?
CCXT throws specific exceptions:
NetworkErrorfor connection issuesExchangeErrorfor exchange-specific errorsInvalidNoncefor authentication issues
How do I get historical data?
const ohlcv = await exchange.fetchOHLCV('BTC/USDT', '1d', since, limit);