CCXT

CCXT vs the KuCoin API and the KuCoin Universal SDK

CCXT compared with KuCoin's official SDKs on package count, language coverage, spot-versus-futures handling, WebSockets, rate limits and migration churn.

KuCoin has been replacing its client libraries. The old per-language, per-product repositories — kucoin-python-sdk, kucoin-node-sdk, kucoin-go-sdk, kucoin-futures-python-sdk, kucoin-futures-node-sdk, kucoin-futures-go-sdk — are now archived and read-only on GitHub; the Python one carries the notice "this project is no longer actively maintained or updated" and points readers at the KuCoin Universal SDK, a monorepo generated from KuCoin's OpenAPI specification.

CCXT is the other option: it speaks KuCoin natively behind an API shared with 103 other exchanges, and its kucoin class kept the same method names throughout the migration.

The question that decides between them: is KuCoin the only venue you will ever touch, in one of the languages the Universal SDK considers stable?

TL;DR

  • Pick the KuCoin Universal SDK if KuCoin is your only venue, you work in Python, Go or Node, and you want request builders whose fields map one-for-one onto KuCoin's API reference.
  • Pick CCXT if you want one dependency and one mental model across KuCoin spot, margin and futures — and across Binance, Bybit, OKX and 100 more the day you add a second venue — in any of seven languages.
  • The churn is the argument. KuCoin's SDK layout has changed twice; CCXT absorbed those API changes as version bumps, not as rewrites in your code.

At a glance

CCXTKuCoin Universal SDK
Exchanges covered104 (KuCoin is one of them)KuCoin only
LanguagesTypeScript, JavaScript, Python, PHP, C#/.NET, Go, Java — one APIPython, Go, Node.js; PHP 0.1.3-alpha, Java 0.1.1-alpha
Packages to install1 (ccxt)1 (kucoin-universal-sdk), replacing the archived per-product SDKs
Spot + margin + futures in one clientyes — one ccxt.kucoin instance loads all of themone SDK, but separate spot / futures / broker services and symbol formats
Unified market data + trading APIyes — 112 unified capabilities, 55 fetch* methodsno — KuCoin's own request builders and response models
WebSocketsyes — 22 watch*/unWatch* methods, same shapes as fetch*yes — per-service public/private WS with callbacks and auto-reconnect
Raw endpoint accessyes — 351 KuCoin endpoints as implicit methodsyes, it is the whole product
Built-in rate limiteryes, per-endpoint weights, on by default (rateLimit 7.5 ms)manual
Unified error typesyes — 41 typed exceptions in one hierarchyKuCoin error codes
Testnet / sandboxnot available for KuCoin — CCXT ships no testnet URLs for this venuenot documented in the SDK README
Popularity43.8k GitHub stars · 4.8M PyPI + 494k npm installs/month (one package, every venue)54 GitHub stars · 2.3k PyPI + 9.1k npm installs/month
LicenceMITMIT
SupportDiscord, Telegram, GitHub issues — usually same-dayGitHub issues

Figures verified September 2026 against CCXT v4.5.77, the Kucoin/kucoin-universal-sdk repository and its READMEs, the archived KuCoin SDK repositories, and install counts from npm and PyPI.

The same job, written both ways

Fetch an order book

import ccxt

exchange = ccxt.kucoin()
orderbook = exchange.fetch_order_book('BTC/USDT', 20)
print(orderbook['bids'][0], orderbook['asks'][0])

The SDK returns KuCoin's own response model, reached through a service locator and a request builder. CCXT returns a unified order book structure — the same keys, the same sort order, the same types — whether the venue is KuCoin, Kraken or Hyperliquid.

Place a limit order

import ccxt

exchange = ccxt.kucoin({
    'apiKey': '...', 'secret': '...', 'password': '...',
})
order = exchange.create_order('BTC/USDT', 'limit', 'buy', 0.001, 10000)
print(order['id'], order['status'])
exchange.cancel_order(order['id'], 'BTC/USDT')

