kucoin-api 0.0.2 → 1.0.0
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 +256 -40
- package/dist/cjs/FuturesClient.d.ts +246 -0
- package/dist/cjs/FuturesClient.js +261 -0
- package/dist/cjs/FuturesClient.js.map +1 -0
- package/dist/cjs/SpotClient.d.ts +692 -0
- package/dist/cjs/SpotClient.js +745 -0
- package/dist/cjs/SpotClient.js.map +1 -0
- package/dist/cjs/WebsocketClient.d.ts +77 -0
- package/dist/cjs/WebsocketClient.js +337 -0
- package/dist/cjs/WebsocketClient.js.map +1 -0
- package/dist/cjs/index.d.ts +22 -0
- package/dist/cjs/index.js +39 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/lib/BaseRestClient.d.ts +42 -0
- package/dist/cjs/lib/BaseRestClient.js +268 -0
- package/dist/cjs/lib/BaseRestClient.js.map +1 -0
- package/dist/cjs/lib/BaseWSClient.d.ts +168 -0
- package/dist/cjs/lib/BaseWSClient.js +622 -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 +8 -0
- package/dist/cjs/lib/misc-util.js.map +1 -0
- package/dist/cjs/lib/requestUtils.d.ts +35 -0
- package/dist/cjs/lib/requestUtils.js +54 -0
- package/dist/cjs/lib/requestUtils.js.map +1 -0
- package/dist/cjs/lib/webCryptoAPI.d.ts +10 -0
- package/dist/cjs/lib/webCryptoAPI.js +57 -0
- package/dist/cjs/lib/webCryptoAPI.js.map +1 -0
- package/dist/cjs/lib/websocket/WsStore.d.ts +63 -0
- package/dist/cjs/lib/websocket/WsStore.js +254 -0
- package/dist/cjs/lib/websocket/WsStore.js.map +1 -0
- package/dist/cjs/lib/websocket/WsStore.types.d.ts +50 -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 +6 -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/websocket-util.d.ts +30 -0
- package/dist/cjs/lib/websocket/websocket-util.js +19 -0
- package/dist/cjs/lib/websocket/websocket-util.js.map +1 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/types/request/futures.types.d.ts +183 -0
- package/dist/cjs/types/request/futures.types.js +7 -0
- package/dist/cjs/types/request/futures.types.js.map +1 -0
- package/dist/cjs/types/request/spot-account.d.ts +56 -0
- package/dist/cjs/types/request/spot-account.js +3 -0
- package/dist/cjs/types/request/spot-account.js.map +1 -0
- package/dist/cjs/types/request/spot-earn.d.ts +27 -0
- package/dist/cjs/types/request/spot-earn.js +8 -0
- package/dist/cjs/types/request/spot-earn.js.map +1 -0
- package/dist/cjs/types/request/spot-funding.d.ts +88 -0
- package/dist/cjs/types/request/spot-funding.js +10 -0
- package/dist/cjs/types/request/spot-funding.js.map +1 -0
- package/dist/cjs/types/request/spot-margin-trading.d.ts +169 -0
- package/dist/cjs/types/request/spot-margin-trading.js +10 -0
- package/dist/cjs/types/request/spot-margin-trading.js.map +1 -0
- package/dist/cjs/types/request/spot-trading.d.ts +214 -0
- package/dist/cjs/types/request/spot-trading.js +10 -0
- package/dist/cjs/types/request/spot-trading.js.map +1 -0
- package/dist/cjs/types/response/futures.types.d.ts +501 -0
- package/dist/cjs/types/response/futures.types.js +7 -0
- package/dist/cjs/types/response/futures.types.js.map +1 -0
- package/dist/cjs/types/response/shared.types.d.ts +9 -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-account.d.ts +140 -0
- package/dist/cjs/types/response/spot-account.js +3 -0
- package/dist/cjs/types/response/spot-account.js.map +1 -0
- package/dist/cjs/types/response/spot-earn.d.ts +74 -0
- package/dist/cjs/types/response/spot-earn.js +8 -0
- package/dist/cjs/types/response/spot-earn.js.map +1 -0
- package/dist/cjs/types/response/spot-funding.d.ts +176 -0
- package/dist/cjs/types/response/spot-funding.js +10 -0
- package/dist/cjs/types/response/spot-funding.js.map +1 -0
- package/dist/cjs/types/response/spot-margin-trading.d.ts +257 -0
- package/dist/cjs/types/response/spot-margin-trading.js +10 -0
- package/dist/cjs/types/response/spot-margin-trading.js.map +1 -0
- package/dist/cjs/types/response/spot-trading.d.ts +388 -0
- package/dist/cjs/types/response/spot-trading.js +10 -0
- package/dist/cjs/types/response/spot-trading.js.map +1 -0
- package/dist/cjs/types/response/spot-vip.d.ts +38 -0
- package/dist/cjs/types/response/spot-vip.js +10 -0
- package/dist/cjs/types/response/spot-vip.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/websockets/client.d.ts +46 -0
- package/dist/cjs/types/websockets/client.js +3 -0
- package/dist/cjs/types/websockets/client.js.map +1 -0
- package/dist/cjs/types/websockets/events.d.ts +5 -0
- package/dist/cjs/types/websockets/events.js +3 -0
- package/dist/cjs/types/websockets/events.js.map +1 -0
- package/dist/cjs/types/websockets/requests.d.ts +8 -0
- package/dist/cjs/types/websockets/requests.js +3 -0
- package/dist/cjs/types/websockets/requests.js.map +1 -0
- package/dist/cjs/types/websockets/wsAPI.d.ts +9 -0
- package/dist/cjs/types/websockets/wsAPI.js +3 -0
- package/dist/cjs/types/websockets/wsAPI.js.map +1 -0
- package/dist/mjs/FuturesClient.d.ts +246 -0
- package/dist/mjs/FuturesClient.js +257 -0
- package/dist/mjs/FuturesClient.js.map +1 -0
- package/dist/mjs/SpotClient.d.ts +692 -0
- package/dist/mjs/SpotClient.js +741 -0
- package/dist/mjs/SpotClient.js.map +1 -0
- package/dist/mjs/WebsocketClient.d.ts +77 -0
- package/dist/mjs/WebsocketClient.js +333 -0
- package/dist/mjs/WebsocketClient.js.map +1 -0
- package/dist/mjs/index.d.ts +22 -0
- package/dist/mjs/index.js +23 -0
- package/dist/mjs/index.js.map +1 -0
- package/dist/mjs/lib/BaseRestClient.d.ts +42 -0
- package/dist/mjs/lib/BaseRestClient.js +261 -0
- package/dist/mjs/lib/BaseRestClient.js.map +1 -0
- package/dist/mjs/lib/BaseWSClient.d.ts +168 -0
- package/dist/mjs/lib/BaseWSClient.js +615 -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 +35 -0
- package/dist/mjs/lib/requestUtils.js +49 -0
- package/dist/mjs/lib/requestUtils.js.map +1 -0
- package/dist/mjs/lib/webCryptoAPI.d.ts +10 -0
- package/dist/mjs/lib/webCryptoAPI.js +52 -0
- package/dist/mjs/lib/webCryptoAPI.js.map +1 -0
- package/dist/mjs/lib/websocket/WsStore.d.ts +63 -0
- package/dist/mjs/lib/websocket/WsStore.js +249 -0
- package/dist/mjs/lib/websocket/WsStore.js.map +1 -0
- package/dist/mjs/lib/websocket/WsStore.types.d.ts +50 -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 +6 -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/websocket-util.d.ts +30 -0
- package/dist/mjs/lib/websocket/websocket-util.js +15 -0
- package/dist/mjs/lib/websocket/websocket-util.js.map +1 -0
- package/dist/mjs/package.json +3 -0
- package/dist/mjs/types/request/futures.types.d.ts +183 -0
- package/dist/mjs/types/request/futures.types.js +6 -0
- package/dist/mjs/types/request/futures.types.js.map +1 -0
- package/dist/mjs/types/request/spot-account.d.ts +56 -0
- package/dist/mjs/types/request/spot-account.js +2 -0
- package/dist/mjs/types/request/spot-account.js.map +1 -0
- package/dist/mjs/types/request/spot-earn.d.ts +27 -0
- package/dist/mjs/types/request/spot-earn.js +7 -0
- package/dist/mjs/types/request/spot-earn.js.map +1 -0
- package/dist/mjs/types/request/spot-funding.d.ts +88 -0
- package/dist/mjs/types/request/spot-funding.js +9 -0
- package/dist/mjs/types/request/spot-funding.js.map +1 -0
- package/dist/mjs/types/request/spot-margin-trading.d.ts +169 -0
- package/dist/mjs/types/request/spot-margin-trading.js +9 -0
- package/dist/mjs/types/request/spot-margin-trading.js.map +1 -0
- package/dist/mjs/types/request/spot-trading.d.ts +214 -0
- package/dist/mjs/types/request/spot-trading.js +9 -0
- package/dist/mjs/types/request/spot-trading.js.map +1 -0
- package/dist/mjs/types/response/futures.types.d.ts +501 -0
- package/dist/mjs/types/response/futures.types.js +6 -0
- package/dist/mjs/types/response/futures.types.js.map +1 -0
- package/dist/mjs/types/response/shared.types.d.ts +9 -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-account.d.ts +140 -0
- package/dist/mjs/types/response/spot-account.js +2 -0
- package/dist/mjs/types/response/spot-account.js.map +1 -0
- package/dist/mjs/types/response/spot-earn.d.ts +74 -0
- package/dist/mjs/types/response/spot-earn.js +7 -0
- package/dist/mjs/types/response/spot-earn.js.map +1 -0
- package/dist/mjs/types/response/spot-funding.d.ts +176 -0
- package/dist/mjs/types/response/spot-funding.js +9 -0
- package/dist/mjs/types/response/spot-funding.js.map +1 -0
- package/dist/mjs/types/response/spot-margin-trading.d.ts +257 -0
- package/dist/mjs/types/response/spot-margin-trading.js +9 -0
- package/dist/mjs/types/response/spot-margin-trading.js.map +1 -0
- package/dist/mjs/types/response/spot-trading.d.ts +388 -0
- package/dist/mjs/types/response/spot-trading.js +9 -0
- package/dist/mjs/types/response/spot-trading.js.map +1 -0
- package/dist/mjs/types/response/spot-vip.d.ts +38 -0
- package/dist/mjs/types/response/spot-vip.js +9 -0
- package/dist/mjs/types/response/spot-vip.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/websockets/client.d.ts +46 -0
- package/dist/mjs/types/websockets/client.js +2 -0
- package/dist/mjs/types/websockets/client.js.map +1 -0
- package/dist/mjs/types/websockets/events.d.ts +5 -0
- package/dist/mjs/types/websockets/events.js +2 -0
- package/dist/mjs/types/websockets/events.js.map +1 -0
- package/dist/mjs/types/websockets/requests.d.ts +8 -0
- package/dist/mjs/types/websockets/requests.js +2 -0
- package/dist/mjs/types/websockets/requests.js.map +1 -0
- package/dist/mjs/types/websockets/wsAPI.d.ts +9 -0
- package/dist/mjs/types/websockets/wsAPI.js +2 -0
- package/dist/mjs/types/websockets/wsAPI.js.map +1 -0
- package/package.json +70 -14
- package/LICENSE +0 -21
- package/index.js +0 -192
- package/test.js +0 -122
|
@@ -0,0 +1,692 @@
|
|
|
1
|
+
import { AxiosRequestConfig } from 'axios';
|
|
2
|
+
import { BaseRestClient } from './lib/BaseRestClient.js';
|
|
3
|
+
import { RestClientOptions, RestClientType } from './lib/requestUtils.js';
|
|
4
|
+
import { AccountHFMarginTransactionsRequest, AccountHFTransactionsRequest, CreateSubAccountAPIRequest, CreateSubAccountRequest, DeleteSubAccountAPIRequest, GetBalancesRequest, GetSpotTransactionsRequest, UpdateSubAccountAPIRequest } from './types/request/spot-account.js';
|
|
5
|
+
import { GetEarnFixedIncomeHoldAssetsRequest, GetEarnRedeemPreviewRequest, InitiateRedemptionRequest, SubscribeEarnFixedIncomeRequest } from './types/request/spot-earn.js';
|
|
6
|
+
import { ApplyWithdrawRequest, FlexTransferRequest, GetDepositsRequest, GetIsolatedMarginBalanceRequest, GetMarginBalanceRequest, GetTransferableRequest, GetWithdrawalsRequest, InnerTransferRequest, submitTransferMasterSubRequest } from './types/request/spot-funding.js';
|
|
7
|
+
import { GetHFMarginFilledRequest, getHFMarginFillsRequest, GetLendingRedemptionOrdersV3Request, GetLendingSubscriptionOrdersV3Request, HFMarginRequestOrder, InitiateLendingRedemptionV3Request, InitiateLendingSubscriptionV3Request, MarginBorrowV3Request, MarginHistoryV3Request, MarginInterestRecordsRequest, MarginRepayV3Request, MarginRiskLimitRequest, ModifyLendingSubscriptionOrdersV3Request, SubmitHFMarginOrderRequest, SubmitMarginOrderRequest } from './types/request/spot-margin-trading.js';
|
|
8
|
+
import { CancelAllOrdersRequest, CancelSpecifiedNumberHFOrdersRequest, CancelStopOrdersRequest, GetFillsRequest, GetHFCompletedOrdersRequest, GetHFFilledListRequest, GetOCOOrdersRequest, GetOrderListRequest, GetSpotKlinesRequest, GetStopOrdersListRequest, ModifyHFOrderRequest, SubmitHFOrderRequest, SubmitMultipleHFOrdersRequest, SubmitMultipleOrdersRequest, SubmitOCOOrderRequest, SubmitOrderRequest, SubmitStopOrderRequest } from './types/request/spot-trading.js';
|
|
9
|
+
import { APISuccessResponse } from './types/response/shared.types.js';
|
|
10
|
+
import { Account, AccountHFMarginTransactions, Balances, CreateSubAccount, CreateSubAPI, DeleteSubAccountAPI, SpotAccountSummary, SpotAccountTransaction, SpotAccountTransactions, SubAccountAPIInfo, SubAccountBalance, SubAccountBalancesV2, SubAccountInfo, SubAccountsV2, UpdateSubAPI } from './types/response/spot-account.js';
|
|
11
|
+
import { EarnFixedIncomeHoldAssets, EarnProduct, GetEarnRedeemPreviewResponse, InitiateRedemptionResponse, SubscribeEarnFixedIncomeResponse } from './types/response/spot-earn.js';
|
|
12
|
+
import { DepositAddress, DepositAddressV2, Deposits, HistoricalWithdrawalsV1, IsolatedMarginBalance, MarginAccountBalance, MarginBalance, TransferableFunds, V1HistoricalDeposits, WithdrawalQuotas, Withdrawals } from './types/response/spot-funding.js';
|
|
13
|
+
import { HFMarginFilledOrder, HFMarginOrder, HFMarginTransactionRecord, IsolatedMarginAccountInfo, IsolatedMarginSymbolsConfig, LendingCurrencyV3, LendingRedemption, MarginConfigInfo, MarginHistoryRecord, MarginInterestRecords, MarginLevTokenInfo, MarginMarkPrice, MarginOrderV3, MarginRiskLimit, SingleIsolatedMarginAccountInfo, SubmitMarginOrderResponse } from './types/response/spot-margin-trading.js';
|
|
14
|
+
import { AutoCancelHFOrderSettingQueryResponse, CancelAllHFOrdersResponse, CurrencyInfo, HFFilledOrder, HFOrder, Kline, MultipleOrdersResponse, OCOOrderDetails, OCOOrderListItem, OCOOrders, OrderBookLevel, SpotOrder, SpotOrderFill, SpotOrderFills, SpotOrderList, StopOrderItem, StopOrders, SubmitHFOrderSyncResponse, SubmitMultipleHFOrdersResponse, SubmitMultipleHFOrdersSyncResponse, Symbol24hrStats, SymbolInfo, SyncCancelHFOrderResponse, Ticker, TradeHistory } from './types/response/spot-trading.js';
|
|
15
|
+
import { OtcLoan, OtcLoanAccount } from './types/response/spot-vip.js';
|
|
16
|
+
import { WsConnectionInfo } from './types/response/ws.js';
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
export declare class SpotClient extends BaseRestClient {
|
|
21
|
+
constructor(restClientOptions?: RestClientOptions, requestOptions?: AxiosRequestConfig);
|
|
22
|
+
getClientType(): RestClientType;
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* Misc Utility Methods
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
generateNewOrderID(): string;
|
|
29
|
+
getServerTime(): Promise<any>;
|
|
30
|
+
getServiceStatus(): Promise<any>;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* REST - ACCOUNT - Basic Info
|
|
34
|
+
*
|
|
35
|
+
*/
|
|
36
|
+
getAccountSummary(): Promise<APISuccessResponse<SpotAccountSummary>>;
|
|
37
|
+
/**
|
|
38
|
+
* Get a list of acounts and their balance states (spot/margin/trade_hf)
|
|
39
|
+
*
|
|
40
|
+
* Get Account List - Spot/Margin/trade_hf
|
|
41
|
+
*/
|
|
42
|
+
getBalances(params?: GetBalancesRequest): Promise<Promise<APISuccessResponse<Balances[]>>>;
|
|
43
|
+
getAccountDetail(params: {
|
|
44
|
+
accountId: any;
|
|
45
|
+
}): Promise<APISuccessResponse<Account>>;
|
|
46
|
+
/**
|
|
47
|
+
* Get Account Ledgers - Spot/Margin
|
|
48
|
+
*/
|
|
49
|
+
getTransactions(params?: GetSpotTransactionsRequest): Promise<APISuccessResponse<SpotAccountTransactions>>;
|
|
50
|
+
/**
|
|
51
|
+
* Get Account Ledgers - trade_hf
|
|
52
|
+
*/
|
|
53
|
+
getHFTransactions(params: AccountHFTransactionsRequest): Promise<APISuccessResponse<SpotAccountTransaction[]>>;
|
|
54
|
+
/**
|
|
55
|
+
* Get Account Ledgers - margin_hf
|
|
56
|
+
*/
|
|
57
|
+
getHFMarginTransactions(params: AccountHFMarginTransactionsRequest): Promise<APISuccessResponse<AccountHFMarginTransactions[]>>;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* REST - ACCOUNT - Sub-Account
|
|
61
|
+
*
|
|
62
|
+
*/
|
|
63
|
+
getSubAccountsV1(): Promise<APISuccessResponse<SubAccountInfo[]>>;
|
|
64
|
+
getSubAccountsV2(params?: {
|
|
65
|
+
currentPage?: number;
|
|
66
|
+
pageSize?: number;
|
|
67
|
+
}): Promise<APISuccessResponse<SubAccountsV2>>;
|
|
68
|
+
createSubAccount(params: CreateSubAccountRequest): Promise<APISuccessResponse<CreateSubAccount>>;
|
|
69
|
+
getSubAccountBalance(params: {
|
|
70
|
+
subUserId: string;
|
|
71
|
+
includeBaseAmount: boolean;
|
|
72
|
+
}): Promise<APISuccessResponse<SubAccountBalance>>;
|
|
73
|
+
getSubAccountBalancesV1(): Promise<APISuccessResponse<SubAccountBalance>>;
|
|
74
|
+
getSubAccountBalancesV2(params?: {
|
|
75
|
+
currentPage?: number;
|
|
76
|
+
pageSize?: number;
|
|
77
|
+
}): Promise<APISuccessResponse<SubAccountBalancesV2>>;
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* REST - ACCOUNT - Sub-Account API
|
|
81
|
+
*
|
|
82
|
+
*
|
|
83
|
+
*/
|
|
84
|
+
getSubAPIs(params: {
|
|
85
|
+
apiKey?: string;
|
|
86
|
+
subName: string;
|
|
87
|
+
}): Promise<APISuccessResponse<SubAccountAPIInfo[]>>;
|
|
88
|
+
createSubAPI(params: CreateSubAccountAPIRequest): Promise<APISuccessResponse<CreateSubAPI>>;
|
|
89
|
+
updateSubAPI(params: UpdateSubAccountAPIRequest): Promise<APISuccessResponse<UpdateSubAPI>>;
|
|
90
|
+
deleteSubAPI(params: DeleteSubAccountAPIRequest): Promise<APISuccessResponse<DeleteSubAccountAPI>>;
|
|
91
|
+
/**
|
|
92
|
+
*
|
|
93
|
+
* REST - FUNDING - Funding overview
|
|
94
|
+
*
|
|
95
|
+
*/
|
|
96
|
+
getMarginBalances(): Promise<APISuccessResponse<{
|
|
97
|
+
debtRatio: string;
|
|
98
|
+
accounts: MarginAccountBalance[];
|
|
99
|
+
}>>;
|
|
100
|
+
getMarginBalance(params?: GetMarginBalanceRequest): Promise<APISuccessResponse<MarginBalance>>;
|
|
101
|
+
getIsolatedMarginBalance(params?: GetIsolatedMarginBalanceRequest): Promise<APISuccessResponse<IsolatedMarginBalance[]>>;
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* REST - FUNDING -Deposit
|
|
105
|
+
*
|
|
106
|
+
*/
|
|
107
|
+
createDepositAddress(params: {
|
|
108
|
+
currency: string;
|
|
109
|
+
chain?: string;
|
|
110
|
+
}): Promise<APISuccessResponse<DepositAddress>>;
|
|
111
|
+
getDepositAddressesV2(params: {
|
|
112
|
+
currency: string;
|
|
113
|
+
}): Promise<APISuccessResponse<DepositAddressV2[]>>;
|
|
114
|
+
getDepositAddressV1(params: {
|
|
115
|
+
currency: string;
|
|
116
|
+
chain?: string;
|
|
117
|
+
}): Promise<APISuccessResponse<DepositAddress>>;
|
|
118
|
+
getDeposits(params?: GetDepositsRequest): Promise<APISuccessResponse<Deposits>>;
|
|
119
|
+
getHistoricalDepositsV1(params?: GetDepositsRequest): Promise<APISuccessResponse<V1HistoricalDeposits>>;
|
|
120
|
+
/**
|
|
121
|
+
*
|
|
122
|
+
* REST - FUNDING -Withdrawals
|
|
123
|
+
*
|
|
124
|
+
*/
|
|
125
|
+
getWithdrawals(params?: GetWithdrawalsRequest): Promise<APISuccessResponse<Withdrawals>>;
|
|
126
|
+
getHistoricalWithdrawalsV1(params?: GetWithdrawalsRequest): Promise<APISuccessResponse<HistoricalWithdrawalsV1>>;
|
|
127
|
+
getWithdrawalQuotas(params: {
|
|
128
|
+
currency: string;
|
|
129
|
+
chain?: string;
|
|
130
|
+
}): Promise<APISuccessResponse<WithdrawalQuotas>>;
|
|
131
|
+
submitWithdraw(params: ApplyWithdrawRequest): Promise<APISuccessResponse<{
|
|
132
|
+
withdrawalId: string;
|
|
133
|
+
}>>;
|
|
134
|
+
cancelWithdrawal(params: {
|
|
135
|
+
withdrawalId: string;
|
|
136
|
+
}): Promise<APISuccessResponse<{
|
|
137
|
+
withdrawalId: string;
|
|
138
|
+
}>>;
|
|
139
|
+
/**
|
|
140
|
+
*
|
|
141
|
+
* REST - FUNDING - Transfer
|
|
142
|
+
*
|
|
143
|
+
*/
|
|
144
|
+
getTransferable(params: GetTransferableRequest): Promise<APISuccessResponse<TransferableFunds>>;
|
|
145
|
+
submitFlexTransfer(params: FlexTransferRequest): Promise<APISuccessResponse<{
|
|
146
|
+
orderId: string;
|
|
147
|
+
}>>;
|
|
148
|
+
submitTransferMasterSub(params: submitTransferMasterSubRequest): Promise<APISuccessResponse<{
|
|
149
|
+
orderId: string;
|
|
150
|
+
}>>;
|
|
151
|
+
submitInnerTransfer(params: InnerTransferRequest): Promise<APISuccessResponse<{
|
|
152
|
+
orderId: string;
|
|
153
|
+
}>>;
|
|
154
|
+
/**
|
|
155
|
+
*
|
|
156
|
+
* REST - FUNDING - Trade Fee
|
|
157
|
+
*
|
|
158
|
+
*/
|
|
159
|
+
getBasicUserFee(params: {
|
|
160
|
+
currencyType: string;
|
|
161
|
+
}): Promise<APISuccessResponse<{
|
|
162
|
+
takerFeeRate: string;
|
|
163
|
+
makerFeeRate: string;
|
|
164
|
+
}>>;
|
|
165
|
+
getTradingPairFee(params: {
|
|
166
|
+
symbols: string;
|
|
167
|
+
}): Promise<APISuccessResponse<{
|
|
168
|
+
symbol: string;
|
|
169
|
+
takerFeeRate: string;
|
|
170
|
+
makerFeeRate: string;
|
|
171
|
+
}[]>>;
|
|
172
|
+
/**
|
|
173
|
+
*
|
|
174
|
+
* REST - SPOT TRADING -Market data
|
|
175
|
+
*
|
|
176
|
+
*/
|
|
177
|
+
getCurrencies(): Promise<APISuccessResponse<CurrencyInfo[]>>;
|
|
178
|
+
getCurrency(params: {
|
|
179
|
+
currency: string;
|
|
180
|
+
chain?: string;
|
|
181
|
+
}): Promise<APISuccessResponse<CurrencyInfo>>;
|
|
182
|
+
getSymbols(params?: {
|
|
183
|
+
market?: string;
|
|
184
|
+
}): Promise<APISuccessResponse<SymbolInfo[]>>;
|
|
185
|
+
getTicker(params: {
|
|
186
|
+
symbol: string;
|
|
187
|
+
}): Promise<APISuccessResponse<Ticker>>;
|
|
188
|
+
getTickers(): Promise<APISuccessResponse<{
|
|
189
|
+
time: number;
|
|
190
|
+
ticker: Ticker[];
|
|
191
|
+
}>>;
|
|
192
|
+
get24hrStats(params: {
|
|
193
|
+
symbol: string;
|
|
194
|
+
}): Promise<APISuccessResponse<Symbol24hrStats>>;
|
|
195
|
+
getMarkets(): Promise<APISuccessResponse<string[]>>;
|
|
196
|
+
getOrderBookLevel20(params: {
|
|
197
|
+
symbol: string;
|
|
198
|
+
}): Promise<APISuccessResponse<OrderBookLevel>>;
|
|
199
|
+
getOrderBookLevel100(params: {
|
|
200
|
+
symbol: string;
|
|
201
|
+
}): Promise<APISuccessResponse<OrderBookLevel>>;
|
|
202
|
+
getFullOrderBook(params: {
|
|
203
|
+
symbol: string;
|
|
204
|
+
}): Promise<APISuccessResponse<OrderBookLevel>>;
|
|
205
|
+
getTradeHistories(params: {
|
|
206
|
+
symbol: string;
|
|
207
|
+
}): Promise<APISuccessResponse<TradeHistory[]>>;
|
|
208
|
+
getKlines(params: GetSpotKlinesRequest): Promise<APISuccessResponse<Kline[]>>;
|
|
209
|
+
getFiatPrice(params?: {
|
|
210
|
+
base?: string;
|
|
211
|
+
currencies?: string;
|
|
212
|
+
}): Promise<any>;
|
|
213
|
+
/**
|
|
214
|
+
*
|
|
215
|
+
* REST - SPOT TRADING - Spot HF trade
|
|
216
|
+
*
|
|
217
|
+
*/
|
|
218
|
+
submitHFOrder(params: SubmitHFOrderRequest): Promise<APISuccessResponse<{
|
|
219
|
+
orderId: string;
|
|
220
|
+
}>>;
|
|
221
|
+
submitHFOrderTest(): Promise<any>;
|
|
222
|
+
submitHFOrderSync(params: SubmitHFOrderRequest): Promise<APISuccessResponse<SubmitHFOrderSyncResponse>>;
|
|
223
|
+
submitHFMultipleOrders(params: {
|
|
224
|
+
orderList: SubmitMultipleHFOrdersRequest[];
|
|
225
|
+
}): Promise<APISuccessResponse<SubmitMultipleHFOrdersResponse[]>>;
|
|
226
|
+
submitHFMultipleOrdersSync(params: {
|
|
227
|
+
orderList: SubmitMultipleHFOrdersRequest[];
|
|
228
|
+
}): Promise<APISuccessResponse<SubmitMultipleHFOrdersSyncResponse[]>>;
|
|
229
|
+
updateHFOrder(params: ModifyHFOrderRequest): Promise<APISuccessResponse<{
|
|
230
|
+
newOrderId: string;
|
|
231
|
+
}>>;
|
|
232
|
+
cancelHFOrder(params: {
|
|
233
|
+
orderId: string;
|
|
234
|
+
symbol: string;
|
|
235
|
+
}): Promise<APISuccessResponse<{
|
|
236
|
+
orderId: string;
|
|
237
|
+
}>>;
|
|
238
|
+
cancelHFOrderSync(params: {
|
|
239
|
+
orderId: string;
|
|
240
|
+
symbol: string;
|
|
241
|
+
}): Promise<APISuccessResponse<SyncCancelHFOrderResponse>>;
|
|
242
|
+
cancelHFOrderByClientOId(params: {
|
|
243
|
+
clientOid: string;
|
|
244
|
+
symbol: string;
|
|
245
|
+
}): Promise<APISuccessResponse<{
|
|
246
|
+
clientOid: string;
|
|
247
|
+
}>>;
|
|
248
|
+
cancelHFOrderSyncByClientOId(params: {
|
|
249
|
+
clientOid: string;
|
|
250
|
+
symbol: string;
|
|
251
|
+
}): Promise<APISuccessResponse<SyncCancelHFOrderResponse>>;
|
|
252
|
+
cancelHFOrdersNumber(params: CancelSpecifiedNumberHFOrdersRequest): Promise<any>;
|
|
253
|
+
cancelHFAllOrdersBySymbol(params: {
|
|
254
|
+
symbol: string;
|
|
255
|
+
}): Promise<APISuccessResponse<{
|
|
256
|
+
orderId: string;
|
|
257
|
+
cancelSize: string;
|
|
258
|
+
}>>;
|
|
259
|
+
cancelHFAllOrders(): Promise<APISuccessResponse<CancelAllHFOrdersResponse>>;
|
|
260
|
+
getHFActiveOrders(params: {
|
|
261
|
+
symbol: string;
|
|
262
|
+
}): Promise<APISuccessResponse<HFOrder[]>>;
|
|
263
|
+
getHFActiveSymbols(): Promise<APISuccessResponse<{
|
|
264
|
+
symbols: string[];
|
|
265
|
+
}>>;
|
|
266
|
+
getHFCompletedOrders(params: GetHFCompletedOrdersRequest): Promise<APISuccessResponse<{
|
|
267
|
+
lastId: number;
|
|
268
|
+
items: HFOrder[];
|
|
269
|
+
}>>;
|
|
270
|
+
getHFOrderDetailsByOrderId(params: {
|
|
271
|
+
orderId: string;
|
|
272
|
+
symbol: string;
|
|
273
|
+
}): Promise<APISuccessResponse<HFOrder>>;
|
|
274
|
+
getHFOrderDetailsByClientOid(params: {
|
|
275
|
+
clientOid: string;
|
|
276
|
+
symbol: string;
|
|
277
|
+
}): Promise<APISuccessResponse<HFOrder>>;
|
|
278
|
+
cancelHFOrderAutoSetting(params: {
|
|
279
|
+
timeout: number;
|
|
280
|
+
symbols?: string;
|
|
281
|
+
}): Promise<APISuccessResponse<{
|
|
282
|
+
currentTime: number;
|
|
283
|
+
triggerTime: number;
|
|
284
|
+
}>>;
|
|
285
|
+
cancelHFOrderAutoSettingQuery(): Promise<APISuccessResponse<AutoCancelHFOrderSettingQueryResponse>>;
|
|
286
|
+
getHFFilledOrders(params: GetHFFilledListRequest): Promise<APISuccessResponse<{
|
|
287
|
+
items: HFFilledOrder[];
|
|
288
|
+
lastId: number;
|
|
289
|
+
}>>;
|
|
290
|
+
/**
|
|
291
|
+
*
|
|
292
|
+
* REST - SPOT TRADING - Orders
|
|
293
|
+
*
|
|
294
|
+
*/
|
|
295
|
+
submitOrder(params: SubmitOrderRequest): Promise<APISuccessResponse<{
|
|
296
|
+
orderId: string;
|
|
297
|
+
}>>;
|
|
298
|
+
submitOrderTest(): Promise<any>;
|
|
299
|
+
submitMultipleOrders(params: {
|
|
300
|
+
symbol: string;
|
|
301
|
+
orderList: SubmitMultipleOrdersRequest[];
|
|
302
|
+
}): Promise<APISuccessResponse<MultipleOrdersResponse[]>>;
|
|
303
|
+
cancelOrderById(params: {
|
|
304
|
+
orderId: string;
|
|
305
|
+
}): Promise<APISuccessResponse<{
|
|
306
|
+
cancelledOrderIds: string[];
|
|
307
|
+
}>>;
|
|
308
|
+
cancelOrderByClientOid(params: {
|
|
309
|
+
clientOid: string;
|
|
310
|
+
}): Promise<APISuccessResponse<{
|
|
311
|
+
cancelledOrderId: string;
|
|
312
|
+
clientOid: string;
|
|
313
|
+
}>>;
|
|
314
|
+
cancelAllOrders(params?: CancelAllOrdersRequest): Promise<APISuccessResponse<{
|
|
315
|
+
cancelledOrderIds: string[];
|
|
316
|
+
}>>;
|
|
317
|
+
getOrders(params?: GetOrderListRequest): Promise<APISuccessResponse<SpotOrderList>>;
|
|
318
|
+
getRecentOrders(): Promise<APISuccessResponse<SpotOrder[]>>;
|
|
319
|
+
getOrderByOrderId(params: {
|
|
320
|
+
orderId: string;
|
|
321
|
+
}): Promise<APISuccessResponse<SpotOrder>>;
|
|
322
|
+
getOrderByClientOid(params: {
|
|
323
|
+
clientOid: string;
|
|
324
|
+
}): Promise<APISuccessResponse<SpotOrder>>;
|
|
325
|
+
/**
|
|
326
|
+
*
|
|
327
|
+
* REST - SPOT TRADING -Fills
|
|
328
|
+
*
|
|
329
|
+
*/
|
|
330
|
+
getFills(params?: GetFillsRequest): Promise<APISuccessResponse<SpotOrderFills>>;
|
|
331
|
+
getRecentFills(): Promise<APISuccessResponse<SpotOrderFill[]>>;
|
|
332
|
+
/**
|
|
333
|
+
*
|
|
334
|
+
* REST - SPOT TRADING - Stop order
|
|
335
|
+
*
|
|
336
|
+
*/
|
|
337
|
+
submitStopOrder(params: SubmitStopOrderRequest): Promise<APISuccessResponse<{
|
|
338
|
+
orderId: string;
|
|
339
|
+
}>>;
|
|
340
|
+
/**
|
|
341
|
+
* Cancels a single stop order by orderId. Applicable for both spot and margin trading.
|
|
342
|
+
*
|
|
343
|
+
* This endpoint requires the "Spot Trading" or "Margin Trading" permission on your API key.
|
|
344
|
+
*/
|
|
345
|
+
cancelStopOrderById(params: {
|
|
346
|
+
orderId: string;
|
|
347
|
+
}): Promise<APISuccessResponse<{
|
|
348
|
+
cancelledOrderIds: string[];
|
|
349
|
+
}>>;
|
|
350
|
+
/**
|
|
351
|
+
* Cancels a stop order by clientOid. Requires "Spot Trading" or "Margin Trading" permission.
|
|
352
|
+
*/
|
|
353
|
+
cancelStopOrderByClientOid(params: {
|
|
354
|
+
clientOid: string;
|
|
355
|
+
symbol?: string;
|
|
356
|
+
}): Promise<APISuccessResponse<{
|
|
357
|
+
cancelledOrderId: string;
|
|
358
|
+
clientOid: string;
|
|
359
|
+
}>>;
|
|
360
|
+
/**
|
|
361
|
+
* Cancels a batch of stop orders. Requires "Spot Trading" or "Margin Trading" permission.
|
|
362
|
+
*/
|
|
363
|
+
cancelStopOrders(params?: CancelStopOrdersRequest): Promise<APISuccessResponse<{
|
|
364
|
+
cancelledOrderIds: string[];
|
|
365
|
+
}>>;
|
|
366
|
+
/**
|
|
367
|
+
* Retrieves your current untriggered stop order list, paginated and sorted to show the latest first.
|
|
368
|
+
*/
|
|
369
|
+
getStopOrders(params?: GetStopOrdersListRequest): Promise<APISuccessResponse<StopOrders>>;
|
|
370
|
+
/**
|
|
371
|
+
* Retrieves the details of a single stop order by its orderId.
|
|
372
|
+
*/
|
|
373
|
+
getStopOrderByOrderId(params: {
|
|
374
|
+
orderId: string;
|
|
375
|
+
}): Promise<APISuccessResponse<StopOrderItem>>;
|
|
376
|
+
/**
|
|
377
|
+
* Retrieves the details of a single stop order by its clientOid.
|
|
378
|
+
*/
|
|
379
|
+
getStopOrderByClientOid(params: {
|
|
380
|
+
clientOid: string;
|
|
381
|
+
symbol?: string;
|
|
382
|
+
}): Promise<APISuccessResponse<StopOrderItem[]>>;
|
|
383
|
+
/**
|
|
384
|
+
*
|
|
385
|
+
* REST - SPOT TRADING - OCO order
|
|
386
|
+
*
|
|
387
|
+
*/
|
|
388
|
+
submitOCOOrder(params: SubmitOCOOrderRequest): Promise<APISuccessResponse<{
|
|
389
|
+
orderId: string;
|
|
390
|
+
}>>;
|
|
391
|
+
/**
|
|
392
|
+
* Cancels a single OCO order by orderId.
|
|
393
|
+
*/
|
|
394
|
+
cancelOCOOrderById(params: {
|
|
395
|
+
orderId: string;
|
|
396
|
+
}): Promise<APISuccessResponse<{
|
|
397
|
+
cancelledOrderIds: string[];
|
|
398
|
+
}>>;
|
|
399
|
+
/**
|
|
400
|
+
* Cancels a single OCO order by clientOid.
|
|
401
|
+
*/
|
|
402
|
+
cancelOCOOrderByClientOid(params: {
|
|
403
|
+
clientOid: string;
|
|
404
|
+
}): Promise<APISuccessResponse<{
|
|
405
|
+
cancelledOrderIds: string[];
|
|
406
|
+
}>>;
|
|
407
|
+
/**
|
|
408
|
+
* Batch cancels OCO orders through orderIds.
|
|
409
|
+
*/
|
|
410
|
+
cancelMultipleOCOOrders(params?: {
|
|
411
|
+
orderIds?: string;
|
|
412
|
+
symbol?: string;
|
|
413
|
+
}): Promise<APISuccessResponse<{
|
|
414
|
+
cancelledOrderIds: string[];
|
|
415
|
+
}>>;
|
|
416
|
+
/**
|
|
417
|
+
* Retrieves the details of a single OCO order by its orderId.
|
|
418
|
+
*/
|
|
419
|
+
getOCOOrderByOrderId(params: {
|
|
420
|
+
orderId: string;
|
|
421
|
+
}): Promise<APISuccessResponse<OCOOrderListItem>>;
|
|
422
|
+
/**
|
|
423
|
+
* Retrieves the details of a single OCO order by its clientOid.
|
|
424
|
+
*/
|
|
425
|
+
getOCOOrderByClientOid(params: {
|
|
426
|
+
clientOid: string;
|
|
427
|
+
}): Promise<APISuccessResponse<OCOOrderListItem>>;
|
|
428
|
+
/**
|
|
429
|
+
* Retrieves the details of a single OCO order by its orderId, including detailed information about the individual orders.
|
|
430
|
+
*/
|
|
431
|
+
getOCOOrderDetails(params: {
|
|
432
|
+
orderId: string;
|
|
433
|
+
}): Promise<APISuccessResponse<OCOOrderDetails>>;
|
|
434
|
+
/**
|
|
435
|
+
* Retrieves your current OCO order list, paginated and sorted to show the latest first.
|
|
436
|
+
*/
|
|
437
|
+
getOCOOrders(params: GetOCOOrdersRequest): Promise<APISuccessResponse<OCOOrders>>;
|
|
438
|
+
/**
|
|
439
|
+
*
|
|
440
|
+
* REST - MARGIN TRADING -Margin HF trade
|
|
441
|
+
*
|
|
442
|
+
*/
|
|
443
|
+
submitHFMarginOrder(params: SubmitHFMarginOrderRequest): Promise<APISuccessResponse<{
|
|
444
|
+
orderNo: string;
|
|
445
|
+
}>>;
|
|
446
|
+
submitHFMarginOrderTest(): Promise<any>;
|
|
447
|
+
cancelHFMarginOrder(params: {
|
|
448
|
+
orderId: string;
|
|
449
|
+
symbol: string;
|
|
450
|
+
}): Promise<APISuccessResponse<{
|
|
451
|
+
orderId: string;
|
|
452
|
+
}>>;
|
|
453
|
+
cancelHFMarginOrderByClientOid(params: {
|
|
454
|
+
clientOid: string;
|
|
455
|
+
symbol: string;
|
|
456
|
+
}): Promise<APISuccessResponse<{
|
|
457
|
+
clientOid: string;
|
|
458
|
+
}>>;
|
|
459
|
+
cancelHFAllMarginOrders(params: HFMarginOrder): Promise<any>;
|
|
460
|
+
getHFActiveMarginOrders(params: HFMarginRequestOrder): Promise<APISuccessResponse<HFMarginOrder[]>>;
|
|
461
|
+
getHFMarginFilledOrders(params: GetHFMarginFilledRequest): Promise<APISuccessResponse<{
|
|
462
|
+
lastId: number;
|
|
463
|
+
items: HFMarginFilledOrder[];
|
|
464
|
+
}>>;
|
|
465
|
+
getHFMarginOrderByOrderId(params: {
|
|
466
|
+
orderId: string;
|
|
467
|
+
symbol: string;
|
|
468
|
+
}): Promise<APISuccessResponse<HFMarginOrder>>;
|
|
469
|
+
getHFMarginOrderByClientOid(params: {
|
|
470
|
+
clientOid: string;
|
|
471
|
+
symbol: string;
|
|
472
|
+
}): Promise<APISuccessResponse<HFMarginOrder>>;
|
|
473
|
+
getHFMarginFills(params: getHFMarginFillsRequest): Promise<APISuccessResponse<{
|
|
474
|
+
lastId: number;
|
|
475
|
+
items: HFMarginTransactionRecord[];
|
|
476
|
+
}>>;
|
|
477
|
+
getHFMarginOpenSymbols(params: {
|
|
478
|
+
tradeType: string;
|
|
479
|
+
}): Promise<APISuccessResponse<{
|
|
480
|
+
symbolSize: number;
|
|
481
|
+
symbols: string[];
|
|
482
|
+
}>>;
|
|
483
|
+
/**
|
|
484
|
+
*
|
|
485
|
+
* REST - MARGIN TRADING - Orders
|
|
486
|
+
*
|
|
487
|
+
*/
|
|
488
|
+
submitMarginOrder(params: SubmitMarginOrderRequest): Promise<APISuccessResponse<SubmitMarginOrderResponse>>;
|
|
489
|
+
submitMarginOrderTest(): Promise<any>;
|
|
490
|
+
/**
|
|
491
|
+
*
|
|
492
|
+
* REST - MARGIN TRADING - Margin info
|
|
493
|
+
*
|
|
494
|
+
*/
|
|
495
|
+
getMarginLeveragedToken(params?: {
|
|
496
|
+
currency?: string;
|
|
497
|
+
}): Promise<APISuccessResponse<MarginLevTokenInfo[]>>;
|
|
498
|
+
getMarginMarkPrices(): Promise<APISuccessResponse<MarginMarkPrice[]>>;
|
|
499
|
+
getMarginMarkPrice(params: {
|
|
500
|
+
symbol: string;
|
|
501
|
+
}): Promise<APISuccessResponse<MarginMarkPrice>>;
|
|
502
|
+
getMarginConfigInfo(): Promise<APISuccessResponse<MarginConfigInfo>>;
|
|
503
|
+
getMarginRiskLimitConfig(params: MarginRiskLimitRequest): Promise<APISuccessResponse<MarginRiskLimit[]>>;
|
|
504
|
+
/**
|
|
505
|
+
*
|
|
506
|
+
* REST - MARGIN TRADING - Isolated Margin
|
|
507
|
+
*
|
|
508
|
+
*/
|
|
509
|
+
getIsolatedMarginSymbolsConfig(): Promise<APISuccessResponse<IsolatedMarginSymbolsConfig[]>>;
|
|
510
|
+
getIsolatedMarginAccounts(params?: {
|
|
511
|
+
balanceCurrency?: 'USDT' | 'KCS' | 'BTC';
|
|
512
|
+
}): Promise<APISuccessResponse<IsolatedMarginAccountInfo>>;
|
|
513
|
+
getIsolatedMarginAccount(params: {
|
|
514
|
+
symbol: string;
|
|
515
|
+
}): Promise<APISuccessResponse<SingleIsolatedMarginAccountInfo>>;
|
|
516
|
+
/**
|
|
517
|
+
*
|
|
518
|
+
* REST - MARGIN TRADING - Margin trading(v3)
|
|
519
|
+
*
|
|
520
|
+
*/
|
|
521
|
+
marginBorrowV3(params: MarginBorrowV3Request): Promise<APISuccessResponse<MarginOrderV3>>;
|
|
522
|
+
marginRepayV3(params: MarginRepayV3Request): Promise<APISuccessResponse<MarginOrderV3>>;
|
|
523
|
+
getMarginBorrowHistoryV3(params: MarginHistoryV3Request): Promise<APISuccessResponse<MarginHistoryRecord[]>>;
|
|
524
|
+
getMarginRepayHistoryV3(params: MarginHistoryV3Request): Promise<APISuccessResponse<MarginHistoryRecord[]>>;
|
|
525
|
+
getMarginInterestRecordsV3(params?: MarginInterestRecordsRequest): Promise<APISuccessResponse<MarginInterestRecords>>;
|
|
526
|
+
getMarginActivePairsV3(params?: {
|
|
527
|
+
symbol?: string;
|
|
528
|
+
}): Promise<APISuccessResponse<{
|
|
529
|
+
timestamp: number;
|
|
530
|
+
items: any[];
|
|
531
|
+
}>>;
|
|
532
|
+
updateMarginLeverageV3(params: {
|
|
533
|
+
symbol?: string;
|
|
534
|
+
leverage: string;
|
|
535
|
+
isIsolated?: boolean;
|
|
536
|
+
}): Promise<APISuccessResponse<any>>;
|
|
537
|
+
/**
|
|
538
|
+
*
|
|
539
|
+
* REST - MARGIN TRADING - Lending market(v3)
|
|
540
|
+
*
|
|
541
|
+
*/
|
|
542
|
+
getLendingCurrencyV3(params?: {
|
|
543
|
+
currency?: string;
|
|
544
|
+
}): Promise<APISuccessResponse<LendingCurrencyV3>>;
|
|
545
|
+
getLendingInterestRateV3(params: {
|
|
546
|
+
currency: string;
|
|
547
|
+
}): Promise<APISuccessResponse<{
|
|
548
|
+
time: string;
|
|
549
|
+
marketInterestRate: string;
|
|
550
|
+
}[]>>;
|
|
551
|
+
submitLendingSubscriptionV3(params: InitiateLendingSubscriptionV3Request): Promise<APISuccessResponse<{
|
|
552
|
+
orderNo: string;
|
|
553
|
+
}[]>>;
|
|
554
|
+
submitLendingRedemptionV3(params: InitiateLendingRedemptionV3Request): Promise<APISuccessResponse<{
|
|
555
|
+
orderNo: string;
|
|
556
|
+
}[]>>;
|
|
557
|
+
updateLendingSubscriptionOrdersV3(params: ModifyLendingSubscriptionOrdersV3Request): Promise<any>;
|
|
558
|
+
getLendingRedemptionOrdersV3(params: GetLendingRedemptionOrdersV3Request): Promise<APISuccessResponse<LendingRedemption>>;
|
|
559
|
+
getLendingSubscriptionOrdersV3(params: GetLendingSubscriptionOrdersV3Request): Promise<APISuccessResponse<LendingRedemption>>;
|
|
560
|
+
/**
|
|
561
|
+
*
|
|
562
|
+
* REST - EARN -General
|
|
563
|
+
*
|
|
564
|
+
*/
|
|
565
|
+
/**
|
|
566
|
+
* Subscribe to Earn Fixed Income Products
|
|
567
|
+
*
|
|
568
|
+
* This endpoint allows subscribing to fixed income products.
|
|
569
|
+
* If the subscription fails, it returns the corresponding error code.
|
|
570
|
+
*/
|
|
571
|
+
subscribeEarnFixedIncome(params: SubscribeEarnFixedIncomeRequest): Promise<APISuccessResponse<SubscribeEarnFixedIncomeResponse>>;
|
|
572
|
+
/**
|
|
573
|
+
* Initiate redemption by holding ID
|
|
574
|
+
*
|
|
575
|
+
* This endpoint allows initiating redemption by holding ID. If the current holding is fully redeemed or in the process of being redeemed, it indicates that the holding does not exist.
|
|
576
|
+
*/
|
|
577
|
+
submitRedemption(params: InitiateRedemptionRequest): Promise<APISuccessResponse<InitiateRedemptionResponse>>;
|
|
578
|
+
/**
|
|
579
|
+
* Get Earn Redeem Preview by Holding ID
|
|
580
|
+
*
|
|
581
|
+
* This endpoint retrieves redemption preview information by holding ID. If the current holding is fully redeemed or in the process of being redeemed, it indicates that the holding does not exist.
|
|
582
|
+
*/
|
|
583
|
+
getEarnRedeemPreview(params: GetEarnRedeemPreviewRequest): Promise<APISuccessResponse<GetEarnRedeemPreviewResponse>>;
|
|
584
|
+
/**
|
|
585
|
+
*
|
|
586
|
+
* REST - EARN -KUCOIN EARN
|
|
587
|
+
*
|
|
588
|
+
*/
|
|
589
|
+
/**
|
|
590
|
+
* Get Earn Savings Products
|
|
591
|
+
*
|
|
592
|
+
* This endpoint retrieves savings products. If no savings products are available, an empty list is returned.
|
|
593
|
+
*/
|
|
594
|
+
getEarnSavingsProducts(params?: {
|
|
595
|
+
currency?: string;
|
|
596
|
+
}): Promise<APISuccessResponse<EarnProduct[]>>;
|
|
597
|
+
/**
|
|
598
|
+
* Get Earn Fixed Income Current Holdings
|
|
599
|
+
*
|
|
600
|
+
* This endpoint retrieves current holding assets of fixed income products. If no current holding assets are available, an empty list is returned.
|
|
601
|
+
*/
|
|
602
|
+
getEarnFixedIncomeHoldAssets(params?: GetEarnFixedIncomeHoldAssetsRequest): Promise<APISuccessResponse<EarnFixedIncomeHoldAssets>>;
|
|
603
|
+
/**
|
|
604
|
+
* Get Earn Limited-Time Promotion Products
|
|
605
|
+
*
|
|
606
|
+
* This endpoint retrieves limited-time promotion products. If no products are available, an empty list is returned.
|
|
607
|
+
*/
|
|
608
|
+
getEarnPromotionProducts(params?: {
|
|
609
|
+
currency?: string;
|
|
610
|
+
}): Promise<APISuccessResponse<EarnProduct[]>>;
|
|
611
|
+
/**
|
|
612
|
+
*
|
|
613
|
+
* REST - EARN - Staking
|
|
614
|
+
*
|
|
615
|
+
*/
|
|
616
|
+
/**
|
|
617
|
+
* Get Earn KCS Staking Products
|
|
618
|
+
*
|
|
619
|
+
* This endpoint retrieves KCS Staking products. If no KCS Staking products are available, an empty list is returned.
|
|
620
|
+
*
|
|
621
|
+
*/
|
|
622
|
+
getEarnKcsStakingProducts(params?: {
|
|
623
|
+
currency?: string;
|
|
624
|
+
}): Promise<APISuccessResponse<EarnProduct[]>>;
|
|
625
|
+
/**
|
|
626
|
+
* Get Earn Staking Products
|
|
627
|
+
*
|
|
628
|
+
* This endpoint retrieves staking products. If no staking products are available, an empty list is returned.
|
|
629
|
+
*/
|
|
630
|
+
getEarnStakingProducts(params?: {
|
|
631
|
+
currency?: string;
|
|
632
|
+
}): Promise<APISuccessResponse<EarnProduct[]>>;
|
|
633
|
+
/**
|
|
634
|
+
* Get Earn ETH Staking Products
|
|
635
|
+
*
|
|
636
|
+
* This endpoint retrieves ETH Staking products. If no ETH Staking products are available, an empty list is returned.
|
|
637
|
+
*
|
|
638
|
+
*/
|
|
639
|
+
getEarnEthStakingProducts(): Promise<APISuccessResponse<EarnProduct[]>>;
|
|
640
|
+
/**
|
|
641
|
+
*
|
|
642
|
+
* REST - VIP LENDING
|
|
643
|
+
*/
|
|
644
|
+
/**
|
|
645
|
+
* Get information on off-exchange funding and loans
|
|
646
|
+
*
|
|
647
|
+
* This endpoint is only for querying accounts that are currently involved in loans.
|
|
648
|
+
*
|
|
649
|
+
*/
|
|
650
|
+
getOtcLoan(): Promise<APISuccessResponse<OtcLoan>>;
|
|
651
|
+
/**
|
|
652
|
+
* Get information on accounts involved in off-exchange loans
|
|
653
|
+
*
|
|
654
|
+
* This endpoint is only for querying accounts that are currently involved in off-exchange funding and loans.
|
|
655
|
+
*/
|
|
656
|
+
getOtcLoanAccounts(): Promise<APISuccessResponse<OtcLoanAccount[]>>;
|
|
657
|
+
/**
|
|
658
|
+
*
|
|
659
|
+
* REST - AFFILIATE
|
|
660
|
+
*
|
|
661
|
+
*/
|
|
662
|
+
/**
|
|
663
|
+
* Get Affiliate User Rebate Information
|
|
664
|
+
*
|
|
665
|
+
* This endpoint allows getting affiliate user rebate information.
|
|
666
|
+
*
|
|
667
|
+
* @param params - The parameters for the request
|
|
668
|
+
* @returns A promise that resolves to the affiliate user rebate information
|
|
669
|
+
*/
|
|
670
|
+
getAffiliateUserRebateInfo(params: {
|
|
671
|
+
date: string;
|
|
672
|
+
maxCount?: number;
|
|
673
|
+
offset: string;
|
|
674
|
+
}): Promise<APISuccessResponse<any>>;
|
|
675
|
+
/**
|
|
676
|
+
* Get download link for broker rebate orders
|
|
677
|
+
*
|
|
678
|
+
* trade type 1 = spot, trade type 2 = futures
|
|
679
|
+
*/
|
|
680
|
+
getBrokerRebateOrderDownloadLink(params: {
|
|
681
|
+
begin: string;
|
|
682
|
+
end: string;
|
|
683
|
+
tradeType: 1 | 2;
|
|
684
|
+
}): Promise<APISuccessResponse<any>>;
|
|
685
|
+
/**
|
|
686
|
+
*
|
|
687
|
+
* WebSockets
|
|
688
|
+
*
|
|
689
|
+
*/
|
|
690
|
+
getPublicWSConnectionToken(): Promise<APISuccessResponse<WsConnectionInfo>>;
|
|
691
|
+
getPrivateWSConnectionToken(): Promise<APISuccessResponse<WsConnectionInfo>>;
|
|
692
|
+
}
|