Skip to content

Class: SpotClient ​

REST client for Kraken Spot market data, trading and account operations.

Extends ​

  • BaseRestClient

Constructors ​

Constructor ​

ts
new SpotClient(restClientOptions?: RestClientOptions, networkOptions?: AxiosRequestConfig): SpotClient;

Create an instance of the REST client. Pass API credentials in the object in the first parameter.

Parameters ​

ParameterTypeDescription
restClientOptions?RestClientOptionsoptions to configure REST API connectivity
networkOptions?AxiosRequestConfigHTTP networking options for axios

Returns ​

SpotClient

Inherited from ​

BaseRestClient.constructor

Methods ​

allocateEarnFunds() ​

ts
allocateEarnFunds(params: object): Promise<SpotAPISuccessResponse<boolean>>;

Allocate funds to an Earn strategy. The operation is asynchronous; poll getEarnAllocationStatus() with the same strategy_id to check completion.

Parameters ​

ParameterType
params{ amount: string; strategy_id: string; }
params.amountstring
params.strategy_idstring

Returns ​

Promise<SpotAPISuccessResponse<boolean>>


amendOrder() ​

ts
amendOrder(params: SpotAmendOrderParams): Promise<SpotAPISuccessResponse<{
  amend_id: string;
}>>;

Amend Order

Amend an existing order. The order identifiers assigned by Kraken and/or client will stay the same. Queue priority in the order book will be maintained where possible.

Parameters ​

ParameterType
paramsSpotAmendOrderParams

Returns ​

Promise<SpotAPISuccessResponse<{ amend_id: string; }>>


cancelAllOrders() ​

ts
cancelAllOrders(): Promise<SpotAPISuccessResponse<{
  count: number;
  pending: boolean;
}>>;

Cancel All Orders

Cancel all open orders.

Returns ​

Promise<SpotAPISuccessResponse<{ count: number; pending: boolean; }>>


cancelAllOrdersAfter() ​

ts
cancelAllOrdersAfter(params: object): Promise<SpotAPISuccessResponse<{
  currentTime: string;
  triggerTime: string;
}>>;

Cancel All Orders After X

CancelAllOrdersAfter provides a "Dead Man's Switch" mechanism to protect the client from network malfunction, extreme latency or unexpected matching engine downtime. The client can send a request with a timeout (in seconds), that will start a countdown timer which will cancel all client orders when the timer expires.

Parameters ​

ParameterType
params{ timeout: number; }
params.timeoutnumber

Returns ​

Promise<SpotAPISuccessResponse<{ currentTime: string; triggerTime: string; }>>


cancelBatchOrders() ​

ts
cancelBatchOrders(params: object): Promise<SpotAPISuccessResponse<{
  count: number;
}>>;

Cancel Order Batch

Cancel multiple open orders by txid, userref or cl_ord_id (maximum 50 total unique IDs/references).

Parameters ​

ParameterType
params{ cl_ord_ids?: string[]; orders?: (string | number)[]; }
params.cl_ord_ids?string[]
params.orders?(string | number)[]

Returns ​

Promise<SpotAPISuccessResponse<{ count: number; }>>


cancelOrder() ​

ts
cancelOrder(params: object): Promise<SpotAPISuccessResponse<{
  count: number;
  pending?: boolean;
}>>;

Cancel Order

Cancel a particular open order (or set of open orders) by txid, userref or cl_ord_id.

Parameters ​

ParameterType
params{ cl_ord_id?: string; txid?: string | number; }
params.cl_ord_id?string
params.txid?string | number

Returns ​

Promise<SpotAPISuccessResponse<{ count: number; pending?: boolean; }>>


cancelStrategy() ​

ts
cancelStrategy(params: object): Promise<SpotAPISuccessResponse<{
  strategy_id: string;
}>>;

Cancel Strategy

Cancel a pending or open strategy. Use queryStrategies() for the final status and fills.

Parameters ​

ParameterType
params{ strategy_id: string; }
params.strategy_idstring

Returns ​

Promise<SpotAPISuccessResponse<{ strategy_id: string; }>>


cancelWithdrawal() ​

ts
cancelWithdrawal(params: object): Promise<SpotAPISuccessResponse<boolean>>;

Request Withdrawal Cancellation

Cancel a recently requested withdrawal, if it has not already been successfully processed.

Parameters ​

ParameterType
params{ asset: string; refid: string; }
params.assetstring
params.refidstring

