@siebly/kraken-api 1.0.6 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/cjs/SpotClient.d.ts +21 -6
- package/dist/cjs/SpotClient.js +24 -0
- package/dist/cjs/SpotClient.js.map +1 -1
- package/dist/cjs/types/request/spot.types.d.ts +21 -0
- package/dist/cjs/types/response/spot.types.d.ts +65 -2
- package/dist/cjs/types/websockets/ws-general.d.ts +1 -1
- package/dist/cjs/types/websockets/ws-subscriptions.d.ts +14 -0
- package/dist/mjs/SpotClient.d.ts +21 -6
- package/dist/mjs/SpotClient.js +24 -0
- package/dist/mjs/SpotClient.js.map +1 -1
- package/dist/mjs/types/request/spot.types.d.ts +21 -0
- package/dist/mjs/types/response/spot.types.d.ts +65 -2
- package/dist/mjs/types/websockets/ws-general.d.ts +1 -1
- package/dist/mjs/types/websockets/ws-subscriptions.d.ts +14 -0
- package/llms.txt +7312 -7137
- package/package.json +4 -5
package/README.md
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
[][1]
|
|
7
7
|
[][1]
|
|
8
8
|
[](https://t.me/nodetraders)
|
|
9
|
+
[](https://deepwiki.com/sieblyio/kraken-api)
|
|
9
10
|
|
|
10
11
|
<p align="center">
|
|
11
12
|
<a href="https://www.npmjs.com/package/@siebly/kraken-api">
|
package/dist/cjs/SpotClient.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BaseRestClient } from './lib/BaseRestClient.js';
|
|
2
2
|
import { RestClientType } from './lib/requestUtils.js';
|
|
3
|
-
import { OauthCreateFastApiKeyParams, OauthGetAccessTokenParams, OauthUpdateFastApiKeyParams, SpotAccountTransferParams, SpotAmendOrderParams, SpotGetAssetPairsParams, SpotGetClosedOrdersParams, SpotGetDepositAddressesParams, SpotGetDepositMethodsParams, SpotGetDepositStatusParams, SpotGetLedgersInfoParams, SpotGetOHLCParams, SpotGetOpenOrdersParams, SpotGetOpenPositionsParams, SpotGetOrderBookParams, SpotGetPostTradeDataParams, SpotGetRecentSpreadsParams, SpotGetRecentTradesParams, SpotGetTradesHistoryParams, SpotGetWithdrawalAddressesParams, SpotGetWithdrawalInfoParams, SpotGetWithdrawalMethodsParams, SpotGetWithdrawalsStatusParams, SpotListEarnAllocationsParams, SpotListEarnStrategiesParams, SpotQueryLedgersParams, SpotQueryOrdersParams, SpotQueryTradesParams, SpotRequestExportReportParams, SpotSubmitOrderBatchParams, SpotSubmitOrderParams, SpotWalletTransferParams, SpotWithdrawFundsParams } from './types/request/spot.types.js';
|
|
3
|
+
import { OauthCreateFastApiKeyParams, OauthGetAccessTokenParams, OauthUpdateFastApiKeyParams, SpotAccountTransferParams, SpotAmendOrderParams, SpotGetApiKeyInfoParams, SpotGetAssetPairsParams, SpotGetClosedOrdersParams, SpotGetDepositAddressesParams, SpotGetDepositMethodsParams, SpotGetDepositStatusParams, SpotGetGroupedBookParams, SpotGetLedgersInfoParams, SpotGetLevel3Params, SpotGetOHLCParams, SpotGetOpenOrdersParams, SpotGetOpenPositionsParams, SpotGetOrderBookParams, SpotGetPostTradeDataParams, SpotGetRecentSpreadsParams, SpotGetRecentTradesParams, SpotGetTradesHistoryParams, SpotGetTradingVolumeParams, SpotGetWithdrawalAddressesParams, SpotGetWithdrawalInfoParams, SpotGetWithdrawalMethodsParams, SpotGetWithdrawalsStatusParams, SpotListEarnAllocationsParams, SpotListEarnStrategiesParams, SpotQueryLedgersParams, SpotQueryOrdersParams, SpotQueryTradesParams, SpotRequestExportReportParams, SpotSubmitOrderBatchParams, SpotSubmitOrderParams, SpotWalletTransferParams, SpotWithdrawFundsParams } from './types/request/spot.types.js';
|
|
4
4
|
import { SpotAPISuccessResponse } from './types/response/shared.types.js';
|
|
5
|
-
import { OauthCreateFastApiKeyResponse, OauthFastApiKey, OauthGetAccessTokenResponse, OauthGetUserInfoResponse, SpotAccountBalance, SpotAccountTransferResponse, SpotAssetInfo, SpotAssetPair, SpotAssetTickerInfo, SpotBatchOrderResult, SpotClosedOrdersResponse, SpotCreditLines, SpotDeleteExportReportResponse, SpotDepositAddress, SpotDepositMethod, SpotDepositStatusResponse, SpotEarnStrategy, SpotExportReportStatus, SpotExtendedBalance, SpotLedgersInfoResponse, SpotListEarnAllocationsResponse, SpotOHLCResponse, SpotOpenOrdersResponse, SpotOpenPositionsResponse, SpotOrderAmendsResponse, SpotOrderBookResponse, SpotPostTradeDataResponse, SpotPreTradeData, SpotQueryLedgersResponse, SpotQueryOrdersResponse, SpotQueryTradesResponse, SpotRecentSpreadsResponse, SpotRecentTradesResponse, SpotRequestExportReportResponse, SpotSubmitOrderResponse, SpotSystemStatus, SpotTradeBalance, SpotTradesHistoryResponse, SpotTradeVolume, SpotWebSocketsTokenResponse, SpotWithdrawalAddress, SpotWithdrawalInfo, SpotWithdrawalMethod, SpotWithdrawalStatus } from './types/response/spot.types.js';
|
|
5
|
+
import { OauthCreateFastApiKeyResponse, OauthFastApiKey, OauthGetAccessTokenResponse, OauthGetUserInfoResponse, SpotAccountBalance, SpotAccountTransferResponse, SpotApiKeyInfo, SpotAssetInfo, SpotAssetPair, SpotAssetTickerInfo, SpotBatchOrderResult, SpotClosedOrdersResponse, SpotCreditLines, SpotDeleteExportReportResponse, SpotDepositAddress, SpotDepositMethod, SpotDepositStatusResponse, SpotEarnStrategy, SpotExportReportStatus, SpotExtendedBalance, SpotGroupedBookResponse, SpotLedgersInfoResponse, SpotLevel3OrderBookResponse, SpotListEarnAllocationsResponse, SpotOHLCResponse, SpotOpenOrdersResponse, SpotOpenPositionsResponse, SpotOrderAmendsResponse, SpotOrderBookResponse, SpotPostTradeDataResponse, SpotPreTradeData, SpotQueryLedgersResponse, SpotQueryOrdersResponse, SpotQueryTradesResponse, SpotRecentSpreadsResponse, SpotRecentTradesResponse, SpotRequestExportReportResponse, SpotSubmitOrderResponse, SpotSystemStatus, SpotTradeBalance, SpotTradesHistoryResponse, SpotTradeVolume, SpotWebSocketsTokenResponse, SpotWithdrawalAddress, SpotWithdrawalInfo, SpotWithdrawalMethod, SpotWithdrawalStatus } from './types/response/spot.types.js';
|
|
6
6
|
/**
|
|
7
7
|
* The SpotClient provides integration to the Kraken Spot API.
|
|
8
8
|
*
|
|
@@ -79,6 +79,18 @@ export declare class SpotClient extends BaseRestClient {
|
|
|
79
79
|
* order quantities at each level.
|
|
80
80
|
*/
|
|
81
81
|
getOrderBook(params: SpotGetOrderBookParams): Promise<SpotAPISuccessResponse<SpotOrderBookResponse>>;
|
|
82
|
+
/**
|
|
83
|
+
* Get Grouped Order Book
|
|
84
|
+
*
|
|
85
|
+
* Aggregates order book volume over a configurable tick grouping.
|
|
86
|
+
*/
|
|
87
|
+
getGroupedBook(params: SpotGetGroupedBookParams): Promise<SpotAPISuccessResponse<SpotGroupedBookResponse>>;
|
|
88
|
+
/**
|
|
89
|
+
* Get Level 3 Order Book
|
|
90
|
+
*
|
|
91
|
+
* Individual order-level book data. Requires authentication.
|
|
92
|
+
*/
|
|
93
|
+
getLevel3OrderBook(params: SpotGetLevel3Params): Promise<SpotAPISuccessResponse<SpotLevel3OrderBookResponse>>;
|
|
82
94
|
/**
|
|
83
95
|
* Get Recent Trades
|
|
84
96
|
*
|
|
@@ -104,6 +116,12 @@ export declare class SpotClient extends BaseRestClient {
|
|
|
104
116
|
getAccountBalance(params?: {
|
|
105
117
|
rebase_multiplier?: 'rebased' | 'base';
|
|
106
118
|
}): Promise<SpotAPISuccessResponse<SpotAccountBalance>>;
|
|
119
|
+
/**
|
|
120
|
+
* Get API Key Info
|
|
121
|
+
*
|
|
122
|
+
* Retrieve configuration and usage details for the API key used in the request.
|
|
123
|
+
*/
|
|
124
|
+
getApiKeyInfo(params?: SpotGetApiKeyInfoParams): Promise<SpotAPISuccessResponse<SpotApiKeyInfo>>;
|
|
107
125
|
/**
|
|
108
126
|
* Get Extended Balance
|
|
109
127
|
*
|
|
@@ -194,10 +212,7 @@ export declare class SpotClient extends BaseRestClient {
|
|
|
194
212
|
* Returns 30 day USD trading volume and resulting fee schedule for any asset pair(s) provided.
|
|
195
213
|
* Also use this endpoint (with a Spot API key) to determine Futures fee rates as of 2026-06-22.
|
|
196
214
|
*/
|
|
197
|
-
getTradingVolume(params?:
|
|
198
|
-
pair?: string;
|
|
199
|
-
rebase_multiplier?: 'rebased' | 'base';
|
|
200
|
-
}): Promise<SpotAPISuccessResponse<SpotTradeVolume>>;
|
|
215
|
+
getTradingVolume(params?: SpotGetTradingVolumeParams): Promise<SpotAPISuccessResponse<SpotTradeVolume>>;
|
|
201
216
|
/**
|
|
202
217
|
* Request Export Report
|
|
203
218
|
*
|
package/dist/cjs/SpotClient.js
CHANGED
|
@@ -96,6 +96,22 @@ class SpotClient extends BaseRestClient_js_1.BaseRestClient {
|
|
|
96
96
|
getOrderBook(params) {
|
|
97
97
|
return this.get('0/public/Depth', params);
|
|
98
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* Get Grouped Order Book
|
|
101
|
+
*
|
|
102
|
+
* Aggregates order book volume over a configurable tick grouping.
|
|
103
|
+
*/
|
|
104
|
+
getGroupedBook(params) {
|
|
105
|
+
return this.get('0/public/GroupedBook', params);
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Get Level 3 Order Book
|
|
109
|
+
*
|
|
110
|
+
* Individual order-level book data. Requires authentication.
|
|
111
|
+
*/
|
|
112
|
+
getLevel3OrderBook(params) {
|
|
113
|
+
return this.postPrivate('0/private/Level3', { body: params });
|
|
114
|
+
}
|
|
99
115
|
/**
|
|
100
116
|
* Get Recent Trades
|
|
101
117
|
*
|
|
@@ -125,6 +141,14 @@ class SpotClient extends BaseRestClient_js_1.BaseRestClient {
|
|
|
125
141
|
getAccountBalance(params) {
|
|
126
142
|
return this.postPrivate('0/private/Balance', { body: params });
|
|
127
143
|
}
|
|
144
|
+
/**
|
|
145
|
+
* Get API Key Info
|
|
146
|
+
*
|
|
147
|
+
* Retrieve configuration and usage details for the API key used in the request.
|
|
148
|
+
*/
|
|
149
|
+
getApiKeyInfo(params) {
|
|
150
|
+
return this.postPrivate('0/private/GetApiKeyInfo', { body: params });
|
|
151
|
+
}
|
|
128
152
|
/**
|
|
129
153
|
* Get Extended Balance
|
|
130
154
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpotClient.js","sourceRoot":"","sources":["../../src/SpotClient.ts"],"names":[],"mappings":";;;AAAA,+DAAyD;AACzD,2DAA8E;
|
|
1
|
+
{"version":3,"file":"SpotClient.js","sourceRoot":"","sources":["../../src/SpotClient.ts"],"names":[],"mappings":";;;AAAA,+DAAyD;AACzD,2DAA8E;AA2F9E;;;;;;GAMG;AACH,MAAa,UAAW,SAAQ,kCAAc;IAC5C,aAAa;QACX,2BAA2B;QAC3B,OAAO,uCAAqB,CAAC,IAAI,CAAC;IACpC,CAAC;IAED;;;;OAIG;IAEH,kBAAkB;QAChB,kEAAkE;QAClE,+CAA+C;QAC/C,MAAM,QAAQ,GAAG,kBAAkB,CAAC;QACpC,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;YAC5B,MAAM,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;QACrD,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;;OAIG;IAEH;;;;OAIG;IACH,aAAa;QAMX,OAAO,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IACnC,CAAC;IAED;;;;OAIG;IACH,eAAe;QACb,OAAO,IAAI,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;IAC3C,CAAC;IAED;;;;OAIG;IACH,YAAY,CAAC,MAGZ;QACC,OAAO,IAAI,CAAC,GAAG,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;IAC7C,CAAC;IAED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AC;CACF;AAv1BD,gCAu1BC"}
|
|
@@ -19,6 +19,24 @@ export interface SpotGetOrderBookParams {
|
|
|
19
19
|
count?: number;
|
|
20
20
|
asset_class?: 'tokenized_asset';
|
|
21
21
|
}
|
|
22
|
+
export interface SpotGetGroupedBookParams {
|
|
23
|
+
pair: string;
|
|
24
|
+
depth?: 10 | 25 | 100 | 250 | 1000;
|
|
25
|
+
grouping?: 1 | 5 | 10 | 25 | 50 | 100 | 250 | 500 | 1000;
|
|
26
|
+
}
|
|
27
|
+
export interface SpotGetLevel3Params {
|
|
28
|
+
pair: string;
|
|
29
|
+
depth?: 0 | 10 | 25 | 100 | 250 | 1000;
|
|
30
|
+
}
|
|
31
|
+
export interface SpotTradeVolumePairInput {
|
|
32
|
+
asset: string;
|
|
33
|
+
aclass: 'currency' | 'forex' | 'equity' | 'equity_pair' | 'nft' | 'derivatives' | 'tokenized_asset' | 'futures_contract';
|
|
34
|
+
}
|
|
35
|
+
export interface SpotGetTradingVolumeParams {
|
|
36
|
+
pair?: string | SpotTradeVolumePairInput[];
|
|
37
|
+
fee_schedule?: boolean;
|
|
38
|
+
rebase_multiplier?: 'rebased' | 'base';
|
|
39
|
+
}
|
|
22
40
|
export interface SpotGetRecentTradesParams {
|
|
23
41
|
pair: string;
|
|
24
42
|
since?: string;
|
|
@@ -33,6 +51,9 @@ export interface SpotGetRecentSpreadsParams {
|
|
|
33
51
|
/**
|
|
34
52
|
* Account Data
|
|
35
53
|
*/
|
|
54
|
+
export interface SpotGetApiKeyInfoParams {
|
|
55
|
+
otp?: string;
|
|
56
|
+
}
|
|
36
57
|
export interface SpotGetOpenOrdersParams {
|
|
37
58
|
trades?: boolean;
|
|
38
59
|
userref?: number;
|
|
@@ -73,6 +73,27 @@ export interface SpotOrderBook {
|
|
|
73
73
|
export interface SpotOrderBookResponse {
|
|
74
74
|
[pairName: string]: SpotOrderBook;
|
|
75
75
|
}
|
|
76
|
+
export interface SpotGroupedBookLevel {
|
|
77
|
+
price: string;
|
|
78
|
+
qty: string;
|
|
79
|
+
}
|
|
80
|
+
export interface SpotGroupedBookResponse {
|
|
81
|
+
pair: string;
|
|
82
|
+
grouping: number;
|
|
83
|
+
bids: SpotGroupedBookLevel[];
|
|
84
|
+
asks: SpotGroupedBookLevel[];
|
|
85
|
+
}
|
|
86
|
+
export interface SpotLevel3OrderEntry {
|
|
87
|
+
price: string;
|
|
88
|
+
qty: string;
|
|
89
|
+
order_id: string;
|
|
90
|
+
timestamp: number;
|
|
91
|
+
}
|
|
92
|
+
export interface SpotLevel3OrderBookResponse {
|
|
93
|
+
pair: string;
|
|
94
|
+
bids: SpotLevel3OrderEntry[];
|
|
95
|
+
asks: SpotLevel3OrderEntry[];
|
|
96
|
+
}
|
|
76
97
|
export type SpotTradeData = [
|
|
77
98
|
string,
|
|
78
99
|
string,
|
|
@@ -94,6 +115,7 @@ export interface SpotRecentSpreadsResponse {
|
|
|
94
115
|
/**
|
|
95
116
|
* Account Data
|
|
96
117
|
*/
|
|
118
|
+
/** @deprecated Kraken deprecated `.F` suffixed balance assets */
|
|
97
119
|
export interface SpotAccountBalance {
|
|
98
120
|
[assetName: string]: string;
|
|
99
121
|
}
|
|
@@ -295,15 +317,56 @@ export interface SpotFeeTierInfo {
|
|
|
295
317
|
tier_volume: string | null;
|
|
296
318
|
next_volume: string | null;
|
|
297
319
|
}
|
|
320
|
+
export interface SpotTradeVolumeInputs {
|
|
321
|
+
domain_spot_volume_30d: string;
|
|
322
|
+
domain_futures_volume_30d: string;
|
|
323
|
+
domain_assets_on_platform: string;
|
|
324
|
+
}
|
|
325
|
+
export interface SpotTradeVolumeFeeScheduleTier {
|
|
326
|
+
maker_fee: string;
|
|
327
|
+
taker_fee: string;
|
|
328
|
+
min_spot_volume?: string | null;
|
|
329
|
+
min_futures_volume?: string | null;
|
|
330
|
+
min_assets_on_platform?: string | null;
|
|
331
|
+
active?: boolean | null;
|
|
332
|
+
}
|
|
333
|
+
export interface SpotTradeVolumeFeeSchedule {
|
|
334
|
+
pair: string;
|
|
335
|
+
class: 'currency' | 'forex' | 'equity' | 'equity_pair' | 'nft' | 'derivatives' | 'tokenized_asset' | 'futures_contract' | 'volume';
|
|
336
|
+
tiers: SpotTradeVolumeFeeScheduleTier[];
|
|
337
|
+
}
|
|
338
|
+
export interface SpotTradeVolumeSubaccount {
|
|
339
|
+
iiban: string;
|
|
340
|
+
volume: string;
|
|
341
|
+
}
|
|
298
342
|
export interface SpotTradeVolume {
|
|
299
343
|
currency: string;
|
|
344
|
+
asset_class?: 'currency' | 'forex' | 'equity' | 'equity_pair' | 'nft' | 'derivatives' | 'tokenized_asset' | 'futures_contract' | null;
|
|
300
345
|
volume: string;
|
|
346
|
+
inputs: SpotTradeVolumeInputs;
|
|
301
347
|
fees?: {
|
|
302
348
|
[pairName: string]: SpotFeeTierInfo;
|
|
303
|
-
};
|
|
349
|
+
} | null;
|
|
304
350
|
fees_maker?: {
|
|
305
351
|
[pairName: string]: SpotFeeTierInfo;
|
|
306
|
-
};
|
|
352
|
+
} | null;
|
|
353
|
+
volume_subaccounts?: SpotTradeVolumeSubaccount[];
|
|
354
|
+
schedules?: SpotTradeVolumeFeeSchedule[] | null;
|
|
355
|
+
}
|
|
356
|
+
export interface SpotApiKeyInfo {
|
|
357
|
+
apiKeyName: string;
|
|
358
|
+
apiKey: string;
|
|
359
|
+
nonce: string;
|
|
360
|
+
nonceWindow: number;
|
|
361
|
+
permissions: string[];
|
|
362
|
+
iban: string;
|
|
363
|
+
validUntil: string;
|
|
364
|
+
queryFrom: string;
|
|
365
|
+
queryTo: string;
|
|
366
|
+
createdTime: string;
|
|
367
|
+
modifiedTime: string;
|
|
368
|
+
ipAllowlist: string[];
|
|
369
|
+
lastUsed: string | null;
|
|
307
370
|
}
|
|
308
371
|
export interface SpotRequestExportReportResponse {
|
|
309
372
|
id: string;
|
|
@@ -31,7 +31,7 @@ export interface WSClientConfigurableOptions {
|
|
|
31
31
|
wsOptions?: {
|
|
32
32
|
protocols?: string[];
|
|
33
33
|
agent?: any;
|
|
34
|
-
} & Partial<WebSocket.ClientOptions | ClientRequestArgs
|
|
34
|
+
} & (Omit<Partial<WebSocket.ClientOptions>, 'agent'> | Omit<Partial<ClientRequestArgs>, 'agent'>);
|
|
35
35
|
wsUrl?: string;
|
|
36
36
|
/**
|
|
37
37
|
* Allows you to provide a custom "signMessage" function, e.g. to use node's much faster createHmac method
|
|
@@ -9,3 +9,17 @@ export declare const WS_DERIVATIVES_PRIVATE_TOPICS: readonly ["open_orders", "op
|
|
|
9
9
|
export type WSDerivativesPrivateTopic = (typeof WS_DERIVATIVES_PRIVATE_TOPICS)[number];
|
|
10
10
|
export type WSDerivativesTopic = WSDerivativesPublicTopic | WSDerivativesPrivateTopic;
|
|
11
11
|
export type WSTopic = WSSpotTopic | WSDerivativesTopic;
|
|
12
|
+
export interface WSSpotInstrumentSubscribeParams {
|
|
13
|
+
execution_venue?: 'international' | 'bitnomial-exchange';
|
|
14
|
+
snapshot?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface WSSpotExecutionsSubscribeParams {
|
|
17
|
+
symbol?: string[];
|
|
18
|
+
snap_trades?: boolean;
|
|
19
|
+
snapshot?: boolean;
|
|
20
|
+
rebased?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface WSSpotBalancesSubscribeParams {
|
|
23
|
+
snapshot?: boolean;
|
|
24
|
+
rebased?: boolean;
|
|
25
|
+
}
|
package/dist/mjs/SpotClient.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BaseRestClient } from './lib/BaseRestClient.js';
|
|
2
2
|
import { RestClientType } from './lib/requestUtils.js';
|
|
3
|
-
import { OauthCreateFastApiKeyParams, OauthGetAccessTokenParams, OauthUpdateFastApiKeyParams, SpotAccountTransferParams, SpotAmendOrderParams, SpotGetAssetPairsParams, SpotGetClosedOrdersParams, SpotGetDepositAddressesParams, SpotGetDepositMethodsParams, SpotGetDepositStatusParams, SpotGetLedgersInfoParams, SpotGetOHLCParams, SpotGetOpenOrdersParams, SpotGetOpenPositionsParams, SpotGetOrderBookParams, SpotGetPostTradeDataParams, SpotGetRecentSpreadsParams, SpotGetRecentTradesParams, SpotGetTradesHistoryParams, SpotGetWithdrawalAddressesParams, SpotGetWithdrawalInfoParams, SpotGetWithdrawalMethodsParams, SpotGetWithdrawalsStatusParams, SpotListEarnAllocationsParams, SpotListEarnStrategiesParams, SpotQueryLedgersParams, SpotQueryOrdersParams, SpotQueryTradesParams, SpotRequestExportReportParams, SpotSubmitOrderBatchParams, SpotSubmitOrderParams, SpotWalletTransferParams, SpotWithdrawFundsParams } from './types/request/spot.types.js';
|
|
3
|
+
import { OauthCreateFastApiKeyParams, OauthGetAccessTokenParams, OauthUpdateFastApiKeyParams, SpotAccountTransferParams, SpotAmendOrderParams, SpotGetApiKeyInfoParams, SpotGetAssetPairsParams, SpotGetClosedOrdersParams, SpotGetDepositAddressesParams, SpotGetDepositMethodsParams, SpotGetDepositStatusParams, SpotGetGroupedBookParams, SpotGetLedgersInfoParams, SpotGetLevel3Params, SpotGetOHLCParams, SpotGetOpenOrdersParams, SpotGetOpenPositionsParams, SpotGetOrderBookParams, SpotGetPostTradeDataParams, SpotGetRecentSpreadsParams, SpotGetRecentTradesParams, SpotGetTradesHistoryParams, SpotGetTradingVolumeParams, SpotGetWithdrawalAddressesParams, SpotGetWithdrawalInfoParams, SpotGetWithdrawalMethodsParams, SpotGetWithdrawalsStatusParams, SpotListEarnAllocationsParams, SpotListEarnStrategiesParams, SpotQueryLedgersParams, SpotQueryOrdersParams, SpotQueryTradesParams, SpotRequestExportReportParams, SpotSubmitOrderBatchParams, SpotSubmitOrderParams, SpotWalletTransferParams, SpotWithdrawFundsParams } from './types/request/spot.types.js';
|
|
4
4
|
import { SpotAPISuccessResponse } from './types/response/shared.types.js';
|
|
5
|
-
import { OauthCreateFastApiKeyResponse, OauthFastApiKey, OauthGetAccessTokenResponse, OauthGetUserInfoResponse, SpotAccountBalance, SpotAccountTransferResponse, SpotAssetInfo, SpotAssetPair, SpotAssetTickerInfo, SpotBatchOrderResult, SpotClosedOrdersResponse, SpotCreditLines, SpotDeleteExportReportResponse, SpotDepositAddress, SpotDepositMethod, SpotDepositStatusResponse, SpotEarnStrategy, SpotExportReportStatus, SpotExtendedBalance, SpotLedgersInfoResponse, SpotListEarnAllocationsResponse, SpotOHLCResponse, SpotOpenOrdersResponse, SpotOpenPositionsResponse, SpotOrderAmendsResponse, SpotOrderBookResponse, SpotPostTradeDataResponse, SpotPreTradeData, SpotQueryLedgersResponse, SpotQueryOrdersResponse, SpotQueryTradesResponse, SpotRecentSpreadsResponse, SpotRecentTradesResponse, SpotRequestExportReportResponse, SpotSubmitOrderResponse, SpotSystemStatus, SpotTradeBalance, SpotTradesHistoryResponse, SpotTradeVolume, SpotWebSocketsTokenResponse, SpotWithdrawalAddress, SpotWithdrawalInfo, SpotWithdrawalMethod, SpotWithdrawalStatus } from './types/response/spot.types.js';
|
|
5
|
+
import { OauthCreateFastApiKeyResponse, OauthFastApiKey, OauthGetAccessTokenResponse, OauthGetUserInfoResponse, SpotAccountBalance, SpotAccountTransferResponse, SpotApiKeyInfo, SpotAssetInfo, SpotAssetPair, SpotAssetTickerInfo, SpotBatchOrderResult, SpotClosedOrdersResponse, SpotCreditLines, SpotDeleteExportReportResponse, SpotDepositAddress, SpotDepositMethod, SpotDepositStatusResponse, SpotEarnStrategy, SpotExportReportStatus, SpotExtendedBalance, SpotGroupedBookResponse, SpotLedgersInfoResponse, SpotLevel3OrderBookResponse, SpotListEarnAllocationsResponse, SpotOHLCResponse, SpotOpenOrdersResponse, SpotOpenPositionsResponse, SpotOrderAmendsResponse, SpotOrderBookResponse, SpotPostTradeDataResponse, SpotPreTradeData, SpotQueryLedgersResponse, SpotQueryOrdersResponse, SpotQueryTradesResponse, SpotRecentSpreadsResponse, SpotRecentTradesResponse, SpotRequestExportReportResponse, SpotSubmitOrderResponse, SpotSystemStatus, SpotTradeBalance, SpotTradesHistoryResponse, SpotTradeVolume, SpotWebSocketsTokenResponse, SpotWithdrawalAddress, SpotWithdrawalInfo, SpotWithdrawalMethod, SpotWithdrawalStatus } from './types/response/spot.types.js';
|
|
6
6
|
/**
|
|
7
7
|
* The SpotClient provides integration to the Kraken Spot API.
|
|
8
8
|
*
|
|
@@ -79,6 +79,18 @@ export declare class SpotClient extends BaseRestClient {
|
|
|
79
79
|
* order quantities at each level.
|
|
80
80
|
*/
|
|
81
81
|
getOrderBook(params: SpotGetOrderBookParams): Promise<SpotAPISuccessResponse<SpotOrderBookResponse>>;
|
|
82
|
+
/**
|
|
83
|
+
* Get Grouped Order Book
|
|
84
|
+
*
|
|
85
|
+
* Aggregates order book volume over a configurable tick grouping.
|
|
86
|
+
*/
|
|
87
|
+
getGroupedBook(params: SpotGetGroupedBookParams): Promise<SpotAPISuccessResponse<SpotGroupedBookResponse>>;
|
|
88
|
+
/**
|
|
89
|
+
* Get Level 3 Order Book
|
|
90
|
+
*
|
|
91
|
+
* Individual order-level book data. Requires authentication.
|
|
92
|
+
*/
|
|
93
|
+
getLevel3OrderBook(params: SpotGetLevel3Params): Promise<SpotAPISuccessResponse<SpotLevel3OrderBookResponse>>;
|
|
82
94
|
/**
|
|
83
95
|
* Get Recent Trades
|
|
84
96
|
*
|
|
@@ -104,6 +116,12 @@ export declare class SpotClient extends BaseRestClient {
|
|
|
104
116
|
getAccountBalance(params?: {
|
|
105
117
|
rebase_multiplier?: 'rebased' | 'base';
|
|
106
118
|
}): Promise<SpotAPISuccessResponse<SpotAccountBalance>>;
|
|
119
|
+
/**
|
|
120
|
+
* Get API Key Info
|
|
121
|
+
*
|
|
122
|
+
* Retrieve configuration and usage details for the API key used in the request.
|
|
123
|
+
*/
|
|
124
|
+
getApiKeyInfo(params?: SpotGetApiKeyInfoParams): Promise<SpotAPISuccessResponse<SpotApiKeyInfo>>;
|
|
107
125
|
/**
|
|
108
126
|
* Get Extended Balance
|
|
109
127
|
*
|
|
@@ -194,10 +212,7 @@ export declare class SpotClient extends BaseRestClient {
|
|
|
194
212
|
* Returns 30 day USD trading volume and resulting fee schedule for any asset pair(s) provided.
|
|
195
213
|
* Also use this endpoint (with a Spot API key) to determine Futures fee rates as of 2026-06-22.
|
|
196
214
|
*/
|
|
197
|
-
getTradingVolume(params?:
|
|
198
|
-
pair?: string;
|
|
199
|
-
rebase_multiplier?: 'rebased' | 'base';
|
|
200
|
-
}): Promise<SpotAPISuccessResponse<SpotTradeVolume>>;
|
|
215
|
+
getTradingVolume(params?: SpotGetTradingVolumeParams): Promise<SpotAPISuccessResponse<SpotTradeVolume>>;
|
|
201
216
|
/**
|
|
202
217
|
* Request Export Report
|
|
203
218
|
*
|
package/dist/mjs/SpotClient.js
CHANGED
|
@@ -93,6 +93,22 @@ export class SpotClient extends BaseRestClient {
|
|
|
93
93
|
getOrderBook(params) {
|
|
94
94
|
return this.get('0/public/Depth', params);
|
|
95
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* Get Grouped Order Book
|
|
98
|
+
*
|
|
99
|
+
* Aggregates order book volume over a configurable tick grouping.
|
|
100
|
+
*/
|
|
101
|
+
getGroupedBook(params) {
|
|
102
|
+
return this.get('0/public/GroupedBook', params);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Get Level 3 Order Book
|
|
106
|
+
*
|
|
107
|
+
* Individual order-level book data. Requires authentication.
|
|
108
|
+
*/
|
|
109
|
+
getLevel3OrderBook(params) {
|
|
110
|
+
return this.postPrivate('0/private/Level3', { body: params });
|
|
111
|
+
}
|
|
96
112
|
/**
|
|
97
113
|
* Get Recent Trades
|
|
98
114
|
*
|
|
@@ -122,6 +138,14 @@ export class SpotClient extends BaseRestClient {
|
|
|
122
138
|
getAccountBalance(params) {
|
|
123
139
|
return this.postPrivate('0/private/Balance', { body: params });
|
|
124
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* Get API Key Info
|
|
143
|
+
*
|
|
144
|
+
* Retrieve configuration and usage details for the API key used in the request.
|
|
145
|
+
*/
|
|
146
|
+
getApiKeyInfo(params) {
|
|
147
|
+
return this.postPrivate('0/private/GetApiKeyInfo', { body: params });
|
|
148
|
+
}
|
|
125
149
|
/**
|
|
126
150
|
* Get Extended Balance
|
|
127
151
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpotClient.js","sourceRoot":"","sources":["../../src/SpotClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAkB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"SpotClient.js","sourceRoot":"","sources":["../../src/SpotClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAkB,MAAM,uBAAuB,CAAC;AA2F9E;;;;;;GAMG;AACH,MAAM,OAAO,UAAW,SAAQ,cAAc;IAC5C,aAAa;QACX,2BAA2B;QAC3B,OAAO,qBAAqB,CAAC,IAAI,CAAC;IACpC,CAAC;IAED;;;;OAIG;IAEH,kBAAkB;QAChB,kEAAkE;QAClE,+CAA+C;QAC/C,MAAM,QAAQ,GAAG,kBAAkB,CAAC;QACpC,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;YAC5B,MAAM,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;QACrD,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;;OAIG;IAEH;;;;OAIG;IACH,aAAa;QAMX,OAAO,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IACnC,CAAC;IAED;;;;OAIG;IACH,eAAe;QACb,OAAO,IAAI,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;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AAE,MAAM,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;OAKG;IACH,oBAAoB;QAGlB,OAAO,IAAI,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC;IAChD,CAAC;CACF"}
|
|
@@ -19,6 +19,24 @@ export interface SpotGetOrderBookParams {
|
|
|
19
19
|
count?: number;
|
|
20
20
|
asset_class?: 'tokenized_asset';
|
|
21
21
|
}
|
|
22
|
+
export interface SpotGetGroupedBookParams {
|
|
23
|
+
pair: string;
|
|
24
|
+
depth?: 10 | 25 | 100 | 250 | 1000;
|
|
25
|
+
grouping?: 1 | 5 | 10 | 25 | 50 | 100 | 250 | 500 | 1000;
|
|
26
|
+
}
|
|
27
|
+
export interface SpotGetLevel3Params {
|
|
28
|
+
pair: string;
|
|
29
|
+
depth?: 0 | 10 | 25 | 100 | 250 | 1000;
|
|
30
|
+
}
|
|
31
|
+
export interface SpotTradeVolumePairInput {
|
|
32
|
+
asset: string;
|
|
33
|
+
aclass: 'currency' | 'forex' | 'equity' | 'equity_pair' | 'nft' | 'derivatives' | 'tokenized_asset' | 'futures_contract';
|
|
34
|
+
}
|
|
35
|
+
export interface SpotGetTradingVolumeParams {
|
|
36
|
+
pair?: string | SpotTradeVolumePairInput[];
|
|
37
|
+
fee_schedule?: boolean;
|
|
38
|
+
rebase_multiplier?: 'rebased' | 'base';
|
|
39
|
+
}
|
|
22
40
|
export interface SpotGetRecentTradesParams {
|
|
23
41
|
pair: string;
|
|
24
42
|
since?: string;
|
|
@@ -33,6 +51,9 @@ export interface SpotGetRecentSpreadsParams {
|
|
|
33
51
|
/**
|
|
34
52
|
* Account Data
|
|
35
53
|
*/
|
|
54
|
+
export interface SpotGetApiKeyInfoParams {
|
|
55
|
+
otp?: string;
|
|
56
|
+
}
|
|
36
57
|
export interface SpotGetOpenOrdersParams {
|
|
37
58
|
trades?: boolean;
|
|
38
59
|
userref?: number;
|
|
@@ -73,6 +73,27 @@ export interface SpotOrderBook {
|
|
|
73
73
|
export interface SpotOrderBookResponse {
|
|
74
74
|
[pairName: string]: SpotOrderBook;
|
|
75
75
|
}
|
|
76
|
+
export interface SpotGroupedBookLevel {
|
|
77
|
+
price: string;
|
|
78
|
+
qty: string;
|
|
79
|
+
}
|
|
80
|
+
export interface SpotGroupedBookResponse {
|
|
81
|
+
pair: string;
|
|
82
|
+
grouping: number;
|
|
83
|
+
bids: SpotGroupedBookLevel[];
|
|
84
|
+
asks: SpotGroupedBookLevel[];
|
|
85
|
+
}
|
|
86
|
+
export interface SpotLevel3OrderEntry {
|
|
87
|
+
price: string;
|
|
88
|
+
qty: string;
|
|
89
|
+
order_id: string;
|
|
90
|
+
timestamp: number;
|
|
91
|
+
}
|
|
92
|
+
export interface SpotLevel3OrderBookResponse {
|
|
93
|
+
pair: string;
|
|
94
|
+
bids: SpotLevel3OrderEntry[];
|
|
95
|
+
asks: SpotLevel3OrderEntry[];
|
|
96
|
+
}
|
|
76
97
|
export type SpotTradeData = [
|
|
77
98
|
string,
|
|
78
99
|
string,
|
|
@@ -94,6 +115,7 @@ export interface SpotRecentSpreadsResponse {
|
|
|
94
115
|
/**
|
|
95
116
|
* Account Data
|
|
96
117
|
*/
|
|
118
|
+
/** @deprecated Kraken deprecated `.F` suffixed balance assets */
|
|
97
119
|
export interface SpotAccountBalance {
|
|
98
120
|
[assetName: string]: string;
|
|
99
121
|
}
|
|
@@ -295,15 +317,56 @@ export interface SpotFeeTierInfo {
|
|
|
295
317
|
tier_volume: string | null;
|
|
296
318
|
next_volume: string | null;
|
|
297
319
|
}
|
|
320
|
+
export interface SpotTradeVolumeInputs {
|
|
321
|
+
domain_spot_volume_30d: string;
|
|
322
|
+
domain_futures_volume_30d: string;
|
|
323
|
+
domain_assets_on_platform: string;
|
|
324
|
+
}
|
|
325
|
+
export interface SpotTradeVolumeFeeScheduleTier {
|
|
326
|
+
maker_fee: string;
|
|
327
|
+
taker_fee: string;
|
|
328
|
+
min_spot_volume?: string | null;
|
|
329
|
+
min_futures_volume?: string | null;
|
|
330
|
+
min_assets_on_platform?: string | null;
|
|
331
|
+
active?: boolean | null;
|
|
332
|
+
}
|
|
333
|
+
export interface SpotTradeVolumeFeeSchedule {
|
|
334
|
+
pair: string;
|
|
335
|
+
class: 'currency' | 'forex' | 'equity' | 'equity_pair' | 'nft' | 'derivatives' | 'tokenized_asset' | 'futures_contract' | 'volume';
|
|
336
|
+
tiers: SpotTradeVolumeFeeScheduleTier[];
|
|
337
|
+
}
|
|
338
|
+
export interface SpotTradeVolumeSubaccount {
|
|
339
|
+
iiban: string;
|
|
340
|
+
volume: string;
|
|
341
|
+
}
|
|
298
342
|
export interface SpotTradeVolume {
|
|
299
343
|
currency: string;
|
|
344
|
+
asset_class?: 'currency' | 'forex' | 'equity' | 'equity_pair' | 'nft' | 'derivatives' | 'tokenized_asset' | 'futures_contract' | null;
|
|
300
345
|
volume: string;
|
|
346
|
+
inputs: SpotTradeVolumeInputs;
|
|
301
347
|
fees?: {
|
|
302
348
|
[pairName: string]: SpotFeeTierInfo;
|
|
303
|
-
};
|
|
349
|
+
} | null;
|
|
304
350
|
fees_maker?: {
|
|
305
351
|
[pairName: string]: SpotFeeTierInfo;
|
|
306
|
-
};
|
|
352
|
+
} | null;
|
|
353
|
+
volume_subaccounts?: SpotTradeVolumeSubaccount[];
|
|
354
|
+
schedules?: SpotTradeVolumeFeeSchedule[] | null;
|
|
355
|
+
}
|
|
356
|
+
export interface SpotApiKeyInfo {
|
|
357
|
+
apiKeyName: string;
|
|
358
|
+
apiKey: string;
|
|
359
|
+
nonce: string;
|
|
360
|
+
nonceWindow: number;
|
|
361
|
+
permissions: string[];
|
|
362
|
+
iban: string;
|
|
363
|
+
validUntil: string;
|
|
364
|
+
queryFrom: string;
|
|
365
|
+
queryTo: string;
|
|
366
|
+
createdTime: string;
|
|
367
|
+
modifiedTime: string;
|
|
368
|
+
ipAllowlist: string[];
|
|
369
|
+
lastUsed: string | null;
|
|
307
370
|
}
|
|
308
371
|
export interface SpotRequestExportReportResponse {
|
|
309
372
|
id: string;
|
|
@@ -31,7 +31,7 @@ export interface WSClientConfigurableOptions {
|
|
|
31
31
|
wsOptions?: {
|
|
32
32
|
protocols?: string[];
|
|
33
33
|
agent?: any;
|
|
34
|
-
} & Partial<WebSocket.ClientOptions | ClientRequestArgs
|
|
34
|
+
} & (Omit<Partial<WebSocket.ClientOptions>, 'agent'> | Omit<Partial<ClientRequestArgs>, 'agent'>);
|
|
35
35
|
wsUrl?: string;
|
|
36
36
|
/**
|
|
37
37
|
* Allows you to provide a custom "signMessage" function, e.g. to use node's much faster createHmac method
|
|
@@ -9,3 +9,17 @@ export declare const WS_DERIVATIVES_PRIVATE_TOPICS: readonly ["open_orders", "op
|
|
|
9
9
|
export type WSDerivativesPrivateTopic = (typeof WS_DERIVATIVES_PRIVATE_TOPICS)[number];
|
|
10
10
|
export type WSDerivativesTopic = WSDerivativesPublicTopic | WSDerivativesPrivateTopic;
|
|
11
11
|
export type WSTopic = WSSpotTopic | WSDerivativesTopic;
|
|
12
|
+
export interface WSSpotInstrumentSubscribeParams {
|
|
13
|
+
execution_venue?: 'international' | 'bitnomial-exchange';
|
|
14
|
+
snapshot?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface WSSpotExecutionsSubscribeParams {
|
|
17
|
+
symbol?: string[];
|
|
18
|
+
snap_trades?: boolean;
|
|
19
|
+
snapshot?: boolean;
|
|
20
|
+
rebased?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface WSSpotBalancesSubscribeParams {
|
|
23
|
+
snapshot?: boolean;
|
|
24
|
+
rebased?: boolean;
|
|
25
|
+
}
|