Kraken API SDK
@siebly/kraken-api provides JavaScript and TypeScript clients for Kraken Spot and Futures REST APIs and WebSockets. Read market data, query accounts and manage orders with typed requests and responses.
Start with a public price request, then add account access and streaming updates to your application. The SDK manages request signing, WebSocket connections and resubscriptions.
JavaScript & TypeScript · v1.1.10 · MIT license
Installation
TypeScript definitions are included.
Install the npm package with your preferred tool:
npm install @siebly/kraken-apipnpm add @siebly/kraken-apiyarn add @siebly/kraken-apibun add @siebly/kraken-apideno add npm:@siebly/kraken-apiPackage: @siebly/kraken-api
npm: https://www.npmjs.com/package/@siebly/kraken-apiFor 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.
| Setup | Guides |
|---|---|
| Node.js | JavaScript or TypeScript |
| Alternative runtimes | Bun or Deno |
| Browser apps | React with Vite or Vite with plain JavaScript |
| Next.js | Node.js server Route Handler |
| Cloudflare Workers | Public prices and authenticated orders |
| Mobile apps | React Native / Expo for iOS and Android |
Browser and Expo guides include SDK-specific bundler configuration and polyfills where needed. See Runtime compatibility for tested versions, required configuration and what the checks cover.
Use the scoped package @siebly/kraken-api. The unscoped kraken-api package is a different library.
First request
The Node.js quickstart reads a public Bitcoin price with plain JavaScript. No API credentials are needed.
Choose a client
| Client | Purpose |
|---|---|
SpotClient | Spot market data, balances, orders and account operations over REST. |
DerivativesClient | Futures market data, account queries and trading over REST. |
WebsocketClient | Public and private Spot and Futures subscriptions. |
WebsocketAPIClient | Awaitable Spot WebSocket API requests. |