Returns ​

Promise<SpotAPISuccessResponse<boolean>>


createOAuthFastApiKey() ​

ts
createOAuthFastApiKey(params: OauthCreateFastApiKeyParams): Promise<OauthCreateFastApiKeyResponse>;

Create a Fast API key. The archived OAuth contract requires an OAuth2 Bearer token with the account.fast-api-key:write scope.

Parameters ​

ParameterType
paramsOauthCreateFastApiKeyParams

Returns ​

Promise<OauthCreateFastApiKeyResponse>


createSubaccount() ​

ts
createSubaccount(params: object): Promise<SpotAPISuccessResponse<boolean>>;

Create Subaccount

Create a trading subaccount. Note: CreateSubaccount must be called using an API key from the master account.

Parameters ​

ParameterType
params{ email: string; username: string; }
params.emailstring
params.usernamestring

Returns ​

Promise<SpotAPISuccessResponse<boolean>>


deallocateEarnFunds() ​

ts
deallocateEarnFunds(params: object): Promise<SpotAPISuccessResponse<boolean>>;

Deallocate funds from an Earn strategy. The operation is asynchronous; poll getEarnDeallocationStatus() with the same strategy_id to check completion.

Parameters ​

ParameterType
params{ amount: string; strategy_id: string; }
params.amountstring
params.strategy_idstring

Returns ​

Promise<SpotAPISuccessResponse<boolean>>


deleteLedgersExport() ​

ts
deleteLedgersExport(params: object): Promise<SpotAPISuccessResponse<SpotDeleteExportReportResponse>>;

Delete Export Report

Delete or cancel exported trades/ledgers report.

Parameters ​

ParameterType
params{ id: string; type: "delete" | "cancel"; }
params.idstring
params.type"delete" | "cancel"

Returns ​

Promise<SpotAPISuccessResponse<SpotDeleteExportReportResponse>>


deleteOAuthFastApiKey() ​

ts
deleteOAuthFastApiKey(params: object): Promise<{
  result: boolean;
}>;

Delete a Fast API key. The archived OAuth contract requires an OAuth2 Bearer token with the account.fast-api-key:write scope.

Parameters ​

ParameterType
params{ api_key_name: string; }
params.api_key_namestring

Returns ​

Promise<{ result: boolean; }>


generateNewOrderID() ​

ts
generateNewOrderID(): string;

Misc Utility Methods

Returns ​

string


getAccountBalance() ​

ts
getAccountBalance(params?: SpotGetAccountBalanceParams): Promise<SpotAPISuccessResponse<SpotAccountBalance>>;

Get Account Balance

Retrieve all cash balances, net of pending withdrawals. Pass account_id to retrieve balances for a specific wallet.

Parameters ​

ParameterType
params?SpotGetAccountBalanceParams

Returns ​

Promise<SpotAPISuccessResponse<SpotAccountBalance>>

Example ​

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

async function main() {
  const apiKey = process.env.KRAKEN_API_KEY;
  const apiSecret = process.env.KRAKEN_API_SECRET;
  if (!apiKey || !apiSecret) {
    throw new Error('Set KRAKEN_API_KEY and KRAKEN_API_SECRET.');
  }

  const client = new SpotClient({ apiKey, apiSecret });
  const response = await client.getAccountBalance();
  console.log('Account access verified.');
  console.log('Returned asset balances:', Object.keys(response.result).length);
}

main().catch((error) => {
  console.error(error);
  process.exitCode = 1;
});

See ​

Read account balances


getApiKeyInfo() ​

ts
getApiKeyInfo(params?: SpotGetApiKeyInfoParams): Promise<SpotAPISuccessResponse<SpotApiKeyInfo>>;

Get API Key Info

Retrieve configuration and usage details for the API key used in the request.

Parameters ​

ParameterType
params?SpotGetApiKeyInfoParams

Returns ​

Promise<SpotAPISuccessResponse<SpotApiKeyInfo>>


getAssetInfo() ​

ts
getAssetInfo(params?: object): Promise<SpotAPISuccessResponse<Record<string, SpotAssetInfo>>>;

Get Asset Info

Get information about the assets that are available for deposit, withdrawal, trading and earn.

Parameters ​

ParameterType
params?{ aclass?: "currency" | "tokenized_asset"; asset?: string; }
params.aclass?"currency" | "tokenized_asset"
params.asset?string

Returns ​

