CCXT Pro vs CCXT Async: Which One Should You Use?
A practical breakdown of CCXT Pro and CCXT Async for crypto traders building bots — when to use each, key differences, and real code examples.
A practical breakdown of CCXT Pro and CCXT Async for crypto traders building bots — when to use each, key differences, and real code examples.
If you've spent any time building a crypto trading bot, you've almost certainly landed on CCXT — the open-source library that connects to over 100 exchanges with a single, unified API. But once you get past the basics, you hit a fork in the road: CCXT Pro or CCXT Async? The naming is confusing, the docs are dense, and making the wrong choice can mean rewriting your bot from scratch three months down the line. Let's cut through it.
CCXT (CryptoCurrency eXchange Trading Library) is a Python, JavaScript, and PHP library that gives you a standardized way to talk to exchanges like Binance, Bybit, OKX, and KuCoin. Instead of learning each exchange's unique API documentation, you write one set of code and CCXT translates it. Think of it like a universal remote — one interface, many devices.
The original CCXT library uses synchronous (blocking) HTTP requests. That works fine for simple scripts: fetch a price, place an order, check your balance. But as soon as your bot needs to watch multiple markets simultaneously or react to live price ticks in milliseconds, synchronous code becomes a bottleneck. This is where the async and Pro variants come in.
Key Takeaway: The original CCXT is synchronous and REST-only. CCXT Async adds non-blocking HTTP. CCXT Pro adds WebSocket streaming on top of that. They are not competing products — they are layers of the same library.
CCXT Async is the asynchronous version of the standard CCXT library. It uses Python's asyncio framework (or JavaScript's native async/await) to make REST API calls non-blocking. What does that mean in practice? Your program doesn't sit and wait for Binance to respond before moving on. It fires off the request, does other work, and picks up the response when it arrives.
This is a massive improvement over synchronous CCXT for bots that need to query multiple exchanges or endpoints at once. For example, if you want to check the BTC/USDT price on Binance, Bybit, and KuCoin simultaneously to look for price discrepancies, synchronous code does it one at a time — total time is the sum of all three requests. Async does all three at once — total time is roughly the slowest single request.
import ccxt.async_support as ccxt
import asyncio
async def fetch_price(exchange_id, symbol):
exchange = getattr(ccxt, exchange_id)()
ticker = await exchange.fetch_ticker(symbol)
await exchange.close()
return exchange_id, ticker['last']
async def main():
results = await asyncio.gather(
fetch_price('binance', 'BTC/USDT'),
fetch_price('bybit', 'BTC/USDT'),
fetch_price('kucoin', 'BTC/USDT'),
)
for exchange, price in results:
print(f"{exchange}: ${price:,.2f}")
asyncio.run(main())
CCXT Async is available as part of the standard ccxt package — you import it from ccxt.async_support. No extra subscription or license required. It covers the same REST endpoints as standard CCXT: order books, tickers, OHLCV candles, placing orders, fetching balances. The only thing it doesn't do is WebSockets.
CCXT Pro is a separate, paid library built on top of CCXT Async. The headline feature is WebSocket support — persistent, two-way connections to exchanges that push data to your bot the moment something changes, instead of your bot repeatedly asking 'anything new?' via REST.
The difference matters enormously for latency-sensitive strategies. When you poll Binance's REST API for the latest order book, you're getting a snapshot from whenever the server processed your request — potentially hundreds of milliseconds old by the time you act on it. A WebSocket connection to Binance delivers order book updates in real time, the instant a trade happens. For scalping, market making, or any strategy where being early by 50ms matters, REST polling simply can't compete.
import ccxtpro
import asyncio
async def watch_orderbook():
exchange = ccxtpro.binance()
while True:
orderbook = await exchange.watch_order_book('BTC/USDT')
best_bid = orderbook['bids'][0][0]
best_ask = orderbook['asks'][0][0]
spread = best_ask - best_bid
print(f"Bid: {best_bid} | Ask: {best_ask} | Spread: {spread:.2f}")
asyncio.run(watch_orderbook())
CCXT Pro exposes a set of watch_ methods: watch_ticker, watch_order_book, watch_trades, watch_ohlcv, watch_orders, watch_my_trades. These maintain a persistent WebSocket connection and return updated data each time the exchange pushes a change. Platforms like Bybit and OKX have excellent WebSocket APIs with sub-100ms latency — CCXT Pro makes those available through the same unified interface you already know from CCXT.
Key Takeaway: CCXT Pro requires a paid license for commercial use. As of 2024, it's available via GitHub sponsorship or direct purchase. For personal projects and research, check the current license terms on the official CCXT repository.
| Feature | CCXT (sync) | CCXT Async | CCXT Pro |
|---|---|---|---|
| REST API calls | Yes | Yes (non-blocking) | Yes (non-blocking) |
| WebSocket streams | No | No | Yes |
| Concurrent requests | No | Yes | Yes |
| Real-time order book | No | No | Yes |
| Real-time trade feed | No | No | Yes |
| License cost | Free (MIT) | Free (MIT) | Paid (commercial) |
| Best for | Simple scripts | Multi-exchange bots | HFT / scalping / MM |
| Exchange support | 100+ | 100+ | 50+ (growing) |
The right choice depends entirely on your strategy's time horizon and data requirements. Here's how to think about it.
Start with standard CCXT if you're running a swing trading bot that checks prices once every few minutes, rebalances a portfolio daily, or just needs to place occasional orders. A bot that buys BTC on Coinbase when a weekly moving average crosses doesn't need millisecond latency. Synchronous code is simpler to debug and reason about — don't add complexity you don't need.
Move to CCXT Async when your bot talks to multiple exchanges simultaneously, needs to monitor several trading pairs at once, or has to coordinate requests without blocking. An arbitrage scanner checking price spreads across Binance, OKX, and Gate.io every second is a natural fit — asyncio.gather runs all three requests in parallel, cutting your cycle time from 300ms to 100ms.
Choose CCXT Pro when your strategy depends on real-time market microstructure — live order book depth, tick-by-tick trade data, or position updates the instant they're filled. Market makers need to update their quotes every time the order book shifts. Scalpers need to know the moment a large order hits the tape. Platforms like Bybit and Binance push this data via WebSocket in near real-time, and CCXT Pro is the cleanest way to consume it in Python.
One pattern worth highlighting is pairing a signal source with CCXT Pro for execution. Services like VoiceOfChain provide real-time trading signals derived from on-chain order flow and exchange activity. When a signal fires, every millisecond of execution latency is a potential slippage cost.
A typical architecture: VoiceOfChain emits a signal (say, a whale accumulation alert on ETH). Your bot receives it via webhook or WebSocket. You use CCXT Pro to immediately watch_order_book on Binance and Bybit to assess current liquidity and spread. If conditions look favorable, you fire the order. Using CCXT Async alone, that order book check would add a round-trip REST call to your latency. With CCXT Pro and a persistent WebSocket connection already open, you're looking at the latest data with no additional network request.
import ccxtpro
import asyncio
async def execute_on_signal(signal):
exchange = ccxtpro.bybit({'apiKey': 'YOUR_KEY', 'secret': 'YOUR_SECRET'})
# Already streaming — no extra REST call needed
ob = await exchange.watch_order_book(signal['symbol'])
best_ask = ob['asks'][0][0]
# Only enter if spread is acceptable
spread_pct = (ob['asks'][0][0] - ob['bids'][0][0]) / ob['bids'][0][0] * 100
if spread_pct < 0.05:
order = await exchange.create_market_buy_order(
signal['symbol'],
signal['amount']
)
print(f"Order placed: {order['id']} at ~{best_ask}")
else:
print(f"Spread too wide ({spread_pct:.3f}%), skipping")
await exchange.close()
This kind of signal-to-execution pipeline is where the CCXT Pro investment pays off. On a busy market on OKX or Binance, the order book can shift meaningfully between a REST poll and your order hitting the matching engine. Having a live WebSocket stream collapses that gap.
The CCXT ecosystem is genuinely well-designed once you understand the layering: sync for simplicity, async for concurrency, Pro for real-time streams. Most traders start at the bottom and work their way up as their strategies demand it. There's no shame in running a CCXT Async bot — for 80% of strategies, the latency advantage of WebSockets doesn't translate into meaningful profit improvement.
Where it does matter — market making on Binance, tight scalping on Bybit, latency-sensitive execution of signals from platforms like VoiceOfChain — CCXT Pro is the right tool. The unified API means you're not learning something new; you're just unlocking the next layer of the same library you already know.
Key Takeaway: Don't pay for CCXT Pro until you've proven your strategy actually needs real-time WebSocket data. Build with CCXT Async first. Upgrade when latency becomes a measurable bottleneck in your results.