Same order, two philosophies. The builder is explicit and typed against KuCoin's schema; create_order is five positional arguments that mean the same thing on every exchange CCXT supports. To place that order on KuCoin Futures instead, the SDK routes you through get_futures_service() with contract symbols like XBTUSDTM; in CCXT you change the symbol to 'BTC/USDT:USDT'.

Stream a ticker

import ccxt.pro
import asyncio

async def main():
    exchange = ccxt.pro.kucoin()
    while True:
        ticker = await exchange.watch_ticker('BTC/USDT')
        print(ticker['symbol'], ticker['last'])

asyncio.run(main())

Both reconnect on their own. The difference is the programming model: the SDK is push-shaped, so you register callbacks and hand control to the client, and futures streams come from a second service (new_futures_public_ws(), ticker_v2("XBTUSDTM", ...)). CCXT is pull-shaped — watch_ticker returns the same structure as fetch_ticker, from the same instance, for spot and futures alike.

Where the differences actually bite

Your integration should not have to follow someone else's migration

Between the archived repositories and the Universal SDK, the KuCoin client landscape has been rearranged twice: per-product SDKs merged into one, request styles replaced with generated builders, and the PHP and Java builds are still published as 0.1.3-alpha and 0.1.1-alpha. Each move is a rewrite for code written against the old shape.

CCXT's kucoin class has kept the same public surface — fetch_ticker, fetch_ohlcv, create_order, fetch_balance — through all of it. When KuCoin changes an endpoint, the change lands inside CCXT and reaches you as a version bump.

Spot, margin and futures from one client

ccxt.kucoin declares spot, margin, swap and future all true, and load_markets() pulls spot, margin and contract markets into one market map. The unified symbol tells CCXT where the order goes:

exchange = ccxt.kucoin({'apiKey': '...', 'secret': '...', 'password': '...'})
exchange.create_order('BTC/USDT', 'limit', 'buy', 0.001, 10000)        # spot
exchange.create_order('BTC/USDT:USDT', 'limit', 'buy', 1, 10000)       # perpetual

CCXT also ships kucoinfutures as a separate exchange id — the same implementation restricted to contract markets, with defaultType set to swap — for people who want a futures-only client.

Seven languages, one API

CCXT is written once in TypeScript and transpiled to JavaScript, Python, PHP, C#/.NET, Go and Java, with identical method names and return structures.

import ccxt from 'ccxt';
const exchange = new ccxt.kucoin ();
const ticker = await exchange.fetchTicker ('BTC/USDT');

The Universal SDK counts Python, Go and Node as its stable targets, with PHP and Java in alpha. If your execution service is C# or Java, that gap is the decision.

Rate limits you do not have to model

KuCoin meters by request weight per resource pool, and the weight differs per endpoint. CCXT encodes those weights in the exchange definition — you can see the per-endpoint costs in the kucoin implicit API — and ships a token-bucket throttler that is on by default (enableRateLimit = true, base rateLimit 7.5 ms). You call methods in a loop; the library paces them.

Precision, rounding and string math

KuCoin rejects orders that violate its tick size, increment or minimum funds. CCXT loads the market metadata and gives you amount_to_precision, price_to_precision and cost_to_precision, backed by the Precise string-arithmetic class so quantities never drift through float rounding.

amount = exchange.amount_to_precision('BTC/USDT', 0.0012345678)
price = exchange.price_to_precision('BTC/USDT', 61234.56789)

One error hierarchy

CCXT maps KuCoin's error codes onto a typed exception treeInsufficientFunds, InvalidOrder, OrderNotFound, RateLimitExceeded, AuthenticationError, NetworkError and 35 more, all descending from BaseError. You write except ccxt.InsufficientFunds once and it keeps working when you add a second exchange, instead of matching on KuCoin's numeric codes.

There is no sandbox for this one

Worth saying plainly: CCXT ships no testnet URLs for KuCoin, so set_sandbox_mode(True) is not available on ccxt.kucoin. Test with small live orders on a low-balance key, or offline against CCXT's static request/response fixtures. If a sandbox matters to you more than anything else on this page, check what KuCoin currently offers before choosing either library.

Nothing is hidden — the implicit API

The usual objection to a unified library is that it must be a lowest common denominator. It is not. Alongside the 112 unified capabilities CCXT implements for KuCoin, all 351 endpoints in KuCoin's API are generated as callable implicit methods — including the broker endpoints:

response = exchange.broker_get_broker_nd_info(params)

Signing, timestamping, rate-limit accounting and error mapping still apply. Browse them all on the kucoin implicit API page.

What the KuCoin Universal SDK does better

An honest list:

  • Generated from the spec, so coverage is exhaustive and fast. The SDK is regenerated from KuCoin's OpenAPI definitions, so a new endpoint appears in all its languages at once, with typed request and response models for every field.
  • Typed builders with enums and IDE autocompletion. AddOrderSyncReqBuilder().set_side(AddOrderSyncReq.SideEnum.BUY) is checked at the KuCoin schema level. CCXT's typing describes unified structures, which is better for portability and less literal about KuCoin's payloads.
  • A first-class Broker service. The Universal SDK models KuCoin's broker API as a typed service alongside spot and futures. CCXT exposes the broker endpoints as implicit methods, but does not model them as unified methods.
  • One-to-one with the KuCoin docs. When you are reading KuCoin's API reference, the SDK's names match it exactly; CCXT's unified names are a deliberate abstraction and one extra hop when debugging against vendor docs.
  • Smaller dependency for a KuCoin-only bot. If you will never add a second venue, one venue's SDK is a smaller install than all of CCXT.

If KuCoin is your only venue, forever, and you work in Python, Go or Node, the Universal SDK is a defensible choice.

If you want CCXT but only this one venue

CCXT publishes a single-exchange Python distribution built from the same source: ccxt/kucoin-python.

pip install kucoin-api

It exposes KucoinSync, KucoinAsync and KucoinWs — the unified methods and the WebSocket support without the other 103 exchanges — under MIT, from the same codebase, so moving to full ccxt later is an import change.

Migrating from a KuCoin SDK to CCXT

What you are doingKuCoin SDKCCXT
Symbols'BTC-USDT' spot, 'XBTUSDTM' futures'BTC/USDT' spot, 'BTC/USDT:USDT' perpetual
Product selectionspot / futures / broker servicethe symbol, or options.defaultType
Symbol listmarket_api.get_all_symbols()load_markets()
Tickerspot market API ticker callfetch_ticker() / fetch_tickers()
Order bookget_part_order_book()fetch_order_book()
Candlesmarket_api.get_klines()fetch_ohlcv()
New orderorder_api.add_order_sync()create_order()
Cancelorder API cancel callcancel_order()
Balanceaccount API callfetch_balance()
Streamsws_service().new_spot_public_ws() + callbackswatch_* on ccxt.pro.kucoin
Anything not listednative methodthe same endpoint as an implicit method

Start with Install, then the Manual, then the kucoin unified API reference.

FAQ

Is the old KuCoin Python SDK deprecated? Kucoin/kucoin-python-sdk is archived and read-only on GitHub, and its README states the project is no longer actively maintained or updated, pointing readers to the KuCoin Universal SDK. The older kucoin-node-sdk, kucoin-go-sdk and the separate futures SDKs are archived too. CCXT is unaffected by that move — the ccxt.kucoin methods are unchanged.

Does CCXT support KuCoin Futures? Yes, two ways. One ccxt.kucoin instance loads spot, margin and contract markets, so 'BTC/USDT:USDT' routes to the futures endpoints. There is also a dedicated ccxt.kucoinfutures exchange id — the same implementation restricted to contracts, defaulting to swap — if you prefer a futures-only client.

Does CCXT support KuCoin's unified trading account? Yes. Pass uta in params (or as an option) on the methods that support it, and CCXT routes to KuCoin's unified-account endpoints instead of the classic ones.

Can I still call KuCoin-specific endpoints through CCXT? Yes — all 351 of them, as implicit methods, with signing, timestamping and rate limiting applied. Choosing CCXT does not lock you out of anything KuCoin publishes.

Do I need CCXT Pro separately for WebSockets? No. CCXT Pro is included in the ccxt package. Use ccxt.pro.kucoin and the watch* methods.

Is CCXT free? Yes. MIT-licensed, including the WebSocket support.

Next steps

On this page