Promise<SpotAPISuccessResponse<Record<string, SpotAssetInfo>>>


getAssetPairs() ​

ts
getAssetPairs(params?: SpotGetAssetPairsParams): Promise<SpotAPISuccessResponse<Record<string, SpotAssetPair>>>;

Get Tradable Asset Pairs

Get tradable asset pairs

Parameters ​

ParameterType
params?SpotGetAssetPairsParams

Returns ​

Promise<SpotAPISuccessResponse<Record<string, SpotAssetPair>>>


getCandles() ​

ts
getCandles(params: SpotGetOHLCParams): Promise<SpotAPISuccessResponse<SpotOHLCResponse>>;

Get OHLC Data

Retrieve OHLC market data. The last entry in the OHLC array is for the current, not-yet-committed timeframe, and will always be present, regardless of the value of since. Returns up to 720 of the most recent entries (older data cannot be retrieved, regardless of the value of since).

Parameters ​

ParameterType
paramsSpotGetOHLCParams

Returns ​

Promise<SpotAPISuccessResponse<SpotOHLCResponse>>


getClientType() ​

ts
getClientType(): RestClientType;

Defines the client type (affecting how requests & signatures behave)

Returns ​

RestClientType

Overrides ​

BaseRestClient.getClientType


getClosedOrders() ​

ts
getClosedOrders(params?: SpotGetClosedOrdersParams): Promise<SpotAPISuccessResponse<SpotClosedOrdersResponse>>;

Get Closed Orders

Retrieve information about orders that have been closed (filled or cancelled). 50 results are returned at a time, the most recent by default.

Parameters ​

ParameterType
params?SpotGetClosedOrdersParams

Returns ​

Promise<SpotAPISuccessResponse<SpotClosedOrdersResponse>>


getClosedStrategies() ​

ts
getClosedStrategies(params?: SpotGetClosedStrategiesParams): Promise<SpotAPISuccessResponse<SpotClosedStrategiesResponse>>;

Get Closed Strategies

Get terminal strategies with cursor pagination (limit 1-100, default 100). Repeat the original filters with next_cursor as cursor. No ofs or count is supported.

Parameters ​

ParameterType
params?SpotGetClosedStrategiesParams

Returns ​

Promise<SpotAPISuccessResponse<SpotClosedStrategiesResponse>>


getCreditLines() ​

ts
getCreditLines(params?: object): Promise<SpotAPISuccessResponse<SpotCreditLines | null>>;

Get Credit Lines

Retrieve all credit line details for VIPs with this functionality.

Parameters ​

ParameterType
params?{ account_id?: string; rebase_multiplier?: "base" | "rebased"; }
params.account_id?string
params.rebase_multiplier?"base" | "rebased"

Returns ​

Promise<SpotAPISuccessResponse<SpotCreditLines | null>>


getDepositAddresses() ​

ts
getDepositAddresses(params: SpotGetDepositAddressesParams): Promise<SpotAPISuccessResponse<SpotDepositAddress[]>>;

Retrieve deposit addresses for an asset and funding method, or generate a new address.

Parameters ​

ParameterType
paramsSpotGetDepositAddressesParams

Returns ​

Promise<SpotAPISuccessResponse<SpotDepositAddress[]>>


getDepositMethods() ​

ts
getDepositMethods(params: SpotGetDepositMethodsParams): Promise<SpotAPISuccessResponse<SpotDepositMethod[]>>;

Get Deposit Methods

Retrieve methods available for depositing a particular asset.

Parameters ​

ParameterType
paramsSpotGetDepositMethodsParams

Returns ​

Promise<SpotAPISuccessResponse<SpotDepositMethod[]>>


getDepositsStatus() ​

ts
getDepositsStatus(params?: SpotGetDepositStatusParams): Promise<SpotAPISuccessResponse<SpotDepositStatusResponse>>;

Get Status of Recent Deposits

Retrieve information about recent deposits. Results are sorted by recency.

Parameters ​

ParameterType
params?SpotGetDepositStatusParams

Returns ​

Promise<SpotAPISuccessResponse<SpotDepositStatusResponse>>


getEarnAllocations() ​

ts
getEarnAllocations(params?: SpotListEarnAllocationsParams): Promise<SpotAPISuccessResponse<SpotListEarnAllocationsResponse>>;

List Earn Allocations

List all allocations for the user. By default all allocations are returned, even for strategies that have been used in the past and have zero balance now.

Parameters ​

