Skip to content

KuCoin API SDK ​

kucoin-api provides JavaScript and TypeScript clients for KuCoin Spot, margin, futures, broker and Unified Trading Account APIs. Read market data, follow account changes and manage orders through typed REST and WebSocket methods.

JavaScript & TypeScript · v2.6.9 · MIT license

Installation ​

TypeScript definitions are included.

Install the npm package with your preferred tool:

sh
npm install kucoin-api
sh
pnpm add kucoin-api
sh
yarn add kucoin-api
sh
bun add kucoin-api
sh
deno add npm:kucoin-api
text
Package: kucoin-api
npm: https://www.npmjs.com/package/kucoin-api

For other npm-compatible tools, use the same package from npm. Runtime-specific setup is covered below.

Choose your setup ​

Follow the guide for your runtime or framework. Each includes a complete project with commands to install dependencies and run it.

SetupGuides
Node.jsJavaScript or TypeScript
Alternative runtimesBun or Deno
Browser appsReact with Vite or Vite with plain JavaScript
Next.jsNode.js server Route Handler
Cloudflare WorkersPublic prices and authenticated orders
Mobile appsReact Native / Expo for iOS and Android

Browser and Expo guides include SDK-specific bundler configuration and polyfills where needed. See Runtime setup for project recipes and required configuration.

First request ​

Follow the Node.js quickstart to read a public Bitcoin price without credentials. Clients use live services. Read Testing environments before trying order examples.

Choose a client ​

  • SpotClient: Classic Spot and margin market data, account reads and trading.
  • FuturesClient: Classic futures market data, positions and orders.
  • BrokerClient: broker and sub-account operations.
  • UnifiedAPIClient: Unified Trading Account market data, balances, positions and trading.
  • WebsocketClient: public and private subscriptions, connection events and low-level WebSocket API requests.
  • WebsocketAPIClient: promise-based Spot, margin, futures and supported UTA order commands over WebSockets.

Next steps ​

Built by Siebly. Open source SDKs for exchange APIs.