Actively developed AlgoGP bridge

CCXT guide

CCXT is the plumbing under most open-source crypto bots, including Freqtrade and OctoBot.

Last reviewed · Also known as ccxt pro, ccxt python

Quick answer

CCXT is an open-source library that gives 100+ cryptocurrency exchanges one unified API in Python, JavaScript/TypeScript, PHP, C# and Go. The same calls (fetch_ohlcv, fetch_balance, create_order) work on Binance, Kraken, OKX, KuCoin, Gate and more, with exchange-specific parameters when you need them. WebSocket streaming (formerly CCXT Pro) is included in the main package.

CCXT at a glance

Category
Broker, exchange & data libraries
Language
Python, JavaScript, TypeScript, PHP, C#, Go
License
MIT
Does
Market data, Order execution
Markets
Crypto
Best for
Any crypto strategy that should not be tied to one exchange’s API.
In AlgoGP
Built-in bridge: add it to any project

Pick it if

Any crypto strategy that should not be tied to one exchange’s API.

Watch out for

Lowest-common-denominator API: advanced order types need exchange-specific params.

CCXT strengths and limitations

Strengths

  • Unified methods and data structures across exchanges.
  • Market metadata: precision, limits and fees per symbol.
  • Sandbox/testnet switching with set_sandbox_mode(True).
  • Built-in rate limiting and WebSocket support.

Limitations

  • Lowest-common-denominator API: advanced order types need exchange-specific params.
  • Each exchange’s quirks still leak through occasionally.

CCXT example

pip install ccxt
Install
import ccxt
exchange = ccxt.kraken({"apiKey": "...", "secret": "..."})
candles = exchange.fetch_ohlcv("BTC/USD", timeframe="1h", limit=100)
print(candles[-1])                 # [timestamp, open, high, low, close, volume]
print(exchange.fetch_balance()["total"])
Candles and a balance from any exchange id.

Use CCXT with AlgoGP

AlgoGP has a built-in CCXT bridge. Describe the strategy to the copilot and backtest it in AlgoGP, then open the project’s APIs & keys tab and add CCXT under Frameworks. The project gains these files, saved as a new version and included in every export:

  • frameworks/algogp_bridge.py
  • frameworks/tests/test_bridge.py
  • frameworks/ccxt_broker.py
  • requirements.txt gains: ccxt
CCXT_EXCHANGE=kucoin python frameworks/ccxt_broker.py
Run the AlgoGP strategy with CCXT.

CCXT connects to Binance, Bybit, OKX, Kraken, Coinbase Advanced Trade, KuCoin, Gate (Gate.io), Bitget, Bitfinex, Gemini, HTX (Huobi), MEXC, BitMEX, Deribit, Hyperliquid, Bitstamp, Crypto.com Exchange, Upbit, Bitvavo, dYdX. Each guide shows how to create the API key, which you can store in the project’s Keys & secrets.

CCXT: frequently asked questions

Is CCXT free?

Yes, MIT-licensed, including WebSocket support.

How many exchanges does CCXT support?

Over 100, with a set of certified exchanges that are tested most thoroughly.

Can AlgoGP trade through CCXT?

Yes: add the CCXT framework to a project and run frameworks/ccxt_broker.py with CCXT_EXCHANGE set.

CCXT alternatives

Independent guide. AlgoGP is not affiliated with CCXT. Features, licenses and maintenance change; check the official documentation. Nothing here is investment advice.

Build a strategy