ParameterType
params?SpotListEarnAllocationsParams

Returns ​

Promise<SpotAPISuccessResponse<SpotListEarnAllocationsResponse>>


getEarnAllocationStatus() ​

ts
getEarnAllocationStatus(params: object): Promise<SpotAPISuccessResponse<{
  pending: boolean;
}>>;

Get Allocation Status

Get the status of the last allocation request.

Parameters ​

ParameterType
params{ strategy_id: string; }
params.strategy_idstring

Returns ​

Promise<SpotAPISuccessResponse<{ pending: boolean; }>>


getEarnDeallocationStatus() ​

ts
getEarnDeallocationStatus(params: object): Promise<SpotAPISuccessResponse<{
  pending: boolean;
}>>;

Get Deallocation Status

Get the status of the last deallocation request.

Parameters ​

ParameterType
params{ strategy_id: string; }
params.strategy_idstring

Returns ​

Promise<SpotAPISuccessResponse<{ pending: boolean; }>>


getEarnStrategies() ​

ts
getEarnStrategies(params?: SpotListEarnStrategiesParams): Promise<SpotAPISuccessResponse<{
  items: SpotEarnStrategy[];
  next_cursor?: string;
}>>;

List Earn Strategies

List earn strategies along with their parameters. Returns only strategies that are available to the user based on geographic region.

Parameters ​

ParameterType
params?SpotListEarnStrategiesParams

Returns ​

Promise<SpotAPISuccessResponse<{ items: SpotEarnStrategy[]; next_cursor?: string; }>>


getExtendedBalance() ​

ts
getExtendedBalance(params?: object): Promise<SpotAPISuccessResponse<SpotExtendedBalance>>;

Get Extended Balance

Retrieve all extended account balances, including credits and held amounts. Balance available for trading is calculated as: available balance = balance + credit - credit_used - hold_trade

Parameters ​

ParameterType
params?{ account_id?: string; rebase_multiplier?: "base" | "rebased"; }
params.account_id?string
params.rebase_multiplier?"base" | "rebased"

Returns ​

Promise<SpotAPISuccessResponse<SpotExtendedBalance>>


getGroupedBook() ​

ts
getGroupedBook(params: SpotGetGroupedBookParams): Promise<SpotAPISuccessResponse<SpotGroupedBookResponse>>;

Get Grouped Order Book

Aggregates order book volume over a configurable tick grouping.

Parameters ​

ParameterType
paramsSpotGetGroupedBookParams

Returns ​

Promise<SpotAPISuccessResponse<SpotGroupedBookResponse>>


getLedgers() ​

ts
getLedgers(params: SpotQueryLedgersParams): Promise<SpotAPISuccessResponse<SpotQueryLedgersResponse>>;

Query Ledgers

Retrieve information about specific ledger entries.

Parameters ​

ParameterType
paramsSpotQueryLedgersParams

Returns ​

Promise<SpotAPISuccessResponse<SpotQueryLedgersResponse>>


getLedgersExport() ​

ts
getLedgersExport(params: object): Promise<any>;

Retrieve a processed data export as a ZIP archive. Configure the REST client’s Axios network options with a binary responseType to preserve the original archive bytes.

Parameters ​

ParameterType
params{ id: string; }
params.idstring

Returns ​

Promise<any>


getLedgersExportStatus() ​

ts
getLedgersExportStatus(params: object): Promise<SpotAPISuccessResponse<SpotExportReportStatus[]>>;

Get Export Report Status

Get status of requested data exports.

Parameters ​

ParameterType
params{ report: "trades" | "ledgers"; }
params.report"trades" | "ledgers"

Returns ​

Promise<SpotAPISuccessResponse<SpotExportReportStatus[]>>


getLedgersInfo() ​

ts
getLedgersInfo(params?: SpotGetLedgersInfoParams): Promise<SpotAPISuccessResponse<SpotLedgersInfoResponse>>;

Get Ledgers Info

Retrieve information about ledger entries. 50 results are returned at a time, the most recent by default. Pass account_id to retrieve ledger entries for a specific wallet.

Parameters ​

ParameterType
params?SpotGetLedgersInfoParams

Returns ​

Promise<SpotAPISuccessResponse<SpotLedgersInfoResponse>>


getLevel3OrderBook() ​

ts
getLevel3OrderBook(params: SpotGetLevel3Params): Promise<SpotAPISuccessResponse<SpotLevel3OrderBookResponse>>;

