Skip to main content
Skip to main content

KuCoin Data Connector

Want Bitcoin, Ethereum, or altcoin USDT spot charts with live prices and no API key? The KuCoin connector talks to KuCoin public Spot endpoints — history over REST, candle updates over Classic WebSocket.

Loading chart…

Use the controls above to change symbol and timeframe. This is the same integration you will copy into your app.

Standalone demo

Full-page version with sample code: KuCoin live demo.

What you get

FeatureDetails
No API keyPublic KuCoin Spot market data
HistoryUp to 1500 candles per REST request
Live ticksWebSocket /market/candles with token bootstrap
PairsUSDT spot symbols (BTC-USDT, ETH-USDT, …)
Symbol helperAccepts BTCUSDT and normalizes to BTC-USDT
Timeframes1m through weekly (no native 1M)

Perfect for crypto dashboards, USDT-denominated terminals, and KuCoin-native trading apps. For Node.js multi-exchange backends, see CCXT.

Install

npm install @efixdata/exeria-chart @efixdata/connector-kucoin

Minimal example

import { createChart } from "@efixdata/exeria-chart";
import { KucoinAdapter } from "@efixdata/connector-kucoin";

const connector = new KucoinAdapter({ pageDelayMs: 300 });

const chart = createChart({
container,
dataAdapter: connector,
});

chart.init();

await chart.loadData("BTC-USDT", {
interval: "1d",
limit: 500,
});

chart.subscribeToUpdates("BTC-USDT", (tick) => {
console.log("Last price:", tick.price ?? tick.c);
});

Step by step

1 — Create the connector

const connector = new KucoinAdapter({ pageDelayMs: 300 });

Uses KuCoin public URLs by default. Optional tuning below.

2 — Attach to the chart

const chart = createChart({ container, dataAdapter: connector });
chart.init();

The chart delegates loadData and subscribeToUpdates to the connector.

3 — Load history

await chart.loadData("BTC-USDT", {
interval: "1h",
limit: 500,
});
OptionMeaning
intervalCandle size — "1m", "1h", "1d", "1w"
limitHow many recent bars (up to 1500 per REST page)
from / toOptional date range filter after fetch

4 — Go live

chart.subscribeToUpdates("BTC-USDT");
// or with a callback:
chart.subscribeToUpdates("BTC-USDT", (tick) => { /* update UI */ });

The adapter fetches a public WebSocket token from /api/v1/bullet-public, then subscribes to /market/candles:BTC-USDT_1hour.

5 — Clean up

chart.unsubscribeFromUpdates();
await connector.disconnect();
SymbolMarket
BTC-USDTBitcoin / USDT
ETH-USDTEthereum / USDT
SOL-USDTSolana / USDT
ADA-USDTCardano / USDT
XRP-USDTXRP / USDT

KuCoin uses hyphen-separated pairs (BTC-USDT). The adapter maps compact forms like BTCUSDT automatically.

KuCoin symbols vs other exchanges

Binance / BybitOKXKuCoin
BTCUSDTBTC-USDTBTC-USDT
USDT quoteUSDT quoteUSDT quote
REST + WSREST + WSREST + WS (token bootstrap)

Switch pair

async function switchSymbol(newSymbol: string) {
chart.unsubscribeFromUpdates();

await chart.loadData(newSymbol, {
interval: "1d",
limit: 500,
});

chart.subscribeToUpdates(newSymbol);
}

Always unsubscribe before loading a new symbol on the same chart instance.

Custom configuration (optional)

const connector = new KucoinAdapter({
baseUrl: "https://api.kucoin.com",
requestTimeout: 10000,
maxRetries: 5,
retryDelay: 2000,
pageDelayMs: 300,
pollingIntervalMs: 30000,
});

Error handling

try {
await chart.loadData("BTC-USDT", { interval: "1d", limit: 500 });
} catch (error) {
if (error instanceof Error && error.message.includes("Invalid symbol")) {
console.error("Symbol not found on KuCoin");
} else {
console.error("Load failed:", error);
}
}

Show a retry button or message in your UI — users on bad networks will thank you.

Limits to know

TopicLimit
Candles per REST request1500 max
OHLC field orderKuCoin returns [time, open, close, high, low, …] — adapter maps to standard OHLC
WebSocket bootstrapRequires POST /api/v1/bullet-public before connect
5m liveNo WS kline channel — adapter polls ticker REST instead
1MNot supported natively

For heavy traffic: cache history server-side and keep pageDelayMs at 300 or higher.

KuCoin vs CCXT

Dedicated KuCoin connectorCCXT connector
RuntimeBrowser + Node.jsNode.js only
SymbolBTC-USDTexchangeId: "kucoin"
LiveWebSocket klinesPolling via CCXT

Need KuCoin in the browser? Use this connector. Need 100+ exchanges on your backend? Use CCXT.

What is next?