---
title: "Kraken JavaScript & TypeScript SDK for Node.js | Siebly"
description: "Kraken JavaScript SDK by Siebly with TypeScript-first REST and WebSocket clients, Node.js runtime guidance, examples, endpoint references, and release links."
canonical: "https://siebly.io/sdk/kraken/javascript"
---

# Kraken JavaScript SDK

Build with the Kraken REST API and WebSockets using the JavaScript SDK, TypeScript-first declarations, and Node.js-compatible runtime patterns.

Use the same TypeScript-first REST API and WebSocket clients from plain JavaScript or TypeScript in Node.js-compatible runtimes.

## Install

```shell
# Via your favourite package manager, e.g. npm:
npm install @siebly/kraken-api
# or pnpm:
pnpm install @siebly/kraken-api
# or yarn:
yarn add @siebly/kraken-api
```

- [npm: @siebly/kraken-api](https://www.npmjs.com/package/@siebly/kraken-api)
- [GitHub repository](https://github.com/sieblyio/kraken-api)
- [README](https://github.com/sieblyio/kraken-api#readme)
- [Kraken examples](/examples/Kraken)

## Coverage

- Spot
- Futures
- WebSockets
- WebSocket API
- Framework-neutral JavaScript snippets that stay approachable in Node.js-compatible runtimes.
- TypeScript-first package declarations for stricter services, shared libraries, and editor-assisted integrations.

## Integration Profile

**REST API:** Use the Kraken SDK for spot, futures, account, order, balance, and market data workflows that need typed REST methods and signed private requests.

**WebSockets:** Use WebSocket clients for Kraken public market streams, private account/order events, and Spot WebSocket API request/response trading flows in the product areas supported by the SDK.

**Reliability:** Keep API key permissions, nonce/timestamp handling, and futures-vs-spot client boundaries explicit; monitor reconnect and resubscribe behavior in long-running services.

## Quickstart

Get started with just a few lines of JavaScript. TypeScript, while not required, is absolutely recommended. TypeScript declarations are included with all our SDKs and provide convenient definitions on request & response fields, WebSocket payloads, and generally safer integrations.

### REST API

Easily start working with Kraken Derivatives REST APIs in JavaScript.

- Install the Kraken JavaScript SDK via NPM: `npm install @siebly/kraken-api`.
- Import the `DerivativesClient` class for Kraken futures and derivatives REST endpoints. 
  - If spot is preferred, import the `SpotClient`, which is the dedicated utility class wrapped around Kraken's Spot REST APIs.
- Create an authenticated `DerivativesClient` instance with your API credentials.
- Call REST API methods as functions and await their responses.

In this example, we:

- Edit an existing order by updating parameters such as the limit price.
- Cancel a single open order by `order_id`.
- Cancel all open orders on the account.
- Cancel all open orders for a specific symbol such as `PF_ETHUSD`.
- Demonstrate batch order management by combining edit and cancel actions in one request.

This script is designed as a practical order management walkthrough for Kraken Derivatives, showing common authenticated API calls in JavaScript and the shapes of the request payloads involved.

For a full map of available REST API methods, check out the endpoint reference below.

```typescript
/* eslint-disable @typescript-eslint/no-unused-vars */
// This example shows how to call Kraken API endpoint with either node.js,
// javascript (js) or typescript (ts) with the npm module "@siebly/kraken-api" for Kraken exchange
// for ORDER MANAGEMENT

import { DerivativesClient } from '@siebly/kraken-api';

// initialise the client
/**
 *
 * Kraken Futures API uses API Key and API Secret
 *
 * Example:
 * {
 *   apiKey: 'your-api-key',
 *   apiSecret: 'your-api-secret',
 * }
 */
const client = new DerivativesClient({
  apiKey: process.env.API_FUTURES_KEY || 'insertApiKeyHere',
  apiSecret: process.env.API_FUTURES_SECRET || 'insertApiSecretHere',
});
async function editOrder() {
  try {
    // Edit an existing order
    const editResult = await client.editOrder({
      orderId: 'a04d0f84-36d4-4499-8382-96fcfc3ce7aa', // Or use cliOrdId instead
      limitPrice: 1100, // New limit price
      // or add some other parameters you want to edit
    });
    console.log('Edit Order Result: ', JSON.stringify(editResult, null, 2));

    // Response includes:
    // - status: edited, invalidSize, invalidPrice, etc.
    // - orderEvents: Array of order events
  } catch (e) {
    console.error('Edit order error: ', e);
  }
}

async function cancelOrder() {
  try {
    // Cancel a single order
    const cancelResult = await client.cancelOrder({
      order_id: 'a04d0f84-36d4-4499-8382-96fcfc3ce7aa', // Or use cliOrdId
    });
    console.log('Cancel Order Result: ', JSON.stringify(cancelResult, null, 2));

    // Response status:
    // - cancelled: Successfully cancelled
    // - filled: Order was already filled
    // - notFound: Order not found
  } catch (e) {
    console.error('Cancel order error: ', e);
  }
}

async function cancelAllOrders() {
  try {
    // Cancel all open orders
    const cancelAllResult = await client.cancelAllOrders();
    console.log(
      'Cancel All Orders Result: ',
      JSON.stringify(cancelAllResult, null, 2),
    );

    // Response includes:
    // - status: cancelled or noOrdersToCancel
    // - cancelledOrders: Array of cancelled order IDs
  } catch (e) {
    console.error('Cancel all orders error: ', e);
  }
}

async function cancelAllOrdersBySymbol() {
  try {
    // Cancel all orders for specific symbol
    const cancelBySymbol = await client.cancelAllOrders({
      symbol: 'PF_ETHUSD',
    });
    console.log(
      'Cancel Orders by Symbol Result: ',
      JSON.stringify(cancelBySymbol, null, 2),
    );
  } catch (e) {
    console.error('Cancel orders by symbol error: ', e);
  }
}

async function batchOrderManagement() {
  try {
    // Send, edit, and cancel orders in a single batch request
    const batchResult = await client.batchOrderManagement({
      json: {
        batchOrder: [
          // Edit existing order
          {
            order: 'edit',
            order_id: 'a04d1143-757a-4dba-a0a7-687303b9c62d',
            limitPrice: 900,
          },
          // Cancel existing order
          {
            order: 'cancel',
            order_id: 'a04d116e-fb9c-4bcf-9eaf-ea90254439b3',
          },
        ],
      },
    });
    console.log('Batch Order Result: ', JSON.stringify(batchResult, null, 2));

    // Response includes batchStatus array with results for each order
    // - status: placed, edited, cancelled, or rejection reason
    // - order_tag: Maps back to your request
  } catch (e) {
    console.error('Batch order management error: ', e);
  }
}

// Uncomment the function you want to test:

// editOrder();
// cancelOrder();
// cancelAllOrders();
// cancelAllOrdersBySymbol();
// batchOrderManagement();
```

[View the source example](https://github.com/sieblyio/crypto-api-examples/blob/master/examples/Kraken/Derivatives/Private/orderManagement.ts)

### WebSocket Streams

Connecting to Kraken Derivatives private WebSocket streams is straightforward with the `WebsocketClient`.

- Install the Kraken JavaScript SDK via NPM: `npm install @siebly/kraken-api`.
- Import the `WebsocketClient`, `WS_KEY_MAP`, and any typed topic helpers you want to use.
- Create an authenticated client instance with your Kraken futures API credentials.
- Configure event handlers for key lifecycle events such as `open`, `message`, `response`, `reconnecting`, `reconnected`, `close`, `exception`, and `authenticated`.
- Subscribe to private topics on the `derivativesPrivateV1` connection key for private derivatives topics. 
  - Spot is also available via the dedicated spot connection key.

In this example, we:

- Subscribe to private derivatives topics including `open_orders`, `open_orders_verbose`, `fills`, `balances`, `open_positions`, `account_log`, and `notifications_auth`.
- Show both typed topic request objects and simple topic-name subscriptions.
- Rely on the SDK to automatically fetch, cache, and sign the challenge parameters required for private derivatives subscriptions.
- Authentication is completely automatic with the provided API keys.
- If the connection drops or goes stale, the highly resilient WebsocketClient for Kraken will quickly detect any issues, respawn a replacement connection and resubscribe to the topics you were consuming before the drop.

This setup lets you monitor derivatives account activity in real time without polling the REST API for the same information.

```typescript
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import {
  DefaultLogger,
  LogParams,
  WebsocketClient,
  WS_KEY_MAP,
  WSTopicRequest,
} from '@siebly/kraken-api';
import { WSDerivativesTopic } from '@siebly/kraken-api';

const customLogger: DefaultLogger = {
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
  trace: (...params: LogParams): void => {
    // console.log(new Date(), '--> trace', ...params);
  },
  info: (...params: LogParams): void => {
    console.log(new Date(), '--> info', ...params);
  },
  error: (...params: LogParams): void => {
    console.error(new Date(), '--> error', ...params);
  },
};

async function start() {
  const account = {
    key: process.env.API_FUTURES_KEY || 'keyHere',
    secret: process.env.API_FUTURES_SECRET || 'secretHere',
  };

  /**
   * The WebsocketClient is the core class to manage WebSocket subscriptions. Give it the topics you want to subscribe to, and it will handle the rest:
   * - Connection management (connect, disconnect, reconnect)
   * - Authentication for private topics
   * - Subscription management (subscribe, unsubscribe, resubscribe on reconnect)
   * - Message handling (dispatch messages to appropriate handlers)
   *
   * All you need to do is provide the topics you want to subscribe to when calling `subscribe()`, and the client will take care of the rest.
   *
   * Here we create a WebsocketClient instance with API key/secret for private topic subscriptions.
   *
   * In terms of product groups such as Spot, Derivatives, etc., the WebsocketClient understand the product group from the WsKey you provide when subscribing. For example, using `WS_KEY_MAP.spotPrivateV2` indicates that the subscription is for Spot private topics, as shown below.
   *
   * Refer to WS_KEY_MAP in the source code for all available WsKey options.
   */
  const client = new WebsocketClient(
    {
      apiKey: account.key,
      apiSecret: account.secret,
    },
    customLogger,
  );

  client.on('open', (data) => {
    console.log(new Date(), 'connected ', data?.wsKey);
  });

  // Data received
  client.on('message', (data) => {
    console.info(new Date(), 'data received: ', JSON.stringify(data));
  });

  // Something happened, attempting to reconnect
  client.on('reconnecting', (data) => {
    console.log(new Date(), 'reconnect: ', data?.wsKey);
  });

  // Reconnect successful
  client.on('reconnected', (data) => {
    console.log(new Date(), 'reconnected: ', data?.wsKey);
  });

  // Connection closed. If unexpected, expect reconnect -> reconnected.
  client.on('close', (data) => {
    console.error(new Date(), 'close: ', data);
  });

  // Reply to a request, e.g. "subscribe"/"unsubscribe"/"authenticate"
  client.on('response', (data) => {
    console.info(new Date(), 'server reply: ', JSON.stringify(data), '\n');
  });

  client.on('exception', (data) => {
    console.error(new Date(), 'exception: ', data);
  });

  client.on('authenticated', (data) => {
    console.error(new Date(), 'authenticated: ', data);
  });

  /**
   * The below examples demonstrate how you can subscribe to private topics.
   *
   * Note: while the documentation specifies "api_key", "original_challenge" and "signed_challenge" as required parameters, but don't worry about that. The SDK will automatically:
   * - Fetch the challenge using your API key,
   * - Cache the challenge
   * - Include the key, original challenge and signed challenge parameters for you when subscribing to private topics on the derivativesPrivateV1 WebSocket connection.
   *
   * You do NOT need to manually fetch or provide the "original_challenge" and "signed_challenge" tokens when subscribing to private topics.
   *
   * Do note that all of these include the "derivativesPrivateV1" WsKey reference. This tells the WebsocketClient to use the private "wss://futures.kraken.com/ws/v1" endpoint for these private subscription requests. It will also automatically authenticate the connection when it is established.
   */

  try {
    /**
     * All of the following parameters require API keys for Derivatives APIs.
     *
     * Note: your "WsTopicRequest" does not need to include "api_key", "original_challenge" and "signed_challenge". See above for details, or below for examples.
     */

    // Open orders: https://docs.kraken.com/api/docs/futures-api/websocket/open_orders
    const openOrdersTopicRequest: WSTopicRequest<WSDerivativesTopic> = {
      topic: 'open_orders',
    };
    client.subscribe(openOrdersTopicRequest, WS_KEY_MAP.derivativesPrivateV1);

    // Note: if there are no parameters needed, you can also just request the topic by name
    // This is the same as openOrdersTopicRequest, since openOrdersTopicRequest contains no parameters
    // client.subscribe('open_orders', WS_KEY_MAP.derivativesPrivateV1);

    // Open orders (verbose): https://docs.kraken.com/api/docs/futures-api/websocket/open_orders
    client.subscribe('open_orders_verbose', WS_KEY_MAP.derivativesPrivateV1);

    // Fills: https://docs.kraken.com/api/docs/futures-api/websocket/fills
    const accountFillsTopicRequest: WSTopicRequest<WSDerivativesTopic> = {
      topic: 'fills',
      // Optionally, the product_ids field can be used to subscribe only to specific product.
      // payload: {
      //   product_ids: ['PF_XBTUSD'],
      // },
    };
    client.subscribe(accountFillsTopicRequest, WS_KEY_MAP.derivativesPrivateV1);

    // Balances: https://docs.kraken.com/api/docs/futures-api/websocket/balances
    client.subscribe('balances', WS_KEY_MAP.derivativesPrivateV1);

    // Open Position: https://docs.kraken.com/api/docs/futures-api/websocket/open_position
    client.subscribe('open_positions', WS_KEY_MAP.derivativesPrivateV1);

    // Account Log: https://docs.kraken.com/api/docs/futures-api/websocket/account_log
    client.subscribe('account_log', WS_KEY_MAP.derivativesPrivateV1);

    // Notification: https://docs.kraken.com/api/docs/futures-api/websocket/notifications
    client.subscribe('notifications_auth', WS_KEY_MAP.derivativesPrivateV1);
  } catch (e) {
    console.error('Req error: ', e);
  }
}

start();
```

[View the source example](https://github.com/sieblyio/crypto-api-examples/blob/master/examples/Kraken/Derivatives/WebSockets/privateWs.ts)

### WebSocket API

Kraken's Spot WebSocket API (WS-API) lets you send commands & requests over a persistent authenticated WebSocket connection, reducing overhead compared to opening separate REST requests. If you're building a latency sensitive system this is the ideal way to avoid the overhead seen while making REST API calls.

This Kraken JavaScript SDK's `WebsocketAPIClient` wraps these WS-API requests with promise-based helper methods so each command can be awaited similarly to a REST call. All the power & benefits of WebSocket API integration without the complexity of asynchronous messaging over WebSockets.

To use the WebSocket API:

- Install the Kraken JavaScript SDK via NPM: `npm install @siebly/kraken-api`.
- Import the dedicated `WebsocketAPIClient`.
- Create an authenticated `WebsocketAPIClient` instance with your API credentials.
- Optionally inject a custom logger for request and connection diagnostics.
- Call the dedicated helper methods and await each response.

In this example, we:

- Submit spot orders including a basic limit order, a conditional order, and a trigger-based stop-loss order.
- Amend existing spot orders using either `cl_ord_id` or `order_id`.
- Cancel specific orders, cancel all spot orders, and configure a cancel-all-after timeout.
- Batch submit and batch cancel spot orders.

Note that:

- The SDK automatically fetches, caches, and refreshes the private WS token required for authenticated spot WS-API requests.
- The SDK will automatically handle any connection issues. Any midflight commands during a connection drop will see a rejected promise / throw, allowing you to easily handle and resubmit any failed requests as part of your standard error handling.
- Review the walkthrough values and use account-specific order IDs, symbols, sizes, and routing settings before running it against an account.

```typescript
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import {
  DefaultLogger,
  LogParams,
  WebsocketAPIClient,
} from '@siebly/kraken-api';

const customLogger: DefaultLogger = {
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
  trace: (...params: LogParams): void => {
    // console.log('trace', ...params);
  },
  info: (...params: LogParams): void => {
    console.log('info', ...params);
  },
  error: (...params: LogParams): void => {
    console.error('error', ...params);
  },
};

async function start() {
  const account = {
    key: process.env.API_SPOT_KEY || 'keyHere',
    secret: process.env.API_SPOT_SECRET || 'secretHere',
  };

  /**
   * The WebsocketClient is the core class to manage WebSocket subscriptions. Give it the topics you want to subscribe to, and it will handle the rest:
   * - Connection management (connect, disconnect, reconnect)
   * - Authentication for private topics
   * - Subscription management (subscribe, unsubscribe, resubscribe on reconnect)
   * - Message handling (dispatch messages to appropriate handlers)
   *
   * All you need to do is provide the topics you want to subscribe to when calling `subscribe()`, and the client will take care of the rest.
   *
   * Here we create a WebsocketClient instance with API key/secret for private topic subscriptions.
   *
   * In terms of product groups such as Spot, Derivatives, etc., the WebsocketClient understand the product group from the WsKey you provide when subscribing. For example, using `WS_KEY_MAP.spotPrivateV2` indicates that the subscription is for Spot private topics, as shown below.
   *
   * Refer to WS_KEY_MAP in the source code for all available WsKey options.
   */
  const client = new WebsocketAPIClient(
    {
      apiKey: account.key,
      apiSecret: account.secret,
    },
    customLogger,
  );

  /**
   * The below examples demonstrate how you can subscribe to private topics.
   *
   * Note: while the documentation specifies "token" as a required parameter, the SDK will automatically:
   * - fetch the token using your API key/secret,
   * - manage token caching/refreshing,
   * - include the token in the request for you.
   *
   * So you do NOT need to manually fetch or provide the token when subscribing to private topics.
   *
   * Do note that all of these include the "spotPrivateV2" WsKey reference. This tells the WebsocketClient to use the private "wss://ws-auth.kraken.com/v2" endpoint for these private subscription requests.
   */

  try {
    const addOrderResponse = await client.submitSpotOrder({
      order_type: 'limit',
      side: 'buy',
      limit_price: 26500.4,
      order_userref: 100054,
      order_qty: 1.2,
      symbol: 'BTC/USD',
    });
    console.log('addOrderResponse: ', addOrderResponse);

    const addOrderConditionalResponse = await client.submitSpotOrder({
      order_type: 'limit',
      side: 'buy',
      order_qty: 1.2,
      symbol: 'BTC/USD',
      limit_price: 28440,
      conditional: {
        order_type: 'stop-loss-limit',
        trigger_price: 28410,
        limit_price: 28400,
      },
    });
    console.log('addOrderConditionalResponse: ', addOrderConditionalResponse);

    const addOrderTriggersResponse = await client.submitSpotOrder({
      order_type: 'stop-loss',
      side: 'sell',
      order_qty: 100,
      symbol: 'MATIC/USD',
      triggers: {
        reference: 'last',
        price: 10.0,
        price_type: 'pct',
      },
    });
    console.log('addOrderTriggersResponse: ', addOrderTriggersResponse);

    const amendOrderResponse = await client.amendSpotOrder({
      cl_ord_id: '2c6be801-1f53-4f79-a0bb-4ea1c95dfae9',
      limit_price: 10000,
      order_qty: 1.2,
    });
    console.log('amendOrderResponse: ', amendOrderResponse);

    const amendOrderPostOnlyResponse = await client.amendSpotOrder({
      order_id: 'OAIYAU-LGI3M-PFM5VW',
      order_qty: 1.2,
      limit_price: 1100.3,
      deadline: '2025-11-19T09:53:59.050Z',
      post_only: true,
    });
    console.log('amendOrderPostOnlyResponse: ', amendOrderPostOnlyResponse);

    const cancelOrderResponse = await client.cancelSpotOrder({
      order_id: ['OM5CRX-N2HAL-GFGWE9', 'OLUMT4-UTEGU-ZYM7E9'],
    });
    console.log('cancelOrderResponse: ', cancelOrderResponse);

    const cancelAllResponse = await client.cancelAllSpotOrders();
    console.log('cancelAllResponse: ', cancelAllResponse);

    const cancelAllOrdersAfterResponse = await client.cancelAllSpotOrdersAfter({
      timeout: 100,
    });
    console.log('cancelAllOrdersAfterResponse: ', cancelAllOrdersAfterResponse);

    const batchAddResponse = await client.batchSubmitSpotOrders({
      deadline: '2025-11-19T09:53:59.050Z',
      orders: [
        {
          limit_price: 1010.1,
          order_qty: 1.2,
          order_type: 'limit',
          order_userref: 1,
          side: 'buy',
        },
        {
          limit_price: 1100.3,
          order_qty: 1.2,
          order_type: 'limit',
          order_userref: 2,
          side: 'sell',
          stp_type: 'cancel_both',
        },
      ],
      symbol: 'BTC/USD',
      validate: false,
    });
    console.log('batchAddResponse: ', batchAddResponse);

    const batchCancelResponse = await client.batchCancelSpotOrders({
      orders: ['OM5CRX-N2HAL-GFGWE9', 'OLUMT4-UTEGU-ZYM7E9'],
    });
    console.log('batchCancelResponse: ', batchCancelResponse);
  } catch (e) {
    console.error('Req error: ', e);
  }
}

start();
```

[View the source example](https://github.com/sieblyio/crypto-api-examples/blob/master/examples/Kraken/Spot/WebSockets/wsAPI.ts)

## Endpoint Reference

[View the endpoint map source](https://github.com/sieblyio/kraken-api/blob/main/docs/endpointFunctionList.md)

### Endpoint maps

<p align="center">
  <a href="https://www.npmjs.com/package/@siebly/kraken-api">
    <picture>
      <source media="(prefers-color-scheme: dark)" srcset="https://github.com/sieblyio/kraken-api/blob/main/docs/images/logoDarkMode2.svg?raw=true#gh-dark-mode-only">
      <img alt="SDK Logo" src="https://github.com/sieblyio/kraken-api/blob/main/docs/images/logoBrightMode2.svg?raw=true#gh-light-mode-only">
    </picture>
  </a>
</p>

Each REST client is a JavaScript class, which provides functions individually mapped to each endpoint available in the exchange's API offering.

The following table shows all methods available in each REST client, whether the method requires authentication (automatically handled if API keys are provided), as well as the exact endpoint each method is connected to.

This can be used to easily find which method to call, once you have [found which endpoint you're looking to use](https://github.com/tiagosiebler/awesome-crypto-examples/wiki/How-to-find-SDK-functions-that-match-API-docs-endpoint).

All REST clients are in the [src](https://github.com/sieblyio/kraken-api/tree/main/src) folder. For usage examples, make sure to check the [examples](https://github.com/sieblyio/kraken-api/tree/main/examples) folder.

List of clients:

- [SpotClient](#spotclientts)
- [DerivativesClient](#derivativesclientts)
- [InstitutionalClient](#institutionalclientts)
- [PartnerClient](#partnerclientts)
- [WebsocketAPIClient](#websocketapiclientts)

If anything is missing or wrong, please open an issue or let us know in our [Node.js Traders](https://t.me/nodetraders) telegram group!

#### How to use table

Table consists of 4 parts:

- Function name
- AUTH
- HTTP Method
- Endpoint

**Function name** is the name of the function that can be called through the SDK. Check examples folder in the repo for more help on how to use them!

**AUTH** is a boolean value that indicates if the function requires authentication - which means you need to pass your API key and secret to the SDK.

**HTTP Method** shows HTTP method that the function uses to call the endpoint. Sometimes endpoints can have same URL, but different HTTP method so you can use this column to differentiate between them.

**Endpoint** is the URL that the function uses to call the endpoint. Best way to find exact function you need for the endpoint is to search for URL in this table and find corresponding function name.

### SpotClient.ts

This table includes all endpoints from the official Exchange API docs and corresponding SDK functions for each endpoint that are found in [SpotClient.ts](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts).

| Function                                                                                               | AUTH | HTTP Method | Endpoint                          |
| ------------------------------------------------------------------------------------------------------ | :--: | :---------: | --------------------------------- |
| [getSystemStatus()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L148)           |      |     GET     | `0/public/SystemStatus`           |
| [getAssetInfo()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L157)              |      |     GET     | `0/public/Assets`                 |
| [getAssetPairs()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L169)             |      |     GET     | `0/public/AssetPairs`             |
| [getTicker()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L182)                 |      |     GET     | `0/public/Ticker`                 |
| [getCandles()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L196)                |      |     GET     | `0/public/OHLC`                   |
| [getOrderBook()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L208)              |      |     GET     | `0/public/Depth`                  |
| [getGroupedBook()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L219)            |      |     GET     | `0/public/GroupedBook`            |
| [getLevel3OrderBook()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L230)        |  🔐  |     POST    | `0/private/Level3`                |
| [getRecentTrades()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L241)           |      |     GET     | `0/public/Trades`                 |
| [getRecentSpreads()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L252)          |      |     GET     | `0/public/Spread`                 |
| [getAccountBalance()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L269)         |  🔐  |     POST    | `0/private/Balance`               |
| [getApiKeyInfo()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L280)             |  🔐  |     POST    | `0/private/GetApiKeyInfo`         |
| [getExtendedBalance()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L292)        |  🔐  |     POST    | `0/private/BalanceEx`             |
| [getCreditLines()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L303)            |  🔐  |     POST    | `0/private/CreditLines`           |
| [getTradeBalance()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L314)           |  🔐  |     POST    | `0/private/TradeBalance`          |
| [getOpenOrders()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L325)             |  🔐  |     POST    | `0/private/OpenOrders`            |
| [getClosedOrders()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L337)           |  🔐  |     POST    | `0/private/ClosedOrders`          |
| [getOrders()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L348)                 |  🔐  |     POST    | `0/private/QueryOrders`           |
| [getOrderAmends()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L360)            |  🔐  |     POST    | `0/private/OrderAmends`           |
| [getTradesHistory()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L372)          |  🔐  |     POST    | `0/private/TradesHistory`         |
| [getTrades()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L383)                 |  🔐  |     POST    | `0/private/QueryTrades`           |
| [getOpenPositions()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L394)          |  🔐  |     POST    | `0/private/OpenPositions`         |
| [getLedgersInfo()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L405)            |  🔐  |     POST    | `0/private/Ledgers`               |
| [getLedgers()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L416)                |  🔐  |     POST    | `0/private/QueryLedgers`          |
| [getTradingVolume()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L428)          |  🔐  |     POST    | `0/private/TradeVolume`           |
| [requestLedgersExport()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L439)      |  🔐  |     POST    | `0/private/AddExport`             |
| [getLedgersExportStatus()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L450)    |  🔐  |     POST    | `0/private/ExportStatus`          |
| [getLedgersExport()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L461)          |  🔐  |     POST    | `0/private/RetrieveExport`        |
| [deleteLedgersExport()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L470)       |  🔐  |     POST    | `0/private/RemoveExport`          |
| [submitOrder()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L490)               |  🔐  |     POST    | `0/private/AddOrder`              |
| [amendOrder()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L504)                |  🔐  |     POST    | `0/private/AmendOrder`            |
| [cancelOrder()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L519)               |  🔐  |     POST    | `0/private/CancelOrder`           |
| [cancelAllOrders()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L535)           |  🔐  |     POST    | `0/private/CancelAll`             |
| [cancelAllOrdersAfter()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L551)      |  🔐  |     POST    | `0/private/CancelAllOrdersAfter`  |
| [getWebSocketsToken()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L568)        |  🔐  |     POST    | `0/private/GetWebSocketsToken`    |
| [submitBatchOrders()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L580)         |  🔐  |     POST    | `0/private/AddOrderBatch`         |
| [cancelBatchOrders()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L595)         |  🔐  |     POST    | `0/private/CancelOrderBatch`      |
| [getDepositMethods()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L619)         |  🔐  |     POST    | `0/private/DepositMethods`        |
| [getDepositAddresses()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L630)       |  🔐  |     POST    | `0/private/DepositAddresses`      |
| [getDepositsStatus()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L641)         |  🔐  |     POST    | `0/private/DepositStatus`         |
| [getWithdrawalMethods()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L652)      |  🔐  |     POST    | `0/private/WithdrawMethods`       |
| [getWithdrawalAddresses()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L663)    |  🔐  |     POST    | `0/private/WithdrawAddresses`     |
| [getWithdrawalInfo()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L674)         |  🔐  |     POST    | `0/private/WithdrawInfo`          |
| [submitWithdrawal()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L685)          |  🔐  |     POST    | `0/private/Withdraw`              |
| [getWithdrawalsStatus()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L698)      |  🔐  |     POST    | `0/private/WithdrawStatus`        |
| [cancelWithdrawal()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L709)          |  🔐  |     POST    | `0/private/WithdrawCancel`        |
| [submitTransferToFutures()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L722)   |  🔐  |     POST    | `0/private/WalletTransfer`        |
| [createSubaccount()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L742)          |  🔐  |     POST    | `0/private/CreateSubaccount`      |
| [submitSubaccountTransfer()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L755)  |  🔐  |     POST    | `0/private/AccountTransfer`       |
| [allocateEarnFunds()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L773)         |  🔐  |     POST    | `0/private/Earn/Allocate`         |
| [deallocateEarnFunds()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L786)       |  🔐  |     POST    | `0/private/Earn/Deallocate`       |
| [getEarnAllocationStatus()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L798)   |  🔐  |     POST    | `0/private/Earn/AllocateStatus`   |
| [getEarnDeallocationStatus()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L811) |  🔐  |     POST    | `0/private/Earn/DeallocateStatus` |
| [getEarnStrategies()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L827)         |  🔐  |     POST    | `0/private/Earn/Strategies`       |
| [getEarnAllocations()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L842)        |  🔐  |     POST    | `0/private/Earn/Allocations`      |
| [getPreTradeData()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L860)           |      |     GET     | `0/public/PreTrade`               |
| [getPostTradeData()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L872)          |      |     GET     | `0/public/PostTrade`              |
| [getOAuthAccessToken()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L890)       |      |     POST    | `oauth/token`                     |
| [getOAuthUserInfo()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L902)          |  🔐  |     GET     | `oauth/userinfo`                  |
| [createOAuthFastApiKey()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L912)     |  🔐  |     POST    | `oauth/fast-api-key`              |
| [deleteOAuthFastApiKey()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L924)     |  🔐  |    DELETE   | `oauth/fast-api-key`              |
| [updateOAuthFastApiKey()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L938)     |  🔐  |     PUT     | `oauth/fast-api-key`              |
| [listOAuthFastApiKeys()](https://github.com/sieblyio/kraken-api/blob/main/src/SpotClient.ts#L950)      |  🔐  |     GET     | `oauth/fast-api-keys`             |

### DerivativesClient.ts

This table includes all endpoints from the official Exchange API docs and corresponding SDK functions for each endpoint that are found in [DerivativesClient.ts](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts).

| Function                                                                                                            | AUTH | HTTP Method | Endpoint                                                        |
| ------------------------------------------------------------------------------------------------------------------- | :--: | :---------: | --------------------------------------------------------------- |
| [getTradeHistory()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L109)                 |      |     GET     | `derivatives/api/v3/history`                                    |
| [getOrderbook()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L123)                    |      |     GET     | `derivatives/api/v3/orderbook`                                  |
| [getTickers()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L134)                      |      |     GET     | `derivatives/api/v3/tickers`                                    |
| [getTicker()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L145)                       |      |     GET     | `derivatives/api/v3/tickers/{symbol}`                           |
| [getInstruments()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L162)                  |      |     GET     | `derivatives/api/v3/instruments`                                |
| [getInstrumentStatusList()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L173)         |      |     GET     | `derivatives/api/v3/instruments/status`                         |
| [getInstrumentStatus()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L186)             |      |     GET     | `derivatives/api/v3/instruments/{symbol}/status`                |
| [batchOrderManagement()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L204)            |  🔐  |     POST    | `derivatives/api/v3/batchorder`                                 |
| [cancelAllOrders()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L223)                 |  🔐  |     POST    | `derivatives/api/v3/cancelallorders`                            |
| [cancelAllOrdersAfter()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L239)            |  🔐  |     POST    | `derivatives/api/v3/cancelallordersafter`                       |
| [cancelOrder()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L254)                     |  🔐  |     POST    | `derivatives/api/v3/cancelorder`                                |
| [editOrder()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L270)                       |  🔐  |     POST    | `derivatives/api/v3/editorder`                                  |
| [getOpenOrders()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L285)                   |  🔐  |     GET     | `derivatives/api/v3/openorders`                                 |
| [submitOrder()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L296)                     |  🔐  |     POST    | `derivatives/api/v3/sendorder`                                  |
| [getOrderStatus()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L311)                  |  🔐  |     POST    | `derivatives/api/v3/orders/status`                              |
| [getPnlPreferences()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L333)               |  🔐  |     GET     | `derivatives/api/v3/pnlpreferences`                             |
| [setPnlPreference()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L345)                |  🔐  |     PUT     | `derivatives/api/v3/pnlpreferences`                             |
| [getLeverageSettings()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L359)             |  🔐  |     GET     | `derivatives/api/v3/leveragepreferences`                        |
| [setLeverageSettings()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L373)             |  🔐  |     PUT     | `derivatives/api/v3/leveragepreferences`                        |
| [getAccounts()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L395)                     |  🔐  |     GET     | `derivatives/api/v3/accounts`                                   |
| [getOpenPositions()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L407)                |  🔐  |     GET     | `derivatives/api/v3/openpositions`                              |
| [getPositionPercentile()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L418)           |  🔐  |     GET     | `derivatives/api/v3/unwindqueue`                                |
| [getPortfolioMarginParameters()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L431)    |  🔐  |     GET     | `derivatives/api/v3/portfolio-margining/parameters`             |
| [simulateMarginRequirements()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L443)      |  🔐  |     POST    | `derivatives/api/v3/portfolio-margining/simulate`               |
| [getAssignmentPrograms()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L462)           |  🔐  |     GET     | `derivatives/api/v3/assignmentprogram/current`                  |
| [addAssignmentPreference()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L473)         |  🔐  |     POST    | `derivatives/api/v3/assignmentprogram/add`                      |
| [deleteAssignmentPreference()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L486)      |  🔐  |     POST    | `derivatives/api/v3/assignmentprogram/delete`                   |
| [getAssignmentPreferencesHistory()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L499) |  🔐  |     GET     | `derivatives/api/v3/assignmentprogram/history`                  |
| [getFeeSchedules()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L520)                 |      |     GET     | `derivatives/api/v3/feeschedules`                               |
| [getFeeScheduleVolumes()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L533)           |  🔐  |     GET     | `derivatives/api/v3/feeschedules/volumes`                       |
| [getNotifications()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L552)                |  🔐  |     GET     | `derivatives/api/v3/notifications`                              |
| [getFills()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L569)                        |  🔐  |     GET     | `derivatives/api/v3/fills`                                      |
| [getHistoricalFundingRates()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L586)       |      |     GET     | `derivatives/api/v3/historical-funding-rates`                   |
| [getSelfTradeStrategy()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L605)            |  🔐  |     GET     | `derivatives/api/v3/self-trade-strategy`                        |
| [updateSelfTradeStrategy()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L618)         |  🔐  |     PUT     | `derivatives/api/v3/self-trade-strategy`                        |
| [getSubaccountTradingStatus()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L641)      |  🔐  |     GET     | `derivatives/api/v3/subaccount/{subaccountUid}/trading-enabled` |
| [updateSubaccountTradingStatus()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L654)   |  🔐  |     PUT     | `derivatives/api/v3/subaccount/{subaccountUid}/trading-enabled` |
| [getSubaccounts()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L670)                  |  🔐  |     GET     | `derivatives/api/v3/subaccounts`                                |
| [submitWalletTransfer()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L687)            |  🔐  |     POST    | `derivatives/api/v3/transfer`                                   |
| [submitSubaccountTransfer()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L700)        |  🔐  |     POST    | `derivatives/api/v3/transfer/subaccount`                        |
| [submitTransferToSpot()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L714)            |  🔐  |     POST    | `derivatives/api/v3/withdrawal`                                 |
| [getOpenRFQs()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L734)                     |      |     GET     | `derivatives/api/v3/rfqs`                                       |
| [getOpenRFQ()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L746)                      |      |     GET     | `derivatives/api/v3/rfqs/{rfqUid}`                              |
| [getRFQOpenOffers()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L758)                |  🔐  |     GET     | `derivatives/api/v3/rfqs/open-offers`                           |
| [submitRFQNewOffer()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L770)               |  🔐  |     POST    | `derivatives/api/v3/rfqs/{rfqUid}/place-offer`                  |
| [updateRFQOpenOffer()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L787)              |  🔐  |     PUT     | `derivatives/api/v3/rfqs/{rfqUid}/replace-offer`                |
| [cancelRFQOffer()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L804)                  |  🔐  |    DELETE   | `derivatives/api/v3/rfqs/{rfqUid}/cancel-offer`                 |
| [getExecutionEvents()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L823)              |  🔐  |     GET     | `api/history/v3/executions`                                     |
| [getOrderEvents()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L838)                  |  🔐  |     GET     | `api/history/v3/orders`                                         |
| [getTriggerEvents()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L853)                |  🔐  |     GET     | `api/history/v3/triggers`                                       |
| [getPositionEvents()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L868)               |  🔐  |     GET     | `api/history/v3/positions`                                      |
| [getAccountLog()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L884)                   |  🔐  |     GET     | `api/history/v3/account-log`                                    |
| [getAccountLogCsv()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L895)                |  🔐  |     GET     | `api/history/v3/accountlogcsv`                                  |
| [getPublicExecutionEvents()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L910)        |      |     GET     | `api/history/v3/market/{tradeable}/executions`                  |
| [getPublicOrderEvents()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L924)            |      |     GET     | `api/history/v3/market/{tradeable}/orders`                      |
| [getPublicMarkPriceEvents()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L938)        |      |     GET     | `api/history/v3/market/{tradeable}/price`                       |
| [getTickTypes()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L958)                    |      |     GET     | `api/charts/v1/`                                                |
| [getMarketsForTickType()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L968)           |      |     GET     | `api/charts/v1/{tickType}`                                      |
| [getResolutions()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L981)                  |      |     GET     | `api/charts/v1/{tickType}/{symbol}`                             |
| [getCandles()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L996)                      |      |     GET     | `api/charts/v1/{tickType}/{symbol}/{resolution}`                |
| [getLiquidityPoolStatistic()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L1014)      |      |     GET     | `api/charts/v1/analytics/liquidity-pool`                        |
| [getMarketAnalytics()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L1025)             |      |     GET     | `api/charts/v1/analytics/{symbol}/{analyticsType}`              |
| [checkApiKeyV3()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L1045)                  |  🔐  |     GET     | `api/auth/v1/api-keys/v3/check`                                 |
| [getAccountMarketShare()](https://github.com/sieblyio/kraken-api/blob/main/src/DerivativesClient.ts#L1061)          |  🔐  |     GET     | `api/stats/v1/rebates/self-market-share`                        |

### InstitutionalClient.ts

This table includes all endpoints from the official Exchange API docs and corresponding SDK functions for each endpoint that are found in [InstitutionalClient.ts](https://github.com/sieblyio/kraken-api/blob/main/src/InstitutionalClient.ts).

| Function                                                                                                          | AUTH | HTTP Method | Endpoint                            |
| ----------------------------------------------------------------------------------------------------------------- | :--: | :---------: | ----------------------------------- |
| [listCustodyVaults()](https://github.com/sieblyio/kraken-api/blob/main/src/InstitutionalClient.ts#L73)            |  🔐  |     POST    | `0/private/ListCustodyVaults`       |
| [getCustodyVaultbyId()](https://github.com/sieblyio/kraken-api/blob/main/src/InstitutionalClient.ts#L86)          |  🔐  |     POST    | `0/private/GetCustodyVault`         |
| [getCustodyDepositMethods()](https://github.com/sieblyio/kraken-api/blob/main/src/InstitutionalClient.ts#L103)    |  🔐  |     POST    | `0/private/DepositMethods`          |
| [getCustodyDepositAddresses()](https://github.com/sieblyio/kraken-api/blob/main/src/InstitutionalClient.ts#L119)  |  🔐  |     POST    | `0/private/DepositAddresses`        |
| [listCustodyTransactions()](https://github.com/sieblyio/kraken-api/blob/main/src/InstitutionalClient.ts#L134)     |  🔐  |     POST    | `0/private/ListCustodyTransactions` |
| [getCustodyTransactionbyId()](https://github.com/sieblyio/kraken-api/blob/main/src/InstitutionalClient.ts#L149)   |  🔐  |     POST    | `0/private/GetCustodyTransaction`   |
| [getCustodyWithdrawMethods()](https://github.com/sieblyio/kraken-api/blob/main/src/InstitutionalClient.ts#L170)   |  🔐  |     POST    | `0/private/WithdrawMethods`         |
| [getCustodyWithdrawAddresses()](https://github.com/sieblyio/kraken-api/blob/main/src/InstitutionalClient.ts#L185) |  🔐  |     POST    | `0/private/WithdrawAddresses`       |
| [listCustodyTasks()](https://github.com/sieblyio/kraken-api/blob/main/src/InstitutionalClient.ts#L211)            |  🔐  |     POST    | `0/private/ListCustodyTasks`        |
| [getCustodyTaskbyId()](https://github.com/sieblyio/kraken-api/blob/main/src/InstitutionalClient.ts#L224)          |  🔐  |     POST    | `0/private/GetCustodyTask`          |
| [listCustodyActivities()](https://github.com/sieblyio/kraken-api/blob/main/src/InstitutionalClient.ts#L240)       |  🔐  |     POST    | `0/private/ListCustodyActivities`   |
| [getCustodyActivitybyId()](https://github.com/sieblyio/kraken-api/blob/main/src/InstitutionalClient.ts#L253)      |  🔐  |     POST    | `0/private/GetCustodyActivity`      |
| [createOtcQuoteRequest()](https://github.com/sieblyio/kraken-api/blob/main/src/InstitutionalClient.ts#L276)       |  🔐  |     POST    | `0/private/CreateOtcQuoteRequest`   |
| [updateOtcQuote()](https://github.com/sieblyio/kraken-api/blob/main/src/InstitutionalClient.ts#L290)              |  🔐  |     POST    | `0/private/UpdateOtcQuote`          |
| [getOtcPairs()](https://github.com/sieblyio/kraken-api/blob/main/src/InstitutionalClient.ts#L304)                 |  🔐  |     POST    | `0/private/GetOtcPairs`             |
| [getOtcActiveQuotes()](https://github.com/sieblyio/kraken-api/blob/main/src/InstitutionalClient.ts#L316)          |  🔐  |     POST    | `0/private/GetOtcActiveQuotes`      |
| [getOtcHistoricalQuotes()](https://github.com/sieblyio/kraken-api/blob/main/src/InstitutionalClient.ts#L331)      |  🔐  |     POST    | `0/private/GetOtcHistoricalQuotes`  |
| [getOtcExposures()](https://github.com/sieblyio/kraken-api/blob/main/src/InstitutionalClient.ts#L345)             |  🔐  |     POST    | `0/private/GetOtcExposures`         |
| [checkOtcClient()](https://github.com/sieblyio/kraken-api/blob/main/src/InstitutionalClient.ts#L359)              |  🔐  |     POST    | `0/private/CheckOtcClient`          |

### PartnerClient.ts

This table includes all endpoints from the official Exchange API docs and corresponding SDK functions for each endpoint that are found in [PartnerClient.ts](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts).

| Function                                                                                                       | AUTH | HTTP Method | Endpoint                            |
| -------------------------------------------------------------------------------------------------------------- | :--: | :---------: | ----------------------------------- |
| [createEmbedUser()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L94)                 |  🔐  |     POST    | `b2b/users`                         |
| [getEmbedUser()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L107)                   |  🔐  |     GET     | `b2b/users/{user}`                  |
| [updateEmbedUser()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L116)                |  🔐  |    PATCH    | `b2b/users/{user}`                  |
| [submitEmbedVerification()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L138)        |  🔐  |     POST    | `b2b/verifications/{user}`          |
| [listEmbedAssets()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L159)                |  🔐  |     GET     | `b2b/assets`                        |
| [getEmbedAsset()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L170)                  |  🔐  |     GET     | `b2b/assets/{asset}`                |
| [listEmbedAssetRates()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L183)            |  🔐  |     GET     | `b2b/assets/{asset}/rates`          |
| [requestEmbedQuote()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L201)              |  🔐  |     POST    | `b2b/quotes`                        |
| [getEmbedQuote()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L216)                  |  🔐  |     GET     | `b2b/quotes/{quote_id}`             |
| [executeEmbedQuote()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L228)              |  🔐  |     PUT     | `b2b/quotes/{quote_id}`             |
| [getEmbedQuoteLimits()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L242)            |  🔐  |     GET     | `b2b/quotes/limits`                 |
| [requestEmbedProspectiveQuote()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L253)   |  🔐  |     POST    | `b2b/quotes/prospective`            |
| [createEmbedCustomOrder()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L274)         |  🔐  |     POST    | `b2b/custom-orders`                 |
| [listEmbedCustomOrders()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L289)          |  🔐  |     GET     | `b2b/custom-orders`                 |
| [getEmbedCustomOrder()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L300)            |  🔐  |     GET     | `b2b/custom-orders/{order_id}`      |
| [cancelEmbedCustomOrder()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L312)         |  🔐  |     POST    | `b2b/custom-orders/{id}/cancel`     |
| [getEmbedPortfolioSummary()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L332)       |  🔐  |     GET     | `b2b/portfolio/{user}/summary`      |
| [getEmbedPortfolioHistory()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L345)       |  🔐  |     GET     | `b2b/portfolio/{user}/history`      |
| [listEmbedPortfolioDetails()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L357)      |  🔐  |     GET     | `b2b/portfolio/{user}/details`      |
| [listEmbedPortfolioTransactions()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L369) |  🔐  |     GET     | `b2b/portfolio/{user}/transactions` |
| [getEmbedEarnSummary()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L388)            |  🔐  |     GET     | `b2b/earn/{user}`                   |
| [listEmbedEarnAssets()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L401)            |  🔐  |     GET     | `b2b/earn/assets`                   |
| [toggleEmbedAutoEarn()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L414)            |  🔐  |     PUT     | `b2b/earn/{user}/auto`              |
| [withdrawEmbedFunds()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L435)             |  🔐  |     POST    | `b2b/funds/withdrawals`             |
| [listEmbedFundingTransactions()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L450)   |  🔐  |     GET     | `b2b/funds/transactions`            |
| [listEmbedSettlementReports()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L468)     |  🔐  |     GET     | `b2b/reports/settlement`            |
| [getEmbedSettlementReport()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L479)       |  🔐  |     GET     | `b2b/reports/settlement/{id}`       |
| [listRampBuyCryptoAssets()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L497)        |  🔐  |     GET     | `b2b/ramp/buy/crypto`               |
| [listRampFiatCurrencies()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L506)         |  🔐  |     GET     | `b2b/ramp/fiat-currencies`          |
| [listRampPaymentMethods()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L516)         |  🔐  |     GET     | `b2b/ramp/payment-methods`          |
| [listRampCountries()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L526)              |  🔐  |     GET     | `b2b/ramp/countries`                |
| [getRampLimits()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L541)                  |  🔐  |     GET     | `b2b/ramp/limits`                   |
| [getRampProspectiveQuote()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L553)        |  🔐  |     GET     | `b2b/ramp/quotes/prospective`       |
| [getRampCheckoutUrl()](https://github.com/sieblyio/kraken-api/blob/main/src/PartnerClient.ts#L571)             |  🔐  |     GET     | `b2b/ramp/checkout`                 |

### WebsocketAPIClient.ts

This table includes all endpoints from the official Exchange API docs and corresponding SDK functions for each endpoint that are found in [WebsocketAPIClient.ts](https://github.com/sieblyio/kraken-api/blob/main/src/WebsocketAPIClient.ts).

This client provides WebSocket API endpoints which allow for faster interactions with the Kraken API via a WebSocket connection.

| Function                                                                                                      | AUTH | HTTP Method | Endpoint                  |
| ------------------------------------------------------------------------------------------------------------- | :--: | :---------: | ------------------------- |
| [submitSpotOrder()](https://github.com/sieblyio/kraken-api/blob/main/src/WebsocketAPIClient.ts#L85)           |  🔐  |      WS     | `add_order`               |
| [amendSpotOrder()](https://github.com/sieblyio/kraken-api/blob/main/src/WebsocketAPIClient.ts#L99)            |  🔐  |      WS     | `amend_order`             |
| [cancelSpotOrder()](https://github.com/sieblyio/kraken-api/blob/main/src/WebsocketAPIClient.ts#L113)          |  🔐  |      WS     | `cancel_order`            |
| [cancelAllSpotOrders()](https://github.com/sieblyio/kraken-api/blob/main/src/WebsocketAPIClient.ts#L127)      |  🔐  |      WS     | `cancel_all`              |
| [cancelAllSpotOrdersAfter()](https://github.com/sieblyio/kraken-api/blob/main/src/WebsocketAPIClient.ts#L139) |  🔐  |      WS     | `cancel_all_orders_after` |
| [batchSubmitSpotOrders()](https://github.com/sieblyio/kraken-api/blob/main/src/WebsocketAPIClient.ts#L158)    |  🔐  |      WS     | `batch_add`               |
| [batchCancelSpotOrders()](https://github.com/sieblyio/kraken-api/blob/main/src/WebsocketAPIClient.ts#L172)    |  🔐  |      WS     | `batch_cancel`            |
| [editSpotOrder()](https://github.com/sieblyio/kraken-api/blob/main/src/WebsocketAPIClient.ts#L189)            |  🔐  |      WS     | `edit_order`              |

## Kraken JavaScript FAQ

### What does the Kraken JavaScript SDK cover?

Kraken supports Spot, Futures, WebSockets, and WebSocket API workflows. The JavaScript guide covers the main REST and WebSocket integration patterns.

### How do I authenticate private Kraken API calls in JavaScript?

Install @siebly/kraken-api from npm & pass API credentials into the SDK client options, as shown in the Kraken JavaScript examples above. The SDK handles the exchange-specific signing requirements for private requests.

### Does the Kraken JavaScript SDK help with WebSocket connection management?

Yes. Use the SDK WebSocket client for subscriptions, reconnect handling, and stream lifecycle management instead of building raw socket flows yourself.

### When should I use the Kraken WebSocket API instead of REST?

Use REST for standard request and response workflows such as account queries and order management. Use the WebSocket API flow when you want persistent low-latency interactions over a connected session.

## Machine Resources

- [AI prompt framework](/ai)
- [LLM discovery](/llms.txt)
- [SDK catalog](/.well-known/siebly-sdk-catalog.json)
- [Agent skill](/.well-known/agent-skills/siebly-crypto-exchange-api/SKILL.md)