Get Level 3 Order Book

Individual order-level book data. Requires authentication.

Parameters ​

ParameterType
paramsSpotGetLevel3Params

Returns ​

Promise<SpotAPISuccessResponse<SpotLevel3OrderBookResponse>>


getMaintenanceSchedule() ​

ts
getMaintenanceSchedule(): Promise<SpotAPISuccessResponse<SpotMaintenanceSchedule>>;

Get Maintenance Schedule

Get all scheduled maintenance events in the next 7-day window.

Returns ​

Promise<SpotAPISuccessResponse<SpotMaintenanceSchedule>>


getOAuthAccessToken() ​

ts
getOAuthAccessToken(params: OauthGetAccessTokenParams): Promise<OauthGetAccessTokenResponse>;

Request an OAuth access token through POST /oauth/token.

Parameters ​

ParameterType
paramsOauthGetAccessTokenParams

Returns ​

Promise<OauthGetAccessTokenResponse>


getOAuthUserInfo() ​

ts
getOAuthUserInfo(): Promise<OauthGetUserInfoResponse>;

Retrieve the user’s email address and IIBAN. The archived OAuth contract requires an OAuth2 Bearer token with the account.info:basic scope.

Returns ​

Promise<OauthGetUserInfoResponse>


getOpenOrders() ​

ts
getOpenOrders(params?: SpotGetOpenOrdersParams): Promise<SpotAPISuccessResponse<SpotOpenOrdersResponse>>;

Get Open Orders

Retrieve information about currently open orders.

Parameters ​

ParameterType
params?SpotGetOpenOrdersParams

Returns ​

Promise<SpotAPISuccessResponse<SpotOpenOrdersResponse>>


getOpenPositions() ​

ts
getOpenPositions(params?: SpotGetOpenPositionsParams): Promise<SpotAPISuccessResponse<SpotOpenPositionsResult>>;

Get Open Positions

Get information about open margin positions.

Parameters ​

ParameterType
params?SpotGetOpenPositionsParams

Returns ​

Promise<SpotAPISuccessResponse<SpotOpenPositionsResult>>


getOpenStrategies() ​

ts
getOpenStrategies(params?: object): Promise<SpotAPISuccessResponse<{
  open: Record<string, SpotAlgoStrategy>;
}>>;

Get Open Strategies

Get pending and open strategies keyed by strategy ID.

Parameters ​

ParameterType
params?{ strategy_type?: "twap"; }
params.strategy_type?"twap"

Returns ​

Promise<SpotAPISuccessResponse<{ open: Record<string, SpotAlgoStrategy>; }>>


getOrderAmends() ​

ts
getOrderAmends(params: object): Promise<SpotAPISuccessResponse<SpotOrderAmendsResponse>>;

Get Order Amends

Retrieves an audit trail of amend transactions on the specified order. The list is ordered by ascending amend timestamp.

Parameters ​

ParameterType
params{ account_id?: string; order_id: string; rebase_multiplier?: "base" | "rebased"; }
params.account_id?string
params.order_idstring
params.rebase_multiplier?"base" | "rebased"

Returns ​

Promise<SpotAPISuccessResponse<SpotOrderAmendsResponse>>


getOrderBook() ​

ts
getOrderBook(params: SpotGetOrderBookParams): Promise<SpotAPISuccessResponse<SpotOrderBookResponse>>;

Get Order Book

Returns level 2 (L2) order book, which describes the individual price levels in the book with aggregated order quantities at each level.

Parameters ​

ParameterType
paramsSpotGetOrderBookParams

Returns ​

Promise<SpotAPISuccessResponse<SpotOrderBookResponse>>

Example ​

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

async function main() {
  const client = new SpotClient();
  const response = await client.getOrderBook({ pair: 'XBTUSD', count: 10 });

  for (const [pair, book] of Object.entries(response.result)) {
    console.log(pair, { bids: book.bids, asks: book.asks });
  }
}

main().catch((error) => {
  console.error(error);
  process.exitCode = 1;
});

See ​

Read an order book


getOrders() ​

ts
getOrders(params: SpotQueryOrdersParams): Promise<SpotAPISuccessResponse<SpotQueryOrdersResponse>>;

Query Orders Info

Retrieve information about specific orders.

Parameters ​

ParameterType
paramsSpotQueryOrdersParams

Returns ​

Promise<SpotAPISuccessResponse<SpotQueryOrdersResponse>>


getPostTradeData() ​

ts
getPostTradeData(params?: SpotGetPostTradeDataParams): Promise<SpotAPISuccessResponse<SpotPostTradeDataResponse>>;

Post-Trade Data

Returns a list of trades on the spot exchange. If no filter parameters are specified, the last 1000 trades for all pairs are received.

Parameters ​

ParameterType
params?SpotGetPostTradeDataParams

Returns ​

Promise<SpotAPISuccessResponse<SpotPostTradeDataResponse>>


getPreTradeData() ​

ts
getPreTradeData(params: object): Promise<SpotAPISuccessResponse<SpotPreTradeData>>;

Pre-Trade Data

Returns the price levels in the order book with aggregated order quantities at each price level. The top 10 levels are returned for each trading pair.

Parameters ​

ParameterType
params{ symbol: string; }
params.symbolstring

Returns ​

Promise<SpotAPISuccessResponse<SpotPreTradeData>>


getRecentSpreads() ​

ts
getRecentSpreads(params: SpotGetRecentSpreadsParams): Promise<SpotAPISuccessResponse<SpotRecentSpreadsResponse>>;

Get Recent Spreads

Returns the last ~200 top-of-book spreads for a given pair

Parameters ​

ParameterType
paramsSpotGetRecentSpreadsParams

Returns ​

Promise<SpotAPISuccessResponse<SpotRecentSpreadsResponse>>


getRecentTrades() ​

ts
getRecentTrades(params: SpotGetRecentTradesParams): Promise<SpotAPISuccessResponse<SpotRecentTradesResponse>>;

Get Recent Trades

Returns the last 1000 trades by default

Parameters ​

ParameterType
paramsSpotGetRecentTradesParams

Returns ​

Promise<SpotAPISuccessResponse<SpotRecentTradesResponse>>


getServerTime() ​

ts
getServerTime(): Promise<SpotAPISuccessResponse<{
  rfc1123: string;
  unixtime: number;
}>>;

Get Server Time

Get the server's time.

Returns ​

Promise<SpotAPISuccessResponse<{ rfc1123: string; unixtime: number; }>>


getSystemStatus() ​

ts
getSystemStatus(): Promise<SpotAPISuccessResponse<SpotSystemStatus>>;

Get System Status

Get the current system status or trading mode.

Returns ​

Promise<SpotAPISuccessResponse<SpotSystemStatus>>


getTicker() ​

ts
getTicker(params?: object): Promise<SpotAPISuccessResponse<Record<string, SpotAssetTickerInfo>>>;

Get Ticker Information

Get ticker information for all or requested markets. Note: Today's prices start at midnight UTC. Leaving the pair parameter blank will return tickers for all tradeable assets on Kraken.

Parameters ​

ParameterType
params?{ asset_class?: "forex" | "tokenized_asset"; pair?: string; }
params.asset_class?"forex" | "tokenized_asset"
params.pair?string

Returns ​

Promise<SpotAPISuccessResponse<Record<string, SpotAssetTickerInfo>>>

Example ​

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

async function main() {
  const client = new SpotClient();
  const response = await client.getTicker({ pair: 'XBTUSD' });

  for (const [pair, ticker] of Object.entries(response.result)) {
    console.log(`${pair} last price: ${ticker.c[0]}`);
  }
}

main().catch((error) => {
  console.error(error);
  process.exitCode = 1;
});

See ​

Read a public ticker


getTradeBalance() ​

ts
getTradeBalance(params?: object): Promise<SpotAPISuccessResponse<SpotTradeBalance>>;

Get Trade Balance

Retrieve a summary of collateral balances, margin position valuations, equity and margin level.

Parameters ​

ParameterType
params?{ account_id?: string; rebase_multiplier?: "base" | "rebased"; }
params.account_id?string
params.rebase_multiplier?"base" | "rebased"

Returns ​

Promise<SpotAPISuccessResponse<SpotTradeBalance>>


getTrades() ​

ts
getTrades(params: SpotQueryTradesParams): Promise<SpotAPISuccessResponse<SpotQueryTradesResponse>>;

Query Trades Info

Retrieve information about specific trades/fills.

Parameters ​

ParameterType
paramsSpotQueryTradesParams

Returns ​

Promise<SpotAPISuccessResponse<SpotQueryTradesResponse>>


getTradesHistory() ​

ts
getTradesHistory(params?: SpotGetTradesHistoryParams): Promise<SpotAPISuccessResponse<SpotTradesHistoryResponse>>;

