@siebly/kraken-api 0.0.9
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/LICENSE.md +7 -0
- package/README.md +624 -0
- package/dist/cjs/DerivativesClient.d.ts +657 -0
- package/dist/cjs/DerivativesClient.js +726 -0
- package/dist/cjs/DerivativesClient.js.map +1 -0
- package/dist/cjs/InstitutionalClient.d.ts +183 -0
- package/dist/cjs/InstitutionalClient.js +266 -0
- package/dist/cjs/InstitutionalClient.js.map +1 -0
- package/dist/cjs/PartnerClient.d.ts +257 -0
- package/dist/cjs/PartnerClient.js +344 -0
- package/dist/cjs/PartnerClient.js.map +1 -0
- package/dist/cjs/SpotClient.d.ts +547 -0
- package/dist/cjs/SpotClient.js +607 -0
- package/dist/cjs/SpotClient.js.map +1 -0
- package/dist/cjs/WebsocketAPIClient.d.ts +95 -0
- package/dist/cjs/WebsocketAPIClient.js +136 -0
- package/dist/cjs/WebsocketAPIClient.js.map +1 -0
- package/dist/cjs/WebsocketClient.d.ts +120 -0
- package/dist/cjs/WebsocketClient.js +669 -0
- package/dist/cjs/WebsocketClient.js.map +1 -0
- package/dist/cjs/index.d.ts +24 -0
- package/dist/cjs/index.js +41 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/lib/BaseRestClient.d.ts +66 -0
- package/dist/cjs/lib/BaseRestClient.js +548 -0
- package/dist/cjs/lib/BaseRestClient.js.map +1 -0
- package/dist/cjs/lib/BaseWSClient.d.ts +230 -0
- package/dist/cjs/lib/BaseWSClient.js +935 -0
- package/dist/cjs/lib/BaseWSClient.js.map +1 -0
- package/dist/cjs/lib/misc-util.d.ts +1 -0
- package/dist/cjs/lib/misc-util.js +7 -0
- package/dist/cjs/lib/misc-util.js.map +1 -0
- package/dist/cjs/lib/requestUtils.d.ts +68 -0
- package/dist/cjs/lib/requestUtils.js +82 -0
- package/dist/cjs/lib/requestUtils.js.map +1 -0
- package/dist/cjs/lib/webCryptoAPI.d.ts +15 -0
- package/dist/cjs/lib/webCryptoAPI.js +85 -0
- package/dist/cjs/lib/webCryptoAPI.js.map +1 -0
- package/dist/cjs/lib/websocket/WsStore.d.ts +75 -0
- package/dist/cjs/lib/websocket/WsStore.js +303 -0
- package/dist/cjs/lib/websocket/WsStore.js.map +1 -0
- package/dist/cjs/lib/websocket/WsStore.types.d.ts +51 -0
- package/dist/cjs/lib/websocket/WsStore.types.js +14 -0
- package/dist/cjs/lib/websocket/WsStore.types.js.map +1 -0
- package/dist/cjs/lib/websocket/logger.d.ts +7 -0
- package/dist/cjs/lib/websocket/logger.js +16 -0
- package/dist/cjs/lib/websocket/logger.js.map +1 -0
- package/dist/cjs/lib/websocket/rest-client-cache.d.ts +22 -0
- package/dist/cjs/lib/websocket/rest-client-cache.js +66 -0
- package/dist/cjs/lib/websocket/rest-client-cache.js.map +1 -0
- package/dist/cjs/lib/websocket/websocket-util.d.ts +76 -0
- package/dist/cjs/lib/websocket/websocket-util.js +59 -0
- package/dist/cjs/lib/websocket/websocket-util.js.map +1 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/types/request/derivatives.types.d.ts +186 -0
- package/dist/cjs/types/request/derivatives.types.js +6 -0
- package/dist/cjs/types/request/derivatives.types.js.map +1 -0
- package/dist/cjs/types/request/institutional.types.d.ts +313 -0
- package/dist/cjs/types/request/institutional.types.js +4 -0
- package/dist/cjs/types/request/institutional.types.js.map +1 -0
- package/dist/cjs/types/request/partner.types.d.ts +291 -0
- package/dist/cjs/types/request/partner.types.js +4 -0
- package/dist/cjs/types/request/partner.types.js.map +1 -0
- package/dist/cjs/types/request/spot.types.d.ts +324 -0
- package/dist/cjs/types/request/spot.types.js +6 -0
- package/dist/cjs/types/request/spot.types.js.map +1 -0
- package/dist/cjs/types/request/wsapi.types.d.ts +90 -0
- package/dist/cjs/types/request/wsapi.types.js +6 -0
- package/dist/cjs/types/request/wsapi.types.js.map +1 -0
- package/dist/cjs/types/response/derivatives.types.d.ts +712 -0
- package/dist/cjs/types/response/derivatives.types.js +6 -0
- package/dist/cjs/types/response/derivatives.types.js.map +1 -0
- package/dist/cjs/types/response/institutional.types.d.ts +318 -0
- package/dist/cjs/types/response/institutional.types.js +4 -0
- package/dist/cjs/types/response/institutional.types.js.map +1 -0
- package/dist/cjs/types/response/partner.types.d.ts +332 -0
- package/dist/cjs/types/response/partner.types.js +4 -0
- package/dist/cjs/types/response/partner.types.js.map +1 -0
- package/dist/cjs/types/response/shared.types.d.ts +27 -0
- package/dist/cjs/types/response/shared.types.js +3 -0
- package/dist/cjs/types/response/shared.types.js.map +1 -0
- package/dist/cjs/types/response/spot.types.d.ts +590 -0
- package/dist/cjs/types/response/spot.types.js +6 -0
- package/dist/cjs/types/response/spot.types.js.map +1 -0
- package/dist/cjs/types/response/ws.d.ts +11 -0
- package/dist/cjs/types/response/ws.js +3 -0
- package/dist/cjs/types/response/ws.js.map +1 -0
- package/dist/cjs/types/response/wsapi.types.d.ts +44 -0
- package/dist/cjs/types/response/wsapi.types.js +6 -0
- package/dist/cjs/types/response/wsapi.types.js.map +1 -0
- package/dist/cjs/types/websockets/ws-api.d.ts +71 -0
- package/dist/cjs/types/websockets/ws-api.js +18 -0
- package/dist/cjs/types/websockets/ws-api.js.map +1 -0
- package/dist/cjs/types/websockets/ws-events.d.ts +11 -0
- package/dist/cjs/types/websockets/ws-events.js +11 -0
- package/dist/cjs/types/websockets/ws-events.js.map +1 -0
- package/dist/cjs/types/websockets/ws-general.d.ts +67 -0
- package/dist/cjs/types/websockets/ws-general.js +3 -0
- package/dist/cjs/types/websockets/ws-general.js.map +1 -0
- package/dist/cjs/types/websockets/ws-subscriptions.d.ts +11 -0
- package/dist/cjs/types/websockets/ws-subscriptions.js +31 -0
- package/dist/cjs/types/websockets/ws-subscriptions.js.map +1 -0
- package/dist/mjs/DerivativesClient.d.ts +657 -0
- package/dist/mjs/DerivativesClient.js +722 -0
- package/dist/mjs/DerivativesClient.js.map +1 -0
- package/dist/mjs/InstitutionalClient.d.ts +183 -0
- package/dist/mjs/InstitutionalClient.js +262 -0
- package/dist/mjs/InstitutionalClient.js.map +1 -0
- package/dist/mjs/PartnerClient.d.ts +257 -0
- package/dist/mjs/PartnerClient.js +340 -0
- package/dist/mjs/PartnerClient.js.map +1 -0
- package/dist/mjs/SpotClient.d.ts +547 -0
- package/dist/mjs/SpotClient.js +603 -0
- package/dist/mjs/SpotClient.js.map +1 -0
- package/dist/mjs/WebsocketAPIClient.d.ts +95 -0
- package/dist/mjs/WebsocketAPIClient.js +132 -0
- package/dist/mjs/WebsocketAPIClient.js.map +1 -0
- package/dist/mjs/WebsocketClient.d.ts +120 -0
- package/dist/mjs/WebsocketClient.js +665 -0
- package/dist/mjs/WebsocketClient.js.map +1 -0
- package/dist/mjs/index.d.ts +24 -0
- package/dist/mjs/index.js +25 -0
- package/dist/mjs/index.js.map +1 -0
- package/dist/mjs/lib/BaseRestClient.d.ts +66 -0
- package/dist/mjs/lib/BaseRestClient.js +541 -0
- package/dist/mjs/lib/BaseRestClient.js.map +1 -0
- package/dist/mjs/lib/BaseWSClient.d.ts +230 -0
- package/dist/mjs/lib/BaseWSClient.js +928 -0
- package/dist/mjs/lib/BaseWSClient.js.map +1 -0
- package/dist/mjs/lib/misc-util.d.ts +1 -0
- package/dist/mjs/lib/misc-util.js +4 -0
- package/dist/mjs/lib/misc-util.js.map +1 -0
- package/dist/mjs/lib/requestUtils.d.ts +68 -0
- package/dist/mjs/lib/requestUtils.js +76 -0
- package/dist/mjs/lib/requestUtils.js.map +1 -0
- package/dist/mjs/lib/webCryptoAPI.d.ts +15 -0
- package/dist/mjs/lib/webCryptoAPI.js +80 -0
- package/dist/mjs/lib/webCryptoAPI.js.map +1 -0
- package/dist/mjs/lib/websocket/WsStore.d.ts +75 -0
- package/dist/mjs/lib/websocket/WsStore.js +298 -0
- package/dist/mjs/lib/websocket/WsStore.js.map +1 -0
- package/dist/mjs/lib/websocket/WsStore.types.d.ts +51 -0
- package/dist/mjs/lib/websocket/WsStore.types.js +11 -0
- package/dist/mjs/lib/websocket/WsStore.types.js.map +1 -0
- package/dist/mjs/lib/websocket/logger.d.ts +7 -0
- package/dist/mjs/lib/websocket/logger.js +13 -0
- package/dist/mjs/lib/websocket/logger.js.map +1 -0
- package/dist/mjs/lib/websocket/rest-client-cache.d.ts +22 -0
- package/dist/mjs/lib/websocket/rest-client-cache.js +62 -0
- package/dist/mjs/lib/websocket/rest-client-cache.js.map +1 -0
- package/dist/mjs/lib/websocket/websocket-util.d.ts +76 -0
- package/dist/mjs/lib/websocket/websocket-util.js +54 -0
- package/dist/mjs/lib/websocket/websocket-util.js.map +1 -0
- package/dist/mjs/package.json +3 -0
- package/dist/mjs/types/request/derivatives.types.d.ts +186 -0
- package/dist/mjs/types/request/derivatives.types.js +5 -0
- package/dist/mjs/types/request/derivatives.types.js.map +1 -0
- package/dist/mjs/types/request/institutional.types.d.ts +313 -0
- package/dist/mjs/types/request/institutional.types.js +3 -0
- package/dist/mjs/types/request/institutional.types.js.map +1 -0
- package/dist/mjs/types/request/partner.types.d.ts +291 -0
- package/dist/mjs/types/request/partner.types.js +3 -0
- package/dist/mjs/types/request/partner.types.js.map +1 -0
- package/dist/mjs/types/request/spot.types.d.ts +324 -0
- package/dist/mjs/types/request/spot.types.js +5 -0
- package/dist/mjs/types/request/spot.types.js.map +1 -0
- package/dist/mjs/types/request/wsapi.types.d.ts +90 -0
- package/dist/mjs/types/request/wsapi.types.js +5 -0
- package/dist/mjs/types/request/wsapi.types.js.map +1 -0
- package/dist/mjs/types/response/derivatives.types.d.ts +712 -0
- package/dist/mjs/types/response/derivatives.types.js +5 -0
- package/dist/mjs/types/response/derivatives.types.js.map +1 -0
- package/dist/mjs/types/response/institutional.types.d.ts +318 -0
- package/dist/mjs/types/response/institutional.types.js +3 -0
- package/dist/mjs/types/response/institutional.types.js.map +1 -0
- package/dist/mjs/types/response/partner.types.d.ts +332 -0
- package/dist/mjs/types/response/partner.types.js +3 -0
- package/dist/mjs/types/response/partner.types.js.map +1 -0
- package/dist/mjs/types/response/shared.types.d.ts +27 -0
- package/dist/mjs/types/response/shared.types.js +2 -0
- package/dist/mjs/types/response/shared.types.js.map +1 -0
- package/dist/mjs/types/response/spot.types.d.ts +590 -0
- package/dist/mjs/types/response/spot.types.js +5 -0
- package/dist/mjs/types/response/spot.types.js.map +1 -0
- package/dist/mjs/types/response/ws.d.ts +11 -0
- package/dist/mjs/types/response/ws.js +2 -0
- package/dist/mjs/types/response/ws.js.map +1 -0
- package/dist/mjs/types/response/wsapi.types.d.ts +44 -0
- package/dist/mjs/types/response/wsapi.types.js +5 -0
- package/dist/mjs/types/response/wsapi.types.js.map +1 -0
- package/dist/mjs/types/websockets/ws-api.d.ts +71 -0
- package/dist/mjs/types/websockets/ws-api.js +15 -0
- package/dist/mjs/types/websockets/ws-api.js.map +1 -0
- package/dist/mjs/types/websockets/ws-events.d.ts +11 -0
- package/dist/mjs/types/websockets/ws-events.js +8 -0
- package/dist/mjs/types/websockets/ws-events.js.map +1 -0
- package/dist/mjs/types/websockets/ws-general.d.ts +67 -0
- package/dist/mjs/types/websockets/ws-general.js +2 -0
- package/dist/mjs/types/websockets/ws-general.js.map +1 -0
- package/dist/mjs/types/websockets/ws-subscriptions.d.ts +11 -0
- package/dist/mjs/types/websockets/ws-subscriptions.js +28 -0
- package/dist/mjs/types/websockets/ws-subscriptions.js.map +1 -0
- package/llms.txt +10925 -0
- package/package.json +89 -0
|
@@ -0,0 +1,547 @@
|
|
|
1
|
+
import { BaseRestClient } from './lib/BaseRestClient.js';
|
|
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';
|
|
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';
|
|
6
|
+
/**
|
|
7
|
+
* The SpotClient provides integration to the Kraken Spot API.
|
|
8
|
+
*
|
|
9
|
+
* Docs:
|
|
10
|
+
* - https://docs.kraken.com/api/docs/guides/spot-rest-intro/
|
|
11
|
+
* - https://docs.kraken.com/api/docs/rest-api/get-server-time
|
|
12
|
+
*/
|
|
13
|
+
export declare class SpotClient extends BaseRestClient {
|
|
14
|
+
getClientType(): RestClientType;
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* Misc Utility Methods
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
generateNewOrderID(): string;
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* Spot REST API - Market Data
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* Get Server Time
|
|
28
|
+
*
|
|
29
|
+
* Get the server's time.
|
|
30
|
+
*/
|
|
31
|
+
getServerTime(): Promise<SpotAPISuccessResponse<{
|
|
32
|
+
unixtime: number;
|
|
33
|
+
rfc1123: string;
|
|
34
|
+
}>>;
|
|
35
|
+
/**
|
|
36
|
+
* Get System Status
|
|
37
|
+
*
|
|
38
|
+
* Get the current system status or trading mode.
|
|
39
|
+
*/
|
|
40
|
+
getSystemStatus(): Promise<SpotAPISuccessResponse<SpotSystemStatus>>;
|
|
41
|
+
/**
|
|
42
|
+
* Get Asset Info
|
|
43
|
+
*
|
|
44
|
+
* Get information about the assets that are available for deposit, withdrawal, trading and earn.
|
|
45
|
+
*/
|
|
46
|
+
getAssetInfo(params?: {
|
|
47
|
+
asset?: string;
|
|
48
|
+
aclass?: 'currency' | 'tokenized_asset';
|
|
49
|
+
}): Promise<SpotAPISuccessResponse<Record<string, SpotAssetInfo>>>;
|
|
50
|
+
/**
|
|
51
|
+
* Get Tradable Asset Pairs
|
|
52
|
+
*
|
|
53
|
+
* Get tradable asset pairs
|
|
54
|
+
*/
|
|
55
|
+
getAssetPairs(params?: SpotGetAssetPairsParams): Promise<SpotAPISuccessResponse<Record<string, SpotAssetPair>>>;
|
|
56
|
+
/**
|
|
57
|
+
* Get Ticker Information
|
|
58
|
+
*
|
|
59
|
+
* Get ticker information for all or requested markets.
|
|
60
|
+
* Note: Today's prices start at midnight UTC.
|
|
61
|
+
* Leaving the pair parameter blank will return tickers for all tradeable assets on Kraken.
|
|
62
|
+
*/
|
|
63
|
+
getTicker(params?: {
|
|
64
|
+
pair?: string;
|
|
65
|
+
asset_class?: 'tokenized_asset' | 'forex';
|
|
66
|
+
}): Promise<SpotAPISuccessResponse<Record<string, SpotAssetTickerInfo>>>;
|
|
67
|
+
/**
|
|
68
|
+
* Get OHLC Data
|
|
69
|
+
*
|
|
70
|
+
* Retrieve OHLC market data. The last entry in the OHLC array is for the current, not-yet-committed timeframe,
|
|
71
|
+
* and will always be present, regardless of the value of since. Returns up to 720 of the most recent entries
|
|
72
|
+
* (older data cannot be retrieved, regardless of the value of since).
|
|
73
|
+
*/
|
|
74
|
+
getCandles(params: SpotGetOHLCParams): Promise<SpotAPISuccessResponse<SpotOHLCResponse>>;
|
|
75
|
+
/**
|
|
76
|
+
* Get Order Book
|
|
77
|
+
*
|
|
78
|
+
* Returns level 2 (L2) order book, which describes the individual price levels in the book with aggregated
|
|
79
|
+
* order quantities at each level.
|
|
80
|
+
*/
|
|
81
|
+
getOrderBook(params: SpotGetOrderBookParams): Promise<SpotAPISuccessResponse<SpotOrderBookResponse>>;
|
|
82
|
+
/**
|
|
83
|
+
* Get Recent Trades
|
|
84
|
+
*
|
|
85
|
+
* Returns the last 1000 trades by default
|
|
86
|
+
*/
|
|
87
|
+
getRecentTrades(params: SpotGetRecentTradesParams): Promise<SpotAPISuccessResponse<SpotRecentTradesResponse>>;
|
|
88
|
+
/**
|
|
89
|
+
* Get Recent Spreads
|
|
90
|
+
*
|
|
91
|
+
* Returns the last ~200 top-of-book spreads for a given pair
|
|
92
|
+
*/
|
|
93
|
+
getRecentSpreads(params: SpotGetRecentSpreadsParams): Promise<SpotAPISuccessResponse<SpotRecentSpreadsResponse>>;
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
* Spot REST API - Account Data
|
|
97
|
+
*
|
|
98
|
+
*/
|
|
99
|
+
/**
|
|
100
|
+
* Get Account Balance
|
|
101
|
+
*
|
|
102
|
+
* Retrieve all cash balances, net of pending withdrawals.
|
|
103
|
+
*/
|
|
104
|
+
getAccountBalance(params?: {
|
|
105
|
+
rebase_multiplier?: 'rebased' | 'base';
|
|
106
|
+
}): Promise<SpotAPISuccessResponse<SpotAccountBalance>>;
|
|
107
|
+
/**
|
|
108
|
+
* Get Extended Balance
|
|
109
|
+
*
|
|
110
|
+
* Retrieve all extended account balances, including credits and held amounts.
|
|
111
|
+
* Balance available for trading is calculated as: available balance = balance + credit - credit_used - hold_trade
|
|
112
|
+
*/
|
|
113
|
+
getExtendedBalance(params?: {
|
|
114
|
+
rebase_multiplier?: 'rebased' | 'base';
|
|
115
|
+
}): Promise<SpotAPISuccessResponse<SpotExtendedBalance>>;
|
|
116
|
+
/**
|
|
117
|
+
* Get Credit Lines
|
|
118
|
+
*
|
|
119
|
+
* Retrieve all credit line details for VIPs with this functionality.
|
|
120
|
+
*/
|
|
121
|
+
getCreditLines(params?: {
|
|
122
|
+
rebase_multiplier?: 'rebased' | 'base';
|
|
123
|
+
}): Promise<SpotAPISuccessResponse<SpotCreditLines | null>>;
|
|
124
|
+
/**
|
|
125
|
+
* Get Trade Balance
|
|
126
|
+
*
|
|
127
|
+
* Retrieve a summary of collateral balances, margin position valuations, equity and margin level.
|
|
128
|
+
*/
|
|
129
|
+
getTradeBalance(params?: {
|
|
130
|
+
rebase_multiplier?: 'rebased' | 'base';
|
|
131
|
+
}): Promise<SpotAPISuccessResponse<SpotTradeBalance>>;
|
|
132
|
+
/**
|
|
133
|
+
* Get Open Orders
|
|
134
|
+
*
|
|
135
|
+
* Retrieve information about currently open orders.
|
|
136
|
+
*/
|
|
137
|
+
getOpenOrders(params?: SpotGetOpenOrdersParams): Promise<SpotAPISuccessResponse<SpotOpenOrdersResponse>>;
|
|
138
|
+
/**
|
|
139
|
+
* Get Closed Orders
|
|
140
|
+
*
|
|
141
|
+
* Retrieve information about orders that have been closed (filled or cancelled).
|
|
142
|
+
* 50 results are returned at a time, the most recent by default.
|
|
143
|
+
*/
|
|
144
|
+
getClosedOrders(params?: SpotGetClosedOrdersParams): Promise<SpotAPISuccessResponse<SpotClosedOrdersResponse>>;
|
|
145
|
+
/**
|
|
146
|
+
* Query Orders Info
|
|
147
|
+
*
|
|
148
|
+
* Retrieve information about specific orders.
|
|
149
|
+
*/
|
|
150
|
+
getOrders(params: SpotQueryOrdersParams): Promise<SpotAPISuccessResponse<SpotQueryOrdersResponse>>;
|
|
151
|
+
/**
|
|
152
|
+
* Get Order Amends
|
|
153
|
+
*
|
|
154
|
+
* Retrieves an audit trail of amend transactions on the specified order.
|
|
155
|
+
* The list is ordered by ascending amend timestamp.
|
|
156
|
+
*/
|
|
157
|
+
getOrderAmends(params: {
|
|
158
|
+
order_id: string;
|
|
159
|
+
rebase_multiplier?: 'rebased' | 'base';
|
|
160
|
+
}): Promise<SpotAPISuccessResponse<SpotOrderAmendsResponse>>;
|
|
161
|
+
/**
|
|
162
|
+
* Get Trades History
|
|
163
|
+
*
|
|
164
|
+
* Retrieve information about trades/fills. 50 results are returned at a time, the most recent by default.
|
|
165
|
+
*/
|
|
166
|
+
getTradesHistory(params?: SpotGetTradesHistoryParams): Promise<SpotAPISuccessResponse<SpotTradesHistoryResponse>>;
|
|
167
|
+
/**
|
|
168
|
+
* Query Trades Info
|
|
169
|
+
*
|
|
170
|
+
* Retrieve information about specific trades/fills.
|
|
171
|
+
*/
|
|
172
|
+
getTrades(params: SpotQueryTradesParams): Promise<SpotAPISuccessResponse<SpotQueryTradesResponse>>;
|
|
173
|
+
/**
|
|
174
|
+
* Get Open Positions
|
|
175
|
+
*
|
|
176
|
+
* Get information about open margin positions.
|
|
177
|
+
*/
|
|
178
|
+
getOpenPositions(params?: SpotGetOpenPositionsParams): Promise<SpotAPISuccessResponse<SpotOpenPositionsResponse>>;
|
|
179
|
+
/**
|
|
180
|
+
* Get Ledgers Info
|
|
181
|
+
*
|
|
182
|
+
* Retrieve information about ledger entries. 50 results are returned at a time, the most recent by default.
|
|
183
|
+
*/
|
|
184
|
+
getLedgersInfo(params?: SpotGetLedgersInfoParams): Promise<SpotAPISuccessResponse<SpotLedgersInfoResponse>>;
|
|
185
|
+
/**
|
|
186
|
+
* Query Ledgers
|
|
187
|
+
*
|
|
188
|
+
* Retrieve information about specific ledger entries.
|
|
189
|
+
*/
|
|
190
|
+
getLedgers(params: SpotQueryLedgersParams): Promise<SpotAPISuccessResponse<SpotQueryLedgersResponse>>;
|
|
191
|
+
/**
|
|
192
|
+
* Get Trade Volume
|
|
193
|
+
*
|
|
194
|
+
* Returns 30 day USD trading volume and resulting fee schedule for any asset pair(s) provided.
|
|
195
|
+
*/
|
|
196
|
+
getTradingVolume(params?: {
|
|
197
|
+
pair?: string;
|
|
198
|
+
rebase_multiplier?: 'rebased' | 'base';
|
|
199
|
+
}): Promise<SpotAPISuccessResponse<SpotTradeVolume>>;
|
|
200
|
+
/**
|
|
201
|
+
* Request Export Report
|
|
202
|
+
*
|
|
203
|
+
* Request export of trades or ledgers.
|
|
204
|
+
*/
|
|
205
|
+
requestLedgersExport(params: SpotRequestExportReportParams): Promise<SpotAPISuccessResponse<SpotRequestExportReportResponse>>;
|
|
206
|
+
/**
|
|
207
|
+
* Get Export Report Status
|
|
208
|
+
*
|
|
209
|
+
* Get status of requested data exports.
|
|
210
|
+
*/
|
|
211
|
+
getLedgersExportStatus(params: {
|
|
212
|
+
report: 'trades' | 'ledgers';
|
|
213
|
+
}): Promise<SpotAPISuccessResponse<SpotExportReportStatus[]>>;
|
|
214
|
+
/**
|
|
215
|
+
* Retrieve Data Export
|
|
216
|
+
*
|
|
217
|
+
* Retrieve a processed data export (binary zip archive).
|
|
218
|
+
*/
|
|
219
|
+
getLedgersExport(params: {
|
|
220
|
+
id: string;
|
|
221
|
+
}): Promise<any>;
|
|
222
|
+
/**
|
|
223
|
+
* Delete Export Report
|
|
224
|
+
*
|
|
225
|
+
* Delete or cancel exported trades/ledgers report.
|
|
226
|
+
*/
|
|
227
|
+
deleteLedgersExport(params: {
|
|
228
|
+
id: string;
|
|
229
|
+
type: 'cancel' | 'delete';
|
|
230
|
+
}): Promise<SpotAPISuccessResponse<SpotDeleteExportReportResponse>>;
|
|
231
|
+
/**
|
|
232
|
+
*
|
|
233
|
+
* Spot REST API - Trading
|
|
234
|
+
*
|
|
235
|
+
*/
|
|
236
|
+
/**
|
|
237
|
+
* Add Order
|
|
238
|
+
*
|
|
239
|
+
* Place a new order.
|
|
240
|
+
* Note: See the getAssetPairs() endpoint for details on the available trading pairs, their price and quantity precisions,
|
|
241
|
+
* order minimums, available leverage, etc.
|
|
242
|
+
*/
|
|
243
|
+
submitOrder(params: SpotSubmitOrderParams): Promise<SpotAPISuccessResponse<SpotSubmitOrderResponse>>;
|
|
244
|
+
/**
|
|
245
|
+
* Amend Order
|
|
246
|
+
*
|
|
247
|
+
* Amend an existing order. The order identifiers assigned by Kraken and/or client will stay the same.
|
|
248
|
+
* Queue priority in the order book will be maintained where possible.
|
|
249
|
+
*/
|
|
250
|
+
amendOrder(params: SpotAmendOrderParams): Promise<SpotAPISuccessResponse<{
|
|
251
|
+
amend_id: string;
|
|
252
|
+
}>>;
|
|
253
|
+
/**
|
|
254
|
+
* Cancel Order
|
|
255
|
+
*
|
|
256
|
+
* Cancel a particular open order (or set of open orders) by txid, userref or cl_ord_id.
|
|
257
|
+
*/
|
|
258
|
+
cancelOrder(params: {
|
|
259
|
+
txid?: string | number;
|
|
260
|
+
cl_ord_id?: string;
|
|
261
|
+
}): Promise<SpotAPISuccessResponse<{
|
|
262
|
+
count: number;
|
|
263
|
+
pending?: boolean;
|
|
264
|
+
}>>;
|
|
265
|
+
/**
|
|
266
|
+
* Cancel All Orders
|
|
267
|
+
*
|
|
268
|
+
* Cancel all open orders.
|
|
269
|
+
*/
|
|
270
|
+
cancelAllOrders(): Promise<SpotAPISuccessResponse<{
|
|
271
|
+
count: number;
|
|
272
|
+
pending: boolean;
|
|
273
|
+
}>>;
|
|
274
|
+
/**
|
|
275
|
+
* Cancel All Orders After X
|
|
276
|
+
*
|
|
277
|
+
* CancelAllOrdersAfter provides a "Dead Man's Switch" mechanism to protect the client from network malfunction,
|
|
278
|
+
* extreme latency or unexpected matching engine downtime. The client can send a request with a timeout (in seconds),
|
|
279
|
+
* that will start a countdown timer which will cancel all client orders when the timer expires.
|
|
280
|
+
*/
|
|
281
|
+
cancelAllOrdersAfter(params: {
|
|
282
|
+
timeout: number;
|
|
283
|
+
}): Promise<SpotAPISuccessResponse<{
|
|
284
|
+
currentTime: string;
|
|
285
|
+
triggerTime: string;
|
|
286
|
+
}>>;
|
|
287
|
+
/**
|
|
288
|
+
* Get Websockets Token
|
|
289
|
+
*
|
|
290
|
+
* An authentication token must be requested via this REST API endpoint in order to connect to and authenticate
|
|
291
|
+
* with the Websockets API. The token should be used within 15 minutes of creation.
|
|
292
|
+
*/
|
|
293
|
+
getWebSocketsToken(): Promise<SpotAPISuccessResponse<SpotWebSocketsTokenResponse>>;
|
|
294
|
+
/**
|
|
295
|
+
* Add Order Batch
|
|
296
|
+
*
|
|
297
|
+
* Sends a collection of orders (minimum of 2 and maximum 15). All orders in batch are limited to a single pair.
|
|
298
|
+
* Validation is performed on the whole batch prior to submission. If an order fails validation, the whole batch will be rejected.
|
|
299
|
+
*/
|
|
300
|
+
submitBatchOrders(params: SpotSubmitOrderBatchParams): Promise<SpotAPISuccessResponse<{
|
|
301
|
+
orders: SpotBatchOrderResult[];
|
|
302
|
+
}>>;
|
|
303
|
+
/**
|
|
304
|
+
* Cancel Order Batch
|
|
305
|
+
*
|
|
306
|
+
* Cancel multiple open orders by txid, userref or cl_ord_id (maximum 50 total unique IDs/references).
|
|
307
|
+
*/
|
|
308
|
+
cancelBatchOrders(params: {
|
|
309
|
+
orders?: Array<string | number>;
|
|
310
|
+
cl_ord_ids?: string[];
|
|
311
|
+
}): Promise<SpotAPISuccessResponse<{
|
|
312
|
+
count: number;
|
|
313
|
+
}>>;
|
|
314
|
+
/**
|
|
315
|
+
*
|
|
316
|
+
* Spot REST API - Funding
|
|
317
|
+
*
|
|
318
|
+
*/
|
|
319
|
+
/**
|
|
320
|
+
* Get Deposit Methods
|
|
321
|
+
*
|
|
322
|
+
* Retrieve methods available for depositing a particular asset.
|
|
323
|
+
*/
|
|
324
|
+
getDepositMethods(params: SpotGetDepositMethodsParams): Promise<SpotAPISuccessResponse<SpotDepositMethod[]>>;
|
|
325
|
+
/**
|
|
326
|
+
* Get Deposit Addresses
|
|
327
|
+
*
|
|
328
|
+
* Retrieve (or generate a new) deposit addresses for a particular asset and method.
|
|
329
|
+
*/
|
|
330
|
+
getDepositAddresses(params: SpotGetDepositAddressesParams): Promise<SpotAPISuccessResponse<SpotDepositAddress[]>>;
|
|
331
|
+
/**
|
|
332
|
+
* Get Status of Recent Deposits
|
|
333
|
+
*
|
|
334
|
+
* Retrieve information about recent deposits. Results are sorted by recency.
|
|
335
|
+
*/
|
|
336
|
+
getDepositsStatus(params?: SpotGetDepositStatusParams): Promise<SpotAPISuccessResponse<SpotDepositStatusResponse>>;
|
|
337
|
+
/**
|
|
338
|
+
* Get Withdrawal Methods
|
|
339
|
+
*
|
|
340
|
+
* Retrieve a list of withdrawal methods available for the user.
|
|
341
|
+
*/
|
|
342
|
+
getWithdrawalMethods(params?: SpotGetWithdrawalMethodsParams): Promise<SpotAPISuccessResponse<SpotWithdrawalMethod[]>>;
|
|
343
|
+
/**
|
|
344
|
+
* Get Withdrawal Addresses
|
|
345
|
+
*
|
|
346
|
+
* Retrieve a list of withdrawal addresses available for the user.
|
|
347
|
+
*/
|
|
348
|
+
getWithdrawalAddresses(params?: SpotGetWithdrawalAddressesParams): Promise<SpotAPISuccessResponse<SpotWithdrawalAddress[]>>;
|
|
349
|
+
/**
|
|
350
|
+
* Get Withdrawal Information
|
|
351
|
+
*
|
|
352
|
+
* Retrieve fee information about potential withdrawals for a particular asset, key and amount.
|
|
353
|
+
*/
|
|
354
|
+
getWithdrawalInfo(params: SpotGetWithdrawalInfoParams): Promise<SpotAPISuccessResponse<SpotWithdrawalInfo>>;
|
|
355
|
+
/**
|
|
356
|
+
* Withdraw Funds
|
|
357
|
+
*
|
|
358
|
+
* Make a withdrawal request.
|
|
359
|
+
*/
|
|
360
|
+
submitWithdrawal(params: SpotWithdrawFundsParams): Promise<SpotAPISuccessResponse<{
|
|
361
|
+
refid: string;
|
|
362
|
+
}>>;
|
|
363
|
+
/**
|
|
364
|
+
* Get Status of Recent Withdrawals
|
|
365
|
+
*
|
|
366
|
+
* Retrieve information about recent withdrawals. Results are sorted by recency.
|
|
367
|
+
*/
|
|
368
|
+
getWithdrawalsStatus(params?: SpotGetWithdrawalsStatusParams): Promise<SpotAPISuccessResponse<SpotWithdrawalStatus[]>>;
|
|
369
|
+
/**
|
|
370
|
+
* Request Withdrawal Cancellation
|
|
371
|
+
*
|
|
372
|
+
* Cancel a recently requested withdrawal, if it has not already been successfully processed.
|
|
373
|
+
*/
|
|
374
|
+
cancelWithdrawal(params: {
|
|
375
|
+
asset: string;
|
|
376
|
+
refid: string;
|
|
377
|
+
}): Promise<SpotAPISuccessResponse<boolean>>;
|
|
378
|
+
/**
|
|
379
|
+
* Request Wallet Transfer
|
|
380
|
+
*
|
|
381
|
+
* Transfer from a Kraken spot wallet to a Kraken Futures wallet.
|
|
382
|
+
* Note: Transfer in the other direction must be requested via the Kraken Futures API.
|
|
383
|
+
*/
|
|
384
|
+
submitTransferToFutures(params: SpotWalletTransferParams): Promise<SpotAPISuccessResponse<{
|
|
385
|
+
refid: string;
|
|
386
|
+
}>>;
|
|
387
|
+
/**
|
|
388
|
+
*
|
|
389
|
+
* Subaccounts
|
|
390
|
+
*
|
|
391
|
+
*/
|
|
392
|
+
/**
|
|
393
|
+
* Create Subaccount
|
|
394
|
+
*
|
|
395
|
+
* Create a trading subaccount.
|
|
396
|
+
* Note: CreateSubaccount must be called using an API key from the master account.
|
|
397
|
+
*/
|
|
398
|
+
createSubaccount(params: {
|
|
399
|
+
username: string;
|
|
400
|
+
email: string;
|
|
401
|
+
}): Promise<SpotAPISuccessResponse<boolean>>;
|
|
402
|
+
/**
|
|
403
|
+
* Account Transfer
|
|
404
|
+
*
|
|
405
|
+
* Transfer funds to and from master and subaccounts.
|
|
406
|
+
* Note: AccountTransfer must be called using an API key from the master account.
|
|
407
|
+
*/
|
|
408
|
+
submitSubaccountTransfer(params: SpotAccountTransferParams): Promise<SpotAPISuccessResponse<SpotAccountTransferResponse>>;
|
|
409
|
+
/**
|
|
410
|
+
*
|
|
411
|
+
* Earn
|
|
412
|
+
*
|
|
413
|
+
*/
|
|
414
|
+
/**
|
|
415
|
+
* Allocate Earn Funds
|
|
416
|
+
*
|
|
417
|
+
* Allocate funds to the Strategy.
|
|
418
|
+
* This method is asynchronous. Use getAllocationStatus() to poll the result.
|
|
419
|
+
*/
|
|
420
|
+
allocateEarnFunds(params: {
|
|
421
|
+
amount: string;
|
|
422
|
+
strategy_id: string;
|
|
423
|
+
}): Promise<SpotAPISuccessResponse<boolean>>;
|
|
424
|
+
/**
|
|
425
|
+
* Deallocate Earn Funds
|
|
426
|
+
*
|
|
427
|
+
* Deallocate funds from a strategy.
|
|
428
|
+
* This method is asynchronous. Use getDeallocationStatus() to poll the result.
|
|
429
|
+
*/
|
|
430
|
+
deallocateEarnFunds(params: {
|
|
431
|
+
amount: string;
|
|
432
|
+
strategy_id: string;
|
|
433
|
+
}): Promise<SpotAPISuccessResponse<boolean>>;
|
|
434
|
+
/**
|
|
435
|
+
* Get Allocation Status
|
|
436
|
+
*
|
|
437
|
+
* Get the status of the last allocation request.
|
|
438
|
+
*/
|
|
439
|
+
getEarnAllocationStatus(params: {
|
|
440
|
+
strategy_id: string;
|
|
441
|
+
}): Promise<SpotAPISuccessResponse<{
|
|
442
|
+
pending: boolean;
|
|
443
|
+
}>>;
|
|
444
|
+
/**
|
|
445
|
+
* Get Deallocation Status
|
|
446
|
+
*
|
|
447
|
+
* Get the status of the last deallocation request.
|
|
448
|
+
*/
|
|
449
|
+
getEarnDeallocationStatus(params: {
|
|
450
|
+
strategy_id: string;
|
|
451
|
+
}): Promise<SpotAPISuccessResponse<{
|
|
452
|
+
pending: boolean;
|
|
453
|
+
}>>;
|
|
454
|
+
/**
|
|
455
|
+
* List Earn Strategies
|
|
456
|
+
*
|
|
457
|
+
* List earn strategies along with their parameters.
|
|
458
|
+
* Returns only strategies that are available to the user based on geographic region.
|
|
459
|
+
*/
|
|
460
|
+
getEarnStrategies(params?: SpotListEarnStrategiesParams): Promise<SpotAPISuccessResponse<{
|
|
461
|
+
items: SpotEarnStrategy[];
|
|
462
|
+
next_cursor?: string;
|
|
463
|
+
}>>;
|
|
464
|
+
/**
|
|
465
|
+
* List Earn Allocations
|
|
466
|
+
*
|
|
467
|
+
* List all allocations for the user.
|
|
468
|
+
* By default all allocations are returned, even for strategies that have been used in the past and have zero balance now.
|
|
469
|
+
*/
|
|
470
|
+
getEarnAllocations(params?: SpotListEarnAllocationsParams): Promise<SpotAPISuccessResponse<SpotListEarnAllocationsResponse>>;
|
|
471
|
+
/**
|
|
472
|
+
*
|
|
473
|
+
* Transparency
|
|
474
|
+
*
|
|
475
|
+
*/
|
|
476
|
+
/**
|
|
477
|
+
* Pre-Trade Data
|
|
478
|
+
*
|
|
479
|
+
* Returns the price levels in the order book with aggregated order quantities at each price level.
|
|
480
|
+
* The top 10 levels are returned for each trading pair.
|
|
481
|
+
*/
|
|
482
|
+
getPreTradeData(params: {
|
|
483
|
+
symbol: string;
|
|
484
|
+
}): Promise<SpotAPISuccessResponse<SpotPreTradeData>>;
|
|
485
|
+
/**
|
|
486
|
+
* Post-Trade Data
|
|
487
|
+
*
|
|
488
|
+
* Returns a list of trades on the spot exchange.
|
|
489
|
+
* If no filter parameters are specified, the last 1000 trades for all pairs are received.
|
|
490
|
+
*/
|
|
491
|
+
getPostTradeData(params?: SpotGetPostTradeDataParams): Promise<SpotAPISuccessResponse<SpotPostTradeDataResponse>>;
|
|
492
|
+
/**
|
|
493
|
+
*
|
|
494
|
+
* Spot REST API - OAuth
|
|
495
|
+
*
|
|
496
|
+
*/
|
|
497
|
+
/**
|
|
498
|
+
* Get Access Token
|
|
499
|
+
*
|
|
500
|
+
* Retrieve the access token.
|
|
501
|
+
* Note: This endpoint uses Basic authentication (Authorization header with base64-encoded client credentials).
|
|
502
|
+
*/
|
|
503
|
+
getOAuthAccessToken(params: OauthGetAccessTokenParams): Promise<OauthGetAccessTokenResponse>;
|
|
504
|
+
/**
|
|
505
|
+
* Get User Info
|
|
506
|
+
*
|
|
507
|
+
* Returns the email address and IIBAN of the user.
|
|
508
|
+
* Note: Requires OAuth2 Bearer token. Scopes required: account.info:basic
|
|
509
|
+
*/
|
|
510
|
+
getOAuthUserInfo(): Promise<OauthGetUserInfoResponse>;
|
|
511
|
+
/**
|
|
512
|
+
* Create Fast API Key
|
|
513
|
+
*
|
|
514
|
+
* Creates a Fast API key.
|
|
515
|
+
* Note: Requires OAuth2 Bearer token. Scopes required: account.fast-api-key:write
|
|
516
|
+
*/
|
|
517
|
+
createOAuthFastApiKey(params: OauthCreateFastApiKeyParams): Promise<OauthCreateFastApiKeyResponse>;
|
|
518
|
+
/**
|
|
519
|
+
* Delete Fast API Key
|
|
520
|
+
*
|
|
521
|
+
* Deletes a Fast API key.
|
|
522
|
+
* Note: Requires OAuth2 Bearer token. Scopes required: account.fast-api-key:write
|
|
523
|
+
*/
|
|
524
|
+
deleteOAuthFastApiKey(params: {
|
|
525
|
+
api_key_name: string;
|
|
526
|
+
}): Promise<{
|
|
527
|
+
result: boolean;
|
|
528
|
+
}>;
|
|
529
|
+
/**
|
|
530
|
+
* Update Fast API Key
|
|
531
|
+
*
|
|
532
|
+
* Updates a Fast API key.
|
|
533
|
+
* Note: Requires OAuth2 Bearer token. Scopes required: account.fast-api-key:write
|
|
534
|
+
*/
|
|
535
|
+
updateOAuthFastApiKey(params: OauthUpdateFastApiKeyParams): Promise<{
|
|
536
|
+
result: boolean;
|
|
537
|
+
}>;
|
|
538
|
+
/**
|
|
539
|
+
* List Fast API Keys
|
|
540
|
+
*
|
|
541
|
+
* List all Fast API keys.
|
|
542
|
+
* Note: Requires OAuth2 Bearer token. Scopes required: account.fast-api-key:read
|
|
543
|
+
*/
|
|
544
|
+
listOAuthFastApiKeys(): Promise<{
|
|
545
|
+
result: OauthFastApiKey[];
|
|
546
|
+
}>;
|
|
547
|
+
}
|