Retrieve trade and fill history, most recent first by default. The default page size is 50; use limit to request 1–100 trades per page. Set with_cursor to true and pass the returned cursor.next as cursor for subsequent pages.

Parameters ​

ParameterType
params?SpotGetTradesHistoryParams

Returns ​

Promise<SpotAPISuccessResponse<SpotTradesHistoryResponse>>


getTradingVolume() ​

ts
getTradingVolume(params?: SpotGetTradingVolumeParams): Promise<SpotAPISuccessResponse<SpotTradeVolume>>;

Get Trade Volume

Returns 30 day USD trading volume and resulting fee schedule for any asset pair(s) provided. Also use this endpoint (with a Spot API key) to determine Futures fee rates as of 2026-06-22.

Parameters ​

ParameterType
params?SpotGetTradingVolumeParams

Returns ​

Promise<SpotAPISuccessResponse<SpotTradeVolume>>


getWalletAccounts() ​

ts
getWalletAccounts(): Promise<SpotAPISuccessResponse<SpotListWalletAccountsResponse>>;

List Wallet Accounts

Retrieve the wallet accounts associated with the authenticated user.

Returns ​

Promise<SpotAPISuccessResponse<SpotListWalletAccountsResponse>>


getWebSocketsToken() ​

ts
getWebSocketsToken(): Promise<SpotAPISuccessResponse<SpotWebSocketsTokenResponse>>;

Get Websockets Token

An authentication token must be requested via this REST API endpoint in order to connect to and authenticate with the Websockets API. The token should be used within 15 minutes of creation.

Returns ​

Promise<SpotAPISuccessResponse<SpotWebSocketsTokenResponse>>


getWithdrawalAddresses() ​

ts
getWithdrawalAddresses(params?: SpotGetWithdrawalAddressesParams): Promise<SpotAPISuccessResponse<SpotWithdrawalAddress[]>>;

Get Withdrawal Addresses

Retrieve a list of withdrawal addresses available for the user.

Parameters ​

ParameterType
params?SpotGetWithdrawalAddressesParams

Returns ​

Promise<SpotAPISuccessResponse<SpotWithdrawalAddress[]>>


getWithdrawalInfo() ​

ts
getWithdrawalInfo(params: SpotGetWithdrawalInfoParams): Promise<SpotAPISuccessResponse<SpotWithdrawalInfo>>;

Get Withdrawal Information

Retrieve fee information about potential withdrawals for a particular asset, key and amount.

Parameters ​

ParameterType
paramsSpotGetWithdrawalInfoParams

Returns ​

Promise<SpotAPISuccessResponse<SpotWithdrawalInfo>>


getWithdrawalMethods() ​

ts
getWithdrawalMethods(params?: SpotGetWithdrawalMethodsParams): Promise<SpotAPISuccessResponse<SpotWithdrawalMethod[]>>;

Get Withdrawal Methods

Retrieve a list of withdrawal methods available for the user.

Parameters ​

ParameterType
params?SpotGetWithdrawalMethodsParams

Returns ​

Promise<SpotAPISuccessResponse<SpotWithdrawalMethod[]>>


getWithdrawalsStatus() ​

ts
getWithdrawalsStatus(params?: SpotGetWithdrawalsStatusParams): Promise<SpotAPISuccessResponse<SpotWithdrawalStatus[]>>;

Get Status of Recent Withdrawals

Retrieve information about recent withdrawals. Results are sorted by recency.

Parameters ​

ParameterType
params?SpotGetWithdrawalsStatusParams

Returns ​

Promise<SpotAPISuccessResponse<SpotWithdrawalStatus[]>>


hasAccessToken() ​

ts
hasAccessToken(): boolean;

Returns ​

boolean

Inherited from ​

BaseRestClient.hasAccessToken


listOAuthFastApiKeys() ​

ts
listOAuthFastApiKeys(): Promise<{
  result: OauthFastApiKey[];
}>;

List the user’s Fast API keys. The archived OAuth contract requires an OAuth2 Bearer token with the account.fast-api-key:read scope.

Returns ​

Promise<{ result: OauthFastApiKey[]; }>


queryStrategies() ​

ts
queryStrategies(params: object): Promise<SpotAPISuccessResponse<{
  strategies: Record<string, SpotAlgoStrategy>;
}>>;

Query Strategies

Query up to 20 comma-delimited strategy IDs. Unmatched IDs are omitted.

Parameters ​

ParameterType
params{ strategy_ids: string; }
params.strategy_idsstring

Returns ​

Promise<SpotAPISuccessResponse<{ strategies: Record<string, SpotAlgoStrategy>; }>>


requestLedgersExport() ​

ts
requestLedgersExport(params: SpotRequestExportReportParams): Promise<SpotAPISuccessResponse<SpotRequestExportReportResponse>>;

Request Export Report

Request export of trades or ledgers.

Parameters ​

ParameterType
paramsSpotRequestExportReportParams

Returns ​

Promise<SpotAPISuccessResponse<SpotRequestExportReportResponse>>


setAccessToken() ​

ts
setAccessToken(newAccessToken: string): void;

Parameters ​

ParameterType
newAccessTokenstring

Returns ​

void

Inherited from ​

BaseRestClient.setAccessToken


submitBatchOrders() ​

ts
submitBatchOrders(params: SpotSubmitOrderBatchParams): Promise<SpotAPISuccessResponse<{
  orders: SpotBatchOrderResult[];
}>>;

Add Order Batch

Sends a collection of orders (minimum of 2 and maximum 15). All orders in batch are limited to a single pair. Validation is performed on the whole batch prior to submission. If an order fails validation, the whole batch will be rejected.

Parameters ​

ParameterType
paramsSpotSubmitOrderBatchParams

Returns ​

Promise<SpotAPISuccessResponse<{ orders: SpotBatchOrderResult[]; }>>


submitOrder() ​

ts
submitOrder(params: SpotSubmitOrderParams): Promise<SpotAPISuccessResponse<SpotSubmitOrderResponse>>;

Add Order

Place a new order. Note: See the getAssetPairs() endpoint for details on the available trading pairs, their price and quantity precisions, order minimums, available leverage, etc.

Parameters ​

ParameterType
paramsSpotSubmitOrderParams

Returns ​

Promise<SpotAPISuccessResponse<SpotSubmitOrderResponse>>

See ​

Order management


submitStrategy() ​

ts
submitStrategy(params: SpotSubmitStrategyParams): Promise<SpotAPISuccessResponse<{
  strategy_id: string;
}>>;

Add Strategy

Submit a TWAP strategy with a time horizon of at least 60 seconds. Returns an AS-prefixed strategy ID, or an empty string when validate is true.

Parameters ​

ParameterType
paramsSpotSubmitStrategyParams

Returns ​

Promise<SpotAPISuccessResponse<{ strategy_id: string; }>>


submitSubaccountTransfer() ​

ts
submitSubaccountTransfer(params: SpotAccountTransferParams): Promise<SpotAPISuccessResponse<SpotAccountTransferResponse>>;

Account Transfer

Transfer funds to and from master and subaccounts. Note: AccountTransfer must be called using an API key from the master account.

Parameters ​

ParameterType
paramsSpotAccountTransferParams

Returns ​

Promise<SpotAPISuccessResponse<SpotAccountTransferResponse>>


submitTransferToFutures() ​

ts
submitTransferToFutures(params: SpotWalletTransferParams): Promise<SpotAPISuccessResponse<{
  refid: string;
}>>;

Request Wallet Transfer

Transfer from a Kraken spot wallet to a Kraken Futures wallet. Note: Transfer in the other direction must be requested via the Kraken Futures API.

Parameters ​

ParameterType
paramsSpotWalletTransferParams

Returns ​

Promise<SpotAPISuccessResponse<{ refid: string; }>>


submitWithdrawal() ​

ts
submitWithdrawal(params: SpotWithdrawFundsParams): Promise<SpotAPISuccessResponse<{
  refid: string;
}>>;

Withdraw Funds

Make a withdrawal request.

Parameters ​

ParameterType
paramsSpotWithdrawFundsParams

Returns ​

Promise<SpotAPISuccessResponse<{ refid: string; }>>


updateOAuthFastApiKey() ​

ts
updateOAuthFastApiKey(params: OauthUpdateFastApiKeyParams): Promise<{
  result: boolean;
}>;

Update a Fast API key. The archived OAuth contract requires an OAuth2 Bearer token with the account.fast-api-key:write scope.

Parameters ​

ParameterType
paramsOauthUpdateFastApiKeyParams

Returns ​

Promise<{ result: boolean; }>

Built by Siebly. Open source SDKs for exchange APIs.