gateio-api 1.0.4 → 1.0.6
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 +12 -6
- package/dist/cjs/RestClient.d.ts +559 -560
- package/dist/cjs/RestClient.js +271 -271
- package/dist/cjs/RestClient.js.map +1 -1
- package/dist/cjs/index.d.ts +0 -1
- package/dist/cjs/index.js +0 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/mjs/RestClient.d.ts +559 -560
- package/dist/mjs/RestClient.js +271 -271
- package/dist/mjs/RestClient.js.map +1 -1
- package/dist/mjs/index.d.ts +0 -1
- package/dist/mjs/index.js +0 -1
- package/dist/mjs/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/types/response/shared.d.ts +0 -5
- package/dist/cjs/types/response/shared.js +0 -3
- package/dist/cjs/types/response/shared.js.map +0 -1
- package/dist/mjs/types/response/shared.d.ts +0 -5
- package/dist/mjs/types/response/shared.js +0 -2
- package/dist/mjs/types/response/shared.js.map +0 -1
package/dist/cjs/RestClient.d.ts
CHANGED
|
@@ -30,7 +30,6 @@ import { LendingMarket, MarginUNIInterestRecord, MarginUNILoan, MarginUNILoanRec
|
|
|
30
30
|
import { MultiLoanAdjustmentRecord, MultiLoanCurrencyQuota, MultiLoanFixedRate, MultiLoanOrder, MultiLoanRatio, MultiLoanRepayRecord, MultiLoanSupportedCurrencies, RepayMultiLoanResp, UpdateMultiLoanResp } from './types/response/multicollateralLoan.js';
|
|
31
31
|
import { GetOptionsLiquidationResp, OptionsAccount, OptionsAccountChangeRecord, OptionsCandle, OptionsContract, OptionsOrderBook, OptionsPositionsUnderlying, OptionsSettlementHistoryRecord, OptionsTicker, OptionsTrade, OptionsUnderlyingCandle, OptionsUserHistoryRecord, OptionsUserSettlement, SubmitOptionsOrderResp } from './types/response/options.js';
|
|
32
32
|
import { AgencyCommissionHistoryRecord, AgencyTransactionHistoryRecord, BrokerCommissionHistoryRecord, BrokerTransactionHistoryRecord } from './types/response/rebate.js';
|
|
33
|
-
import { APIResponse } from './types/response/shared.js';
|
|
34
33
|
import { DeleteSpotBatchOrdersResp, GetSpotOpenOrdersResp, SpotAccount, SpotAccountBook, SpotCandle, SpotCurrency, SpotFeeRates, SpotHistoricTradeRecord, SpotOrder, SpotOrderBook, SpotPriceTriggeredOrder, SpotTicker, SpotTrade, SubmitSpotBatchOrdersResp } from './types/response/spot.js';
|
|
35
34
|
import { CreatedSubAccountAPIKey, SubAccount, SubAccountAPIKey } from './types/response/subaccount.js';
|
|
36
35
|
import { PortfolioMarginCalculation, UnifiedAccountInfo, UnifiedCurrencyDiscountTiers, UnifiedInterestRecord, UnifiedLoan, UnifiedLoanRecord, UnifiedRiskUnitDetails } from './types/response/unified.js';
|
|
@@ -43,7 +42,7 @@ import { CurrencyPair } from './types/shared.js';
|
|
|
43
42
|
export declare class RestClient extends BaseRestClient {
|
|
44
43
|
constructor(restClientOptions?: RestClientOptions, requestOptions?: AxiosRequestConfig);
|
|
45
44
|
getClientType(): RestClientType;
|
|
46
|
-
getSystemMaintenanceStatus(): Promise<
|
|
45
|
+
getSystemMaintenanceStatus(): Promise<any>;
|
|
47
46
|
/**================================================================================================================================
|
|
48
47
|
* WITHDRAW
|
|
49
48
|
* ==========================================================================================================================
|
|
@@ -54,18 +53,18 @@ export declare class RestClient extends BaseRestClient {
|
|
|
54
53
|
* Withdrawals to Gate addresses do not incur transaction fees.
|
|
55
54
|
*
|
|
56
55
|
* @param params Withdrawal parameters
|
|
57
|
-
* @returns Promise<
|
|
56
|
+
* @returns Promise<Withdraw>
|
|
58
57
|
*/
|
|
59
|
-
submitWithdrawal(params: SubmitWithdrawalReq): Promise<
|
|
58
|
+
submitWithdrawal(params: SubmitWithdrawalReq): Promise<WithdrawalRecord>;
|
|
60
59
|
/**
|
|
61
60
|
* Cancel withdrawal with specified ID
|
|
62
61
|
*
|
|
63
62
|
* @param params Parameters containing the withdrawal ID
|
|
64
|
-
* @returns Promise<
|
|
63
|
+
* @returns Promise<Withdraw>
|
|
65
64
|
*/
|
|
66
65
|
cancelWithdrawal(params: {
|
|
67
66
|
withdrawal_id: string;
|
|
68
|
-
}): Promise<
|
|
67
|
+
}): Promise<WithdrawalRecord>;
|
|
69
68
|
/**==========================================================================================================================
|
|
70
69
|
* WALLET
|
|
71
70
|
* ==========================================================================================================================
|
|
@@ -74,38 +73,38 @@ export declare class RestClient extends BaseRestClient {
|
|
|
74
73
|
* List chains supported for specified currency
|
|
75
74
|
*
|
|
76
75
|
* @param params Parameters containing the currency name
|
|
77
|
-
* @returns Promise<
|
|
76
|
+
* @returns Promise< GetCurrencyChainsResp[][]>
|
|
78
77
|
*/
|
|
79
78
|
getCurrencyChains(params: {
|
|
80
79
|
currency: string;
|
|
81
|
-
}): Promise<
|
|
80
|
+
}): Promise<CurrencyChain[]>;
|
|
82
81
|
/**
|
|
83
82
|
* Generate currency deposit address
|
|
84
83
|
*
|
|
85
84
|
* @param params Parameters containing the currency name
|
|
86
|
-
* @returns Promise<
|
|
85
|
+
* @returns Promise<CreateDepositAddressResp>
|
|
87
86
|
*/
|
|
88
87
|
createDepositAddress(params: {
|
|
89
88
|
currency: string;
|
|
90
|
-
}): Promise<
|
|
89
|
+
}): Promise<CreateDepositAddressResp>;
|
|
91
90
|
/**
|
|
92
91
|
* Retrieve withdrawal records
|
|
93
92
|
*
|
|
94
93
|
* Record time range cannot exceed 30 days
|
|
95
94
|
*
|
|
96
95
|
* @param params Parameters for filtering withdrawal records
|
|
97
|
-
* @returns Promise<
|
|
96
|
+
* @returns Promise<Withdraw[]>
|
|
98
97
|
*/
|
|
99
|
-
getWithdrawalRecords(params?: GetWithdrawalDepositRecordsReq): Promise<
|
|
98
|
+
getWithdrawalRecords(params?: GetWithdrawalDepositRecordsReq): Promise<WithdrawalRecord[]>;
|
|
100
99
|
/**
|
|
101
100
|
* Retrieve deposit records
|
|
102
101
|
*
|
|
103
102
|
* Record time range cannot exceed 30 days
|
|
104
103
|
*
|
|
105
104
|
* @param params Parameters for filtering deposit records
|
|
106
|
-
* @returns Promise<
|
|
105
|
+
* @returns Promise<Withdraw[]>
|
|
107
106
|
*/
|
|
108
|
-
getDepositRecords(params?: GetWithdrawalDepositRecordsReq): Promise<
|
|
107
|
+
getDepositRecords(params?: GetWithdrawalDepositRecordsReq): Promise<WithdrawalRecord[]>;
|
|
109
108
|
/**
|
|
110
109
|
* Transfer between trading accounts
|
|
111
110
|
*
|
|
@@ -117,20 +116,20 @@ export declare class RestClient extends BaseRestClient {
|
|
|
117
116
|
* - spot - options
|
|
118
117
|
*
|
|
119
118
|
* @param params Transfer parameters
|
|
120
|
-
* @returns Promise<
|
|
119
|
+
* @returns Promise<TransferResponse>
|
|
121
120
|
*/
|
|
122
|
-
submitTransfer(params: SubmitTransferReq): Promise<
|
|
121
|
+
submitTransfer(params: SubmitTransferReq): Promise<{
|
|
123
122
|
tx_id: number;
|
|
124
|
-
}
|
|
123
|
+
}>;
|
|
125
124
|
/**
|
|
126
125
|
* Transfer between main and sub accounts
|
|
127
126
|
*
|
|
128
127
|
* Support transferring with sub user's spot or futures account. Note that only main user's spot account is used no matter which sub user's account is operated.
|
|
129
128
|
*
|
|
130
129
|
* @param params Transfer parameters
|
|
131
|
-
* @returns Promise<
|
|
130
|
+
* @returns Promise<any>
|
|
132
131
|
*/
|
|
133
|
-
submitMainSubTransfer(params: SubmitMainSubTransferReq): Promise<
|
|
132
|
+
submitMainSubTransfer(params: SubmitMainSubTransferReq): Promise<any>;
|
|
134
133
|
/**
|
|
135
134
|
* Retrieve transfer records between main and sub accounts
|
|
136
135
|
*
|
|
@@ -139,92 +138,92 @@ export declare class RestClient extends BaseRestClient {
|
|
|
139
138
|
* Note: only records after 2020-04-10 can be retrieved
|
|
140
139
|
*
|
|
141
140
|
* @param params Parameters for filtering transfer records
|
|
142
|
-
* @returns Promise<
|
|
141
|
+
* @returns Promise<SubAccountTransferRecordResp[]>
|
|
143
142
|
*/
|
|
144
|
-
getMainSubTransfers(params?: GetMainSubTransfersReq): Promise<
|
|
143
|
+
getMainSubTransfers(params?: GetMainSubTransfersReq): Promise<SubAccountTransferRecord[]>;
|
|
145
144
|
/**
|
|
146
145
|
* Sub-account transfers to sub-account
|
|
147
146
|
*
|
|
148
147
|
* It is possible to perform balance transfers between two sub-accounts under the same main account. You can use either the API Key of the main account or the API Key of the sub-account to initiate the transfer.
|
|
149
148
|
*
|
|
150
149
|
* @param params Transfer parameters
|
|
151
|
-
* @returns Promise<
|
|
150
|
+
* @returns Promise<any>
|
|
152
151
|
*/
|
|
153
|
-
submitSubToSubTransfer(params: SubmitSubToSubTransferReq): Promise<
|
|
152
|
+
submitSubToSubTransfer(params: SubmitSubToSubTransferReq): Promise<any>;
|
|
154
153
|
/**
|
|
155
154
|
* Retrieve withdrawal status
|
|
156
155
|
*
|
|
157
156
|
* @param params Parameters for retrieving withdrawal status
|
|
158
|
-
* @returns Promise<
|
|
157
|
+
* @returns Promise<GetWithdrawalStatusResp[]>
|
|
159
158
|
*/
|
|
160
159
|
getWithdrawalStatus(params?: {
|
|
161
160
|
currency?: string;
|
|
162
|
-
}): Promise<
|
|
161
|
+
}): Promise<WithdrawalStatus[]>;
|
|
163
162
|
/**
|
|
164
163
|
* Retrieve sub account balances
|
|
165
164
|
*
|
|
166
165
|
* @param params Parameters for retrieving sub account balances
|
|
167
|
-
* @returns Promise<
|
|
166
|
+
* @returns Promise<{
|
|
168
167
|
uid: string;
|
|
169
168
|
available: { [key: string]: string };
|
|
170
|
-
}[]
|
|
169
|
+
}[]>
|
|
171
170
|
*/
|
|
172
171
|
getSubBalance(params?: {
|
|
173
172
|
sub_uid?: string;
|
|
174
|
-
}): Promise<
|
|
173
|
+
}): Promise<{
|
|
175
174
|
uid: string;
|
|
176
175
|
available: {
|
|
177
176
|
[key: string]: string;
|
|
178
177
|
};
|
|
179
|
-
}[]
|
|
178
|
+
}[]>;
|
|
180
179
|
/**
|
|
181
180
|
* Query sub accounts' margin balances
|
|
182
181
|
*
|
|
183
182
|
* @param params Parameters for querying sub accounts' margin balances
|
|
184
|
-
* @returns Promise<
|
|
183
|
+
* @returns Promise<SubAccountMarginBalancesResp[]>
|
|
185
184
|
*/
|
|
186
185
|
getSubMarginBalances(params?: {
|
|
187
186
|
sub_uid?: string;
|
|
188
|
-
}): Promise<
|
|
187
|
+
}): Promise<{
|
|
189
188
|
uid: string;
|
|
190
189
|
available: SubAccountMarginBalance[];
|
|
191
|
-
}
|
|
190
|
+
}>;
|
|
192
191
|
/**
|
|
193
192
|
* Query sub accounts' futures account balances
|
|
194
193
|
*
|
|
195
194
|
* @param params Parameters for querying sub accounts' futures account balances
|
|
196
|
-
* @returns Promise<
|
|
195
|
+
* @returns Promise<SubAccountFuturesBalancesResp[]>
|
|
197
196
|
*/
|
|
198
197
|
getSubFuturesBalances(params?: {
|
|
199
198
|
sub_uid?: string;
|
|
200
199
|
settle?: string;
|
|
201
|
-
}): Promise<
|
|
200
|
+
}): Promise<SubAccountFuturesBalancesResp[]>;
|
|
202
201
|
/**
|
|
203
202
|
* Query subaccount's cross_margin account info
|
|
204
203
|
*
|
|
205
204
|
* @param params Parameters for querying subaccount's cross_margin account info
|
|
206
|
-
* @returns Promise<
|
|
205
|
+
* @returns Promise<SubAccountCrossMarginBalancesResp[]>
|
|
207
206
|
*/
|
|
208
207
|
getSubCrossMarginBalances(params?: {
|
|
209
208
|
sub_uid?: string;
|
|
210
|
-
}): Promise<
|
|
209
|
+
}): Promise<SubAccountCrossMarginBalancesResp[]>;
|
|
211
210
|
/**
|
|
212
211
|
* Query saved addresses
|
|
213
212
|
*
|
|
214
213
|
* @param params Parameters for querying saved address
|
|
215
|
-
* @returns Promise<
|
|
214
|
+
* @returns Promise<GetSavedAddressResp[]>
|
|
216
215
|
*/
|
|
217
|
-
getSavedAddresses(params: GetSavedAddressReq): Promise<
|
|
216
|
+
getSavedAddresses(params: GetSavedAddressReq): Promise<SavedAddress[]>;
|
|
218
217
|
/**
|
|
219
218
|
* Retrieve personal trading fee
|
|
220
219
|
*
|
|
221
220
|
* @param params Parameters for retrieving personal trading fee
|
|
222
|
-
* @returns Promise<
|
|
221
|
+
* @returns Promise<GetTradingFeesResp>
|
|
223
222
|
*/
|
|
224
223
|
getTradingFees(params?: {
|
|
225
224
|
currency_pair?: string;
|
|
226
225
|
settle?: 'BTC' | 'USDT' | 'USD';
|
|
227
|
-
}): Promise<
|
|
226
|
+
}): Promise<TradingFees>;
|
|
228
227
|
/**
|
|
229
228
|
* Retrieve user's total balances
|
|
230
229
|
*
|
|
@@ -237,33 +236,33 @@ export declare class RestClient extends BaseRestClient {
|
|
|
237
236
|
* - GET /futures/{settle}/accounts to query futures account balance
|
|
238
237
|
*
|
|
239
238
|
* @param params Parameters for retrieving total balances
|
|
240
|
-
* @returns Promise<
|
|
239
|
+
* @returns Promise<GetBalancesResp>
|
|
241
240
|
*/
|
|
242
241
|
getBalances(params?: {
|
|
243
242
|
currency?: string;
|
|
244
|
-
}): Promise<
|
|
243
|
+
}): Promise<GetBalancesResp>;
|
|
245
244
|
/**
|
|
246
245
|
* List small balance
|
|
247
246
|
*
|
|
248
|
-
* @returns Promise<
|
|
247
|
+
* @returns Promise<GetSmallBalancesResp>
|
|
249
248
|
*/
|
|
250
|
-
getSmallBalances(): Promise<
|
|
249
|
+
getSmallBalances(): Promise<SmallBalanceRecord>;
|
|
251
250
|
/**
|
|
252
251
|
* Convert small balance
|
|
253
252
|
*
|
|
254
253
|
* @param params Parameters for converting small balance
|
|
255
|
-
* @returns Promise<
|
|
254
|
+
* @returns Promise<any>
|
|
256
255
|
*/
|
|
257
256
|
convertSmallBalance(params?: {
|
|
258
257
|
currency?: string[];
|
|
259
|
-
}): Promise<
|
|
258
|
+
}): Promise<any>;
|
|
260
259
|
/**
|
|
261
260
|
* List small balance history
|
|
262
261
|
*
|
|
263
262
|
* @param params Parameters for listing small balance history
|
|
264
|
-
* @returns Promise<
|
|
263
|
+
* @returns Promise<GetSmallBalanceHistoryResp[]>
|
|
265
264
|
*/
|
|
266
|
-
getSmallBalanceHistory(params?: GetSmallBalanceHistoryReq): Promise<
|
|
265
|
+
getSmallBalanceHistory(params?: GetSmallBalanceHistoryReq): Promise<SmallBalanceHistoryRecord[]>;
|
|
267
266
|
/**==========================================================================================================================
|
|
268
267
|
* SUBACCOUNT
|
|
269
268
|
* ==========================================================================================================================
|
|
@@ -272,88 +271,88 @@ export declare class RestClient extends BaseRestClient {
|
|
|
272
271
|
* Create a new sub-account
|
|
273
272
|
*
|
|
274
273
|
* @param params Parameters for creating a new sub-account
|
|
275
|
-
* @returns Promise<
|
|
274
|
+
* @returns Promise<CreateSubAccountResp>
|
|
276
275
|
*/
|
|
277
|
-
createSubAccount(params: CreateSubAccountReq): Promise<
|
|
276
|
+
createSubAccount(params: CreateSubAccountReq): Promise<SubAccount>;
|
|
278
277
|
/**
|
|
279
278
|
* List sub-accounts
|
|
280
279
|
*
|
|
281
280
|
* @param params Parameters for listing sub-accounts
|
|
282
|
-
* @returns Promise<
|
|
281
|
+
* @returns Promise<GetSubAccountsResp[]>
|
|
283
282
|
*/
|
|
284
283
|
getSubAccounts(params?: {
|
|
285
284
|
type?: string;
|
|
286
|
-
}): Promise<
|
|
285
|
+
}): Promise<SubAccount[]>;
|
|
287
286
|
/**
|
|
288
287
|
* Get the sub-account
|
|
289
288
|
*
|
|
290
289
|
* @param params Parameters containing the sub-account user ID
|
|
291
|
-
* @returns Promise<
|
|
290
|
+
* @returns Promise<SubAccountResp>
|
|
292
291
|
*/
|
|
293
292
|
getSubAccount(params: {
|
|
294
293
|
user_id: number;
|
|
295
|
-
}): Promise<
|
|
294
|
+
}): Promise<SubAccount>;
|
|
296
295
|
/**
|
|
297
296
|
* Create API Key of the sub-account
|
|
298
297
|
*
|
|
299
298
|
* @param params Parameters for creating API Key of the sub-account
|
|
300
|
-
* @returns Promise<
|
|
299
|
+
* @returns Promise<CreateSubAccountApiKeyResp>
|
|
301
300
|
*/
|
|
302
|
-
createSubAccountApiKey(params: CreateSubAccountApiKeyReq): Promise<
|
|
301
|
+
createSubAccountApiKey(params: CreateSubAccountApiKeyReq): Promise<CreatedSubAccountAPIKey>;
|
|
303
302
|
/**
|
|
304
303
|
* List all API Key of the sub-account
|
|
305
304
|
*
|
|
306
305
|
* @param params Parameters containing the sub-account user ID
|
|
307
|
-
* @returns Promise<
|
|
306
|
+
* @returns Promise<SubAccountKey[]>
|
|
308
307
|
*/
|
|
309
308
|
getSubAccountApiKeys(params: {
|
|
310
309
|
user_id: number;
|
|
311
|
-
}): Promise<
|
|
310
|
+
}): Promise<SubAccountAPIKey[]>;
|
|
312
311
|
/**
|
|
313
312
|
* Update API key of the sub-account
|
|
314
313
|
*
|
|
315
314
|
* @param params Parameters for updating API key of the sub-account
|
|
316
|
-
* @returns Promise<
|
|
315
|
+
* @returns Promise<any>
|
|
317
316
|
*/
|
|
318
|
-
updateSubAccountApiKey(params: UpdateSubAccountApiKeyReq): Promise<
|
|
317
|
+
updateSubAccountApiKey(params: UpdateSubAccountApiKeyReq): Promise<any>;
|
|
319
318
|
/**
|
|
320
319
|
* Delete API key of the sub-account
|
|
321
320
|
*
|
|
322
321
|
* @param params Parameters for deleting API key of the sub-account
|
|
323
|
-
* @returns Promise<
|
|
322
|
+
* @returns Promise<any>
|
|
324
323
|
*/
|
|
325
324
|
deleteSubAccountApiKey(params: {
|
|
326
325
|
user_id: number;
|
|
327
326
|
key: string;
|
|
328
|
-
}): Promise<
|
|
327
|
+
}): Promise<any>;
|
|
329
328
|
/**
|
|
330
329
|
* Get the API Key of the sub-account
|
|
331
330
|
*
|
|
332
331
|
* @param params Parameters containing the sub-account user ID and API key
|
|
333
|
-
* @returns Promise<
|
|
332
|
+
* @returns Promise<SubAccountKey>
|
|
334
333
|
*/
|
|
335
334
|
getSubAccountApiKey(params: {
|
|
336
335
|
user_id: number;
|
|
337
336
|
key: string;
|
|
338
|
-
}): Promise<
|
|
337
|
+
}): Promise<SubAccountAPIKey>;
|
|
339
338
|
/**
|
|
340
339
|
* Lock the sub-account
|
|
341
340
|
*
|
|
342
341
|
* @param params Parameters containing the sub-account user ID
|
|
343
|
-
* @returns Promise<
|
|
342
|
+
* @returns Promise<any>
|
|
344
343
|
*/
|
|
345
344
|
lockSubAccount(params: {
|
|
346
345
|
user_id: number;
|
|
347
|
-
}): Promise<
|
|
346
|
+
}): Promise<any>;
|
|
348
347
|
/**
|
|
349
348
|
* Unlock the sub-account
|
|
350
349
|
*
|
|
351
350
|
* @param params Parameters containing the sub-account user ID
|
|
352
|
-
* @returns Promise<
|
|
351
|
+
* @returns Promise<any>
|
|
353
352
|
*/
|
|
354
353
|
unlockSubAccount(params: {
|
|
355
354
|
user_id: number;
|
|
356
|
-
}): Promise<
|
|
355
|
+
}): Promise<any>;
|
|
357
356
|
/**==========================================================================================================================
|
|
358
357
|
* UNIFIED
|
|
359
358
|
* ==========================================================================================================================
|
|
@@ -364,41 +363,41 @@ export declare class RestClient extends BaseRestClient {
|
|
|
364
363
|
* The assets of each currency in the account will be adjusted according to their liquidity, defined by corresponding adjustment coefficients, and then uniformly converted to USD to calculate the total asset value and position value of the account.
|
|
365
364
|
*
|
|
366
365
|
* @param params Parameters for retrieving unified account information
|
|
367
|
-
* @returns Promise<
|
|
366
|
+
* @returns Promise<GetUnifiedAccountInfoResp>
|
|
368
367
|
*/
|
|
369
368
|
getUnifiedAccountInfo(params?: {
|
|
370
369
|
currency?: string;
|
|
371
|
-
}): Promise<
|
|
370
|
+
}): Promise<UnifiedAccountInfo>;
|
|
372
371
|
/**
|
|
373
372
|
* Query about the maximum borrowing for the unified account
|
|
374
373
|
*
|
|
375
374
|
* @param params Parameters for querying the maximum borrowing for the unified account
|
|
376
|
-
* @returns Promise<
|
|
375
|
+
* @returns Promise<{
|
|
377
376
|
* currency: string;
|
|
378
377
|
* amount: string;
|
|
379
|
-
* }
|
|
378
|
+
* }>
|
|
380
379
|
*/
|
|
381
380
|
getUnifiedMaxBorrow(params: {
|
|
382
381
|
currency: string;
|
|
383
|
-
}): Promise<
|
|
382
|
+
}): Promise<{
|
|
384
383
|
currency: string;
|
|
385
384
|
amount: string;
|
|
386
|
-
}
|
|
385
|
+
}>;
|
|
387
386
|
/**
|
|
388
387
|
* Query about the maximum transferable for the unified account
|
|
389
388
|
*
|
|
390
389
|
* @param params Parameters for querying the maximum transferable for the unified account
|
|
391
|
-
* @returns Promise<
|
|
390
|
+
* @returns Promise<{
|
|
392
391
|
* currency: string;
|
|
393
392
|
* amount: string;
|
|
394
|
-
* }
|
|
393
|
+
* }>
|
|
395
394
|
*/
|
|
396
395
|
getUnifiedMaxTransferable(params: {
|
|
397
396
|
currency: string;
|
|
398
|
-
}): Promise<
|
|
397
|
+
}): Promise<{
|
|
399
398
|
currency: string;
|
|
400
399
|
amount: string;
|
|
401
|
-
}
|
|
400
|
+
}>;
|
|
402
401
|
/**
|
|
403
402
|
* Borrow or repay
|
|
404
403
|
*
|
|
@@ -409,85 +408,85 @@ export declare class RestClient extends BaseRestClient {
|
|
|
409
408
|
* For repayment, the option to repay the entire borrowed amount is available by setting the parameter repaid_all=true
|
|
410
409
|
*
|
|
411
410
|
* @param params Parameters for borrowing or repaying
|
|
412
|
-
* @returns Promise<
|
|
411
|
+
* @returns Promise<any>
|
|
413
412
|
*/
|
|
414
|
-
submitUnifiedBorrowOrRepay(params: SubmitUnifiedBorrowOrRepayReq): Promise<
|
|
413
|
+
submitUnifiedBorrowOrRepay(params: SubmitUnifiedBorrowOrRepayReq): Promise<any>;
|
|
415
414
|
/**
|
|
416
415
|
* List loans
|
|
417
416
|
*
|
|
418
417
|
* @param params Parameters for listing loans
|
|
419
|
-
* @returns Promise<
|
|
418
|
+
* @returns Promise<GetUnifiedLoansResp[]>
|
|
420
419
|
*/
|
|
421
|
-
getUnifiedLoans(params?: GetUnifiedLoansReq): Promise<
|
|
420
|
+
getUnifiedLoans(params?: GetUnifiedLoansReq): Promise<UnifiedLoan[]>;
|
|
422
421
|
/**
|
|
423
422
|
* Get loan records
|
|
424
423
|
*
|
|
425
424
|
* @param params Parameters for getting loan records
|
|
426
|
-
* @returns Promise<
|
|
425
|
+
* @returns Promise<GetUnifiedLoanRecordsResp[]>
|
|
427
426
|
*/
|
|
428
|
-
getUnifiedLoanRecords(params?: GetUnifiedLoanRecordsReq): Promise<
|
|
427
|
+
getUnifiedLoanRecords(params?: GetUnifiedLoanRecordsReq): Promise<UnifiedLoanRecord[]>;
|
|
429
428
|
/**
|
|
430
429
|
* List interest records
|
|
431
430
|
*
|
|
432
431
|
* @param params Parameters for listing interest records
|
|
433
|
-
* @returns Promise<
|
|
432
|
+
* @returns Promise<GetUnifiedInterestRecordsResp[]>
|
|
434
433
|
*/
|
|
435
|
-
getUnifiedInterestRecords(params?: GetUnifiedInterestRecordsReq): Promise<
|
|
434
|
+
getUnifiedInterestRecords(params?: GetUnifiedInterestRecordsReq): Promise<UnifiedInterestRecord[]>;
|
|
436
435
|
/**
|
|
437
436
|
* Retrieve user risk unit details, only valid in portfolio margin mode
|
|
438
437
|
*
|
|
439
|
-
* @returns Promise<
|
|
438
|
+
* @returns Promise<GetUnifiedRiskUnitDetailsResp>
|
|
440
439
|
*/
|
|
441
|
-
getUnifiedRiskUnitDetails(): Promise<
|
|
440
|
+
getUnifiedRiskUnitDetails(): Promise<UnifiedRiskUnitDetails>;
|
|
442
441
|
/**
|
|
443
442
|
* Set mode of the unified account
|
|
444
443
|
*
|
|
445
444
|
* Switching between different account modes requires only passing the parameters corresponding to the target account mode. It also supports opening or closing configuration switches for the corresponding account mode when switching.
|
|
446
445
|
*
|
|
447
446
|
* @param params Parameters for setting the mode of the unified account
|
|
448
|
-
* @returns Promise<
|
|
447
|
+
* @returns Promise<any>
|
|
449
448
|
*/
|
|
450
|
-
setUnifiedAccountMode(params: SetUnifiedAccountModeReq): Promise<
|
|
449
|
+
setUnifiedAccountMode(params: SetUnifiedAccountModeReq): Promise<any>;
|
|
451
450
|
/**
|
|
452
451
|
* Query mode of the unified account
|
|
453
452
|
*
|
|
454
|
-
* @returns Promise<
|
|
453
|
+
* @returns Promise<{
|
|
455
454
|
* mode: 'classic' | 'multi_currency' | 'portfolio';
|
|
456
455
|
* settings: {
|
|
457
456
|
* usdt_futures?: boolean;
|
|
458
457
|
* spot_hedge?: boolean;
|
|
459
458
|
* };
|
|
460
|
-
* }
|
|
459
|
+
* }>
|
|
461
460
|
*/
|
|
462
|
-
getUnifiedAccountMode(): Promise<
|
|
461
|
+
getUnifiedAccountMode(): Promise<SetUnifiedAccountModeReq>;
|
|
463
462
|
/**
|
|
464
463
|
* Get unified estimate rate
|
|
465
464
|
*
|
|
466
465
|
* Due to fluctuations in lending depth, hourly interest rates may vary, and thus, I cannot provide exact rates. When a currency is not supported, the interest rate returned will be an empty string.
|
|
467
466
|
*
|
|
468
467
|
* @param params Parameters for querying estimate rates
|
|
469
|
-
* @returns Promise<
|
|
468
|
+
* @returns Promise<{ [key: string]: string }>
|
|
470
469
|
*/
|
|
471
470
|
getUnifiedEstimateRate(params: {
|
|
472
471
|
currencies: string[];
|
|
473
|
-
}): Promise<
|
|
472
|
+
}): Promise<{
|
|
474
473
|
[key: string]: string;
|
|
475
|
-
}
|
|
474
|
+
}>;
|
|
476
475
|
/**
|
|
477
476
|
* List currency discount tiers
|
|
478
477
|
*
|
|
479
|
-
* @returns Promise<
|
|
478
|
+
* @returns Promise<GetUnifiedCurrencyDiscountTiersResp[]>
|
|
480
479
|
*/
|
|
481
|
-
getUnifiedCurrencyDiscountTiers(): Promise<
|
|
480
|
+
getUnifiedCurrencyDiscountTiers(): Promise<UnifiedCurrencyDiscountTiers[]>;
|
|
482
481
|
/**
|
|
483
482
|
* Portfolio margin calculator
|
|
484
483
|
*
|
|
485
484
|
* Portfolio Margin Calculator When inputting a simulated position portfolio, each position includes the position name and quantity held, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. When inputting simulated orders, each order includes the market identifier, order price, and order quantity, supporting markets within the range of BTC and ETH perpetual contracts, options, and spot markets. Market orders are not included.
|
|
486
485
|
*
|
|
487
486
|
* @param params Parameters for portfolio margin calculator
|
|
488
|
-
* @returns Promise<
|
|
487
|
+
* @returns Promise<PortfolioMarginCalculatorResp>
|
|
489
488
|
*/
|
|
490
|
-
portfolioMarginCalculate(params: PortfolioMarginCalculatorReq): Promise<
|
|
489
|
+
portfolioMarginCalculate(params: PortfolioMarginCalculatorReq): Promise<PortfolioMarginCalculation>;
|
|
491
490
|
/**==========================================================================================================================
|
|
492
491
|
* SPOT
|
|
493
492
|
* ==========================================================================================================================
|
|
@@ -501,54 +500,54 @@ export declare class RestClient extends BaseRestClient {
|
|
|
501
500
|
*
|
|
502
501
|
* The latter one occurs when one currency has multiple chains. Currency detail contains a chain field whatever the form is. To retrieve all chains of one currency, you can use all the details which have the name of the currency or name starting with <currency>_.
|
|
503
502
|
*
|
|
504
|
-
* @returns Promise<
|
|
503
|
+
* @returns Promise<GetSpotCurrenciesResp[]>
|
|
505
504
|
*/
|
|
506
|
-
getSpotCurrencies(): Promise<
|
|
505
|
+
getSpotCurrencies(): Promise<SpotCurrency[]>;
|
|
507
506
|
/**
|
|
508
507
|
* Get details of a specific currency
|
|
509
508
|
*
|
|
510
509
|
* @param params Parameters for retrieving details of a specific currency
|
|
511
|
-
* @returns Promise<
|
|
510
|
+
* @returns Promise<GetSpotCurrenciesResp>
|
|
512
511
|
*/
|
|
513
512
|
getSpotCurrency(params: {
|
|
514
513
|
currency: string;
|
|
515
|
-
}): Promise<
|
|
514
|
+
}): Promise<SpotCurrency>;
|
|
516
515
|
/**
|
|
517
516
|
* List all currency pairs supported
|
|
518
517
|
*
|
|
519
|
-
* @returns Promise<
|
|
518
|
+
* @returns Promise<CurrencyPair[]>
|
|
520
519
|
*/
|
|
521
|
-
getSpotCurrencyPairs(): Promise<
|
|
520
|
+
getSpotCurrencyPairs(): Promise<CurrencyPair[]>;
|
|
522
521
|
/**
|
|
523
522
|
* Get details of a specific currency pair
|
|
524
523
|
*
|
|
525
524
|
* @param params Parameters for retrieving details of a specific currency pair
|
|
526
|
-
* @returns Promise<
|
|
525
|
+
* @returns Promise<CurrencyPair>
|
|
527
526
|
*/
|
|
528
527
|
getSpotCurrencyPair(params: {
|
|
529
528
|
currency_pair: string;
|
|
530
|
-
}): Promise<
|
|
529
|
+
}): Promise<CurrencyPair>;
|
|
531
530
|
/**
|
|
532
531
|
* Retrieve ticker information
|
|
533
532
|
*
|
|
534
533
|
* Return only related data if currency_pair is specified; otherwise return all of them.
|
|
535
534
|
*
|
|
536
535
|
* @param params Parameters for retrieving ticker information
|
|
537
|
-
* @returns Promise<
|
|
536
|
+
* @returns Promise<GetSpotTickerResp[]>
|
|
538
537
|
*/
|
|
539
538
|
getSpotTicker(params?: {
|
|
540
539
|
currency_pair?: string;
|
|
541
540
|
timezone?: 'utc0' | 'utc8' | 'all';
|
|
542
|
-
}): Promise<
|
|
541
|
+
}): Promise<SpotTicker[]>;
|
|
543
542
|
/**
|
|
544
543
|
* Retrieve order book
|
|
545
544
|
*
|
|
546
545
|
* Order book will be sorted by price from high to low on bids; low to high on asks.
|
|
547
546
|
*
|
|
548
547
|
* @param params Parameters for retrieving order book
|
|
549
|
-
* @returns Promise<
|
|
548
|
+
* @returns Promise<GetSpotOrderBookResp>
|
|
550
549
|
*/
|
|
551
|
-
getSpotOrderBook(params: GetSpotOrderBookReq): Promise<
|
|
550
|
+
getSpotOrderBook(params: GetSpotOrderBookReq): Promise<SpotOrderBook>;
|
|
552
551
|
/**
|
|
553
552
|
* Retrieve market trades
|
|
554
553
|
*
|
|
@@ -556,29 +555,29 @@ export declare class RestClient extends BaseRestClient {
|
|
|
556
555
|
* Scrolling query using last_id is not recommended any more. If last_id is specified, time range query parameters will be ignored.
|
|
557
556
|
*
|
|
558
557
|
* @param params Parameters for retrieving market trades
|
|
559
|
-
* @returns Promise<
|
|
558
|
+
* @returns Promise<GetSpotTradesResp[]>
|
|
560
559
|
*/
|
|
561
|
-
getSpotTrades(params: GetSpotTradesReq): Promise<
|
|
560
|
+
getSpotTrades(params: GetSpotTradesReq): Promise<SpotTrade[]>;
|
|
562
561
|
/**
|
|
563
562
|
* Market Candles
|
|
564
563
|
*
|
|
565
564
|
* Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval.
|
|
566
565
|
*
|
|
567
566
|
* @param params Parameters for retrieving market Candles
|
|
568
|
-
* @returns Promise<
|
|
567
|
+
* @returns Promise<GetSpotCandlesResp>
|
|
569
568
|
*/
|
|
570
|
-
getSpotCandles(params: GetSpotCandlesReq): Promise<
|
|
569
|
+
getSpotCandles(params: GetSpotCandlesReq): Promise<SpotCandle[]>;
|
|
571
570
|
/**
|
|
572
571
|
* Query user trading fee rates
|
|
573
572
|
*
|
|
574
573
|
* This API is deprecated in favour of new fee retrieving API /wallet/fee.
|
|
575
574
|
*
|
|
576
575
|
* @param params Parameters for querying user trading fee rates
|
|
577
|
-
* @returns Promise<
|
|
576
|
+
* @returns Promise<GetSpotFeeRatesResp>
|
|
578
577
|
*/
|
|
579
578
|
getSpotFeeRates(params?: {
|
|
580
579
|
currency_pair?: string;
|
|
581
|
-
}): Promise<
|
|
580
|
+
}): Promise<SpotFeeRates>;
|
|
582
581
|
/**
|
|
583
582
|
* Query a batch of user trading fee rates
|
|
584
583
|
*
|
|
@@ -586,25 +585,25 @@ export declare class RestClient extends BaseRestClient {
|
|
|
586
585
|
*/
|
|
587
586
|
getSpotBatchFeeRates(params: {
|
|
588
587
|
currency_pairs: string;
|
|
589
|
-
}): Promise<
|
|
588
|
+
}): Promise<Record<string, SpotFeeRates>>;
|
|
590
589
|
/**
|
|
591
590
|
* List spot accounts
|
|
592
591
|
*
|
|
593
592
|
* @param params Parameters for listing spot accounts
|
|
594
|
-
* @returns Promise<
|
|
593
|
+
* @returns Promise<GetSpotAccountsResp[]>
|
|
595
594
|
*/
|
|
596
595
|
getSpotAccounts(params?: {
|
|
597
596
|
currency?: string;
|
|
598
|
-
}): Promise<
|
|
597
|
+
}): Promise<SpotAccount[]>;
|
|
599
598
|
/**
|
|
600
599
|
* Query account book
|
|
601
600
|
*
|
|
602
601
|
* Record time range cannot exceed 30 days.
|
|
603
602
|
*
|
|
604
603
|
* @param params Parameters for querying account book
|
|
605
|
-
* @returns Promise<
|
|
604
|
+
* @returns Promise<GetSpotAccountBookResp[]>
|
|
606
605
|
*/
|
|
607
|
-
getSpotAccountBook(params?: GetSpotAccountBookReq): Promise<
|
|
606
|
+
getSpotAccountBook(params?: GetSpotAccountBookReq): Promise<SpotAccountBook[]>;
|
|
608
607
|
/**
|
|
609
608
|
* Create a batch of orders
|
|
610
609
|
*
|
|
@@ -614,9 +613,9 @@ export declare class RestClient extends BaseRestClient {
|
|
|
614
613
|
* - No mixture of spot orders and margin orders, i.e. account must be identical for all orders
|
|
615
614
|
*
|
|
616
615
|
* @param params Parameters for creating a batch of orders
|
|
617
|
-
* @returns Promise<
|
|
616
|
+
* @returns Promise<SubmitSpotBatchOrdersResp[]>
|
|
618
617
|
*/
|
|
619
|
-
submitSpotBatchOrders(params: SpotOrder[]): Promise<
|
|
618
|
+
submitSpotBatchOrders(params: SpotOrder[]): Promise<SubmitSpotBatchOrdersResp[]>;
|
|
620
619
|
/**
|
|
621
620
|
* List all open orders
|
|
622
621
|
*
|
|
@@ -625,40 +624,40 @@ export declare class RestClient extends BaseRestClient {
|
|
|
625
624
|
* Spot, portfolio, and margin orders are returned by default. To list cross margin orders, account must be set to cross_margin.
|
|
626
625
|
*
|
|
627
626
|
* @param params Parameters for listing all open orders
|
|
628
|
-
* @returns Promise<
|
|
627
|
+
* @returns Promise<GetSpotOpenOrdersResp[]>
|
|
629
628
|
*/
|
|
630
629
|
getSpotOpenOrders(params?: {
|
|
631
630
|
page?: number;
|
|
632
631
|
limit?: number;
|
|
633
632
|
account?: 'spot' | 'margin' | 'cross_margin' | 'unified';
|
|
634
|
-
}): Promise<
|
|
633
|
+
}): Promise<GetSpotOpenOrdersResp[]>;
|
|
635
634
|
/**
|
|
636
635
|
* Close position when cross-currency is disabled
|
|
637
636
|
*
|
|
638
637
|
* Currently, only cross-margin accounts are supported to close position when cross currencies are disabled. Maximum buy quantity = (unpaid principal and interest - currency balance - the amount of the currency in the order book) / 0.998
|
|
639
638
|
*
|
|
640
639
|
* @param params Parameters for closing position when cross-currency is disabled
|
|
641
|
-
* @returns Promise<
|
|
640
|
+
* @returns Promise<Order>
|
|
642
641
|
*/
|
|
643
|
-
submitSpotClosePosCrossDisabled(params: SubmitSpotClosePosCrossDisabledReq): Promise<
|
|
642
|
+
submitSpotClosePosCrossDisabled(params: SubmitSpotClosePosCrossDisabledReq): Promise<SpotOrder>;
|
|
644
643
|
/**
|
|
645
644
|
* Create an order
|
|
646
645
|
*
|
|
647
646
|
* You can place orders with spot, portfolio, margin or cross margin account through setting the account field. It defaults to spot, which means spot account is used to place orders. If the user is using unified account, it defaults to the unified account.
|
|
648
647
|
*
|
|
649
648
|
* @param params Parameters for creating an order
|
|
650
|
-
* @returns Promise<
|
|
649
|
+
* @returns Promise<Order>
|
|
651
650
|
*/
|
|
652
|
-
submitSpotOrder(params: SubmitSpotOrderReq): Promise<
|
|
651
|
+
submitSpotOrder(params: SubmitSpotOrderReq): Promise<SpotOrder>;
|
|
653
652
|
/**
|
|
654
653
|
* List orders
|
|
655
654
|
*
|
|
656
655
|
* Spot, portfolio and margin orders are returned by default. If cross margin orders are needed, account must be set to cross_margin.
|
|
657
656
|
*
|
|
658
657
|
* @param params Parameters for listing orders
|
|
659
|
-
* @returns Promise<
|
|
658
|
+
* @returns Promise<Order[]>
|
|
660
659
|
*/
|
|
661
|
-
getSpotOrders(params: GetSpotOrdersReq): Promise<
|
|
660
|
+
getSpotOrders(params: GetSpotOrdersReq): Promise<SpotOrder[]>;
|
|
662
661
|
/**
|
|
663
662
|
* Cancel all open orders in specified currency pair
|
|
664
663
|
*
|
|
@@ -666,32 +665,32 @@ export declare class RestClient extends BaseRestClient {
|
|
|
666
665
|
* You can set account to cancel only orders within the specified account.
|
|
667
666
|
*
|
|
668
667
|
* @param params Parameters for cancelling all open orders in specified currency pair
|
|
669
|
-
* @returns Promise<
|
|
668
|
+
* @returns Promise<Order[]>
|
|
670
669
|
*/
|
|
671
670
|
cancelSpotOpenOrders(params: {
|
|
672
671
|
currency_pair: string;
|
|
673
672
|
side?: 'buy' | 'sell';
|
|
674
673
|
account?: 'spot' | 'margin' | 'cross_margin' | 'unified';
|
|
675
674
|
action_mode?: 'ACK' | 'RESULT' | 'FULL';
|
|
676
|
-
}): Promise<
|
|
675
|
+
}): Promise<SpotOrder[]>;
|
|
677
676
|
/**
|
|
678
677
|
* Cancel a batch of orders with an ID list
|
|
679
678
|
*
|
|
680
679
|
* Multiple currency pairs can be specified, but maximum 20 orders are allowed per request.
|
|
681
680
|
*
|
|
682
681
|
* @param params Parameters for cancelling a batch of orders
|
|
683
|
-
* @returns Promise<
|
|
682
|
+
* @returns Promise<DeleteSpotBatchOrdersResp[]>
|
|
684
683
|
*/
|
|
685
|
-
batchCancelSpotOrders(params: CancelSpotBatchOrdersReq[]): Promise<
|
|
684
|
+
batchCancelSpotOrders(params: CancelSpotBatchOrdersReq[]): Promise<DeleteSpotBatchOrdersResp[]>;
|
|
686
685
|
/**
|
|
687
686
|
* Get a single order
|
|
688
687
|
*
|
|
689
688
|
* Spot, portfolio and margin orders are queried by default. If cross margin orders are needed or portfolio margin account are used, account must be set to cross_margin.
|
|
690
689
|
*
|
|
691
690
|
* @param params Parameters for getting a single order
|
|
692
|
-
* @returns Promise<
|
|
691
|
+
* @returns Promise<Order>
|
|
693
692
|
*/
|
|
694
|
-
getSpotOrder(params: GetSpotOrderReq): Promise<
|
|
693
|
+
getSpotOrder(params: GetSpotOrderReq): Promise<SpotOrder>;
|
|
695
694
|
/**
|
|
696
695
|
* Amend an order
|
|
697
696
|
*
|
|
@@ -700,18 +699,18 @@ export declare class RestClient extends BaseRestClient {
|
|
|
700
699
|
* Currently, only supports modification of price or amount fields.
|
|
701
700
|
*
|
|
702
701
|
* @param params Parameters for amending an order
|
|
703
|
-
* @returns Promise<
|
|
702
|
+
* @returns Promise<Order>
|
|
704
703
|
*/
|
|
705
|
-
updateSpotOrder(params: UpdateSpotOrderReq): Promise<
|
|
704
|
+
updateSpotOrder(params: UpdateSpotOrderReq): Promise<SpotOrder>;
|
|
706
705
|
/**
|
|
707
706
|
* Cancel a single order
|
|
708
707
|
*
|
|
709
708
|
* Spot, portfolio and margin orders are cancelled by default. If trying to cancel cross margin orders or portfolio margin account are used, account must be set to cross_margin.
|
|
710
709
|
*
|
|
711
710
|
* @param params Parameters for cancelling a single order
|
|
712
|
-
* @returns Promise<
|
|
711
|
+
* @returns Promise<Order>
|
|
713
712
|
*/
|
|
714
|
-
cancelSpotOrder(params: DeleteSpotOrderReq): Promise<
|
|
713
|
+
cancelSpotOrder(params: DeleteSpotOrderReq): Promise<SpotOrder>;
|
|
715
714
|
/**
|
|
716
715
|
* List personal trading history
|
|
717
716
|
*
|
|
@@ -720,90 +719,90 @@ export declare class RestClient extends BaseRestClient {
|
|
|
720
719
|
* You can also set from and/or to to query by time range. If you don't specify from and/or to parameters, only the last 7 days of data will be returned. The range of from and to is not allowed to exceed 30 days. Time range parameters are handled as order finish time.
|
|
721
720
|
*
|
|
722
721
|
* @param params Parameters for listing personal trading history
|
|
723
|
-
* @returns Promise<
|
|
722
|
+
* @returns Promise<GetSpotTradingHistoryResp[]>
|
|
724
723
|
*/
|
|
725
|
-
getSpotTradingHistory(params?: GetSpotTradingHistoryReq): Promise<
|
|
724
|
+
getSpotTradingHistory(params?: GetSpotTradingHistoryReq): Promise<SpotHistoricTradeRecord[]>;
|
|
726
725
|
/**
|
|
727
726
|
* Get server current time
|
|
728
727
|
*
|
|
729
|
-
* @returns Promise<
|
|
728
|
+
* @returns Promise<{
|
|
730
729
|
* server_time: number;
|
|
731
|
-
* }
|
|
730
|
+
* }>
|
|
732
731
|
*/
|
|
733
|
-
getServerTime(): Promise<
|
|
732
|
+
getServerTime(): Promise<{
|
|
734
733
|
server_time: number;
|
|
735
|
-
}
|
|
734
|
+
}>;
|
|
736
735
|
/**
|
|
737
736
|
* Countdown cancel orders
|
|
738
737
|
*
|
|
739
738
|
* When the timeout set by the user is reached, if there is no cancel or set a new countdown, the related pending orders will be automatically cancelled. This endpoint can be called repeatedly to set a new countdown or cancel the countdown.
|
|
740
739
|
*
|
|
741
740
|
* @param params Parameters for setting countdown cancel orders
|
|
742
|
-
* @returns Promise<
|
|
741
|
+
* @returns Promise<{
|
|
743
742
|
* triggerTime: number;
|
|
744
|
-
* }
|
|
743
|
+
* }>
|
|
745
744
|
*/
|
|
746
745
|
submitSpotCountdownOrders(params: {
|
|
747
746
|
timeout: number;
|
|
748
747
|
currency_pair?: string;
|
|
749
|
-
}): Promise<
|
|
748
|
+
}): Promise<{
|
|
750
749
|
triggerTime: number;
|
|
751
|
-
}
|
|
750
|
+
}>;
|
|
752
751
|
/**
|
|
753
752
|
* Batch modification of orders
|
|
754
753
|
*
|
|
755
754
|
* Default modification of orders for spot, portfolio, and margin accounts. To modify orders for a cross margin account, the account parameter must be specified as cross_margin. For portfolio margin accounts, the account parameter can only be specified as cross_margin. Currently, only modifications to price or quantity (choose one) are supported.
|
|
756
755
|
*
|
|
757
756
|
* @param params Parameters for batch modification of orders
|
|
758
|
-
* @returns Promise<
|
|
757
|
+
* @returns Promise<Order[]>
|
|
759
758
|
*/
|
|
760
|
-
batchUpdateSpotOrders(params: UpdateSpotBatchOrdersReq[]): Promise<
|
|
759
|
+
batchUpdateSpotOrders(params: UpdateSpotBatchOrdersReq[]): Promise<SpotOrder[]>;
|
|
761
760
|
/**
|
|
762
761
|
* Create a price-triggered order
|
|
763
762
|
*
|
|
764
763
|
* @param params Parameters for creating a price-triggered order
|
|
765
|
-
* @returns Promise<
|
|
764
|
+
* @returns Promise<{
|
|
766
765
|
* id: number;
|
|
767
|
-
* }
|
|
766
|
+
* }>
|
|
768
767
|
*/
|
|
769
|
-
submitSpotPriceTriggerOrder(params: SpotPriceTriggeredOrder): Promise<
|
|
768
|
+
submitSpotPriceTriggerOrder(params: SpotPriceTriggeredOrder): Promise<{
|
|
770
769
|
id: number;
|
|
771
|
-
}
|
|
770
|
+
}>;
|
|
772
771
|
/**
|
|
773
772
|
* Retrieve running auto order list
|
|
774
773
|
*
|
|
775
774
|
* @param params Parameters for retrieving running auto order list
|
|
776
|
-
* @returns Promise<
|
|
775
|
+
* @returns Promise<SpotPriceTriggeredOrder[]>
|
|
777
776
|
*/
|
|
778
|
-
getSpotAutoOrders(params: GetSpotAutoOrdersReq): Promise<
|
|
777
|
+
getSpotAutoOrders(params: GetSpotAutoOrdersReq): Promise<SpotPriceTriggeredOrder[]>;
|
|
779
778
|
/**
|
|
780
779
|
* Cancel all open orders
|
|
781
780
|
*
|
|
782
781
|
* @param params Parameters for cancelling all open orders
|
|
783
|
-
* @returns Promise<
|
|
782
|
+
* @returns Promise<SpotPriceTriggeredOrder[]>
|
|
784
783
|
*/
|
|
785
784
|
cancelAllOpenSpotOrders(params?: {
|
|
786
785
|
market?: string;
|
|
787
786
|
account?: 'normal' | 'margin' | 'cross_margin';
|
|
788
|
-
}): Promise<
|
|
787
|
+
}): Promise<SpotPriceTriggeredOrder[]>;
|
|
789
788
|
/**
|
|
790
789
|
* Get a price-triggered order
|
|
791
790
|
*
|
|
792
791
|
* @param params Parameters for getting a price-triggered order
|
|
793
|
-
* @returns Promise<
|
|
792
|
+
* @returns Promise<SpotPriceTriggeredOrder>
|
|
794
793
|
*/
|
|
795
794
|
getPriceTriggeredOrder(params: {
|
|
796
795
|
order_id: string;
|
|
797
|
-
}): Promise<
|
|
796
|
+
}): Promise<SpotPriceTriggeredOrder>;
|
|
798
797
|
/**
|
|
799
798
|
* Cancel a price-triggered order
|
|
800
799
|
*
|
|
801
800
|
* @param params Parameters for cancelling a price-triggered order
|
|
802
|
-
* @returns Promise<
|
|
801
|
+
* @returns Promise<SpotPriceTriggeredOrder>
|
|
803
802
|
*/
|
|
804
803
|
cancelSpotTriggeredOrder(params: {
|
|
805
804
|
order_id: string;
|
|
806
|
-
}): Promise<
|
|
805
|
+
}): Promise<SpotPriceTriggeredOrder>;
|
|
807
806
|
/**==========================================================================================================================
|
|
808
807
|
* MARGIN
|
|
809
808
|
* ==========================================================================================================================
|
|
@@ -812,204 +811,204 @@ export declare class RestClient extends BaseRestClient {
|
|
|
812
811
|
* Margin account list
|
|
813
812
|
*
|
|
814
813
|
* @param params Parameters for listing margin accounts
|
|
815
|
-
* @returns Promise<
|
|
814
|
+
* @returns Promise<GetMarginAccountsResp[]>
|
|
816
815
|
*/
|
|
817
816
|
getMarginAccounts(params?: {
|
|
818
817
|
currency_pair?: string;
|
|
819
|
-
}): Promise<
|
|
818
|
+
}): Promise<MarginAccount[]>;
|
|
820
819
|
/**
|
|
821
820
|
* List margin account balance change history
|
|
822
821
|
*
|
|
823
822
|
* Only transferals from and to margin account are provided for now. Time range allows 30 days at most.
|
|
824
823
|
*
|
|
825
824
|
* @param params Parameters for listing margin account balance change history
|
|
826
|
-
* @returns Promise<
|
|
825
|
+
* @returns Promise<GetMarginBalanceHistoryResp[]>
|
|
827
826
|
*/
|
|
828
|
-
getMarginBalanceHistory(params?: GetMarginBalanceHistoryReq): Promise<
|
|
827
|
+
getMarginBalanceHistory(params?: GetMarginBalanceHistoryReq): Promise<MarginBalanceHistoryRecord[]>;
|
|
829
828
|
/**
|
|
830
829
|
* Funding account list
|
|
831
830
|
*
|
|
832
831
|
* @param params Parameters for listing funding accounts
|
|
833
|
-
* @returns Promise<
|
|
832
|
+
* @returns Promise<{
|
|
834
833
|
* currency: string;
|
|
835
834
|
* available: string;
|
|
836
835
|
* locked: string;
|
|
837
836
|
* lent: string;
|
|
838
837
|
* total_lent: string;
|
|
839
|
-
* }[]
|
|
838
|
+
* }[]>
|
|
840
839
|
*/
|
|
841
840
|
getFundingAccounts(params?: {
|
|
842
841
|
currency?: string;
|
|
843
|
-
}): Promise<
|
|
842
|
+
}): Promise<{
|
|
844
843
|
currency: string;
|
|
845
844
|
available: string;
|
|
846
845
|
locked: string;
|
|
847
846
|
lent: string;
|
|
848
847
|
total_lent: string;
|
|
849
|
-
}[]
|
|
848
|
+
}[]>;
|
|
850
849
|
/**
|
|
851
850
|
* Update user's auto repayment setting
|
|
852
851
|
*
|
|
853
852
|
* @param params Parameters for updating auto repayment setting
|
|
854
|
-
* @returns Promise<
|
|
853
|
+
* @returns Promise<{ status: 'on' | 'off' }>
|
|
855
854
|
*/
|
|
856
855
|
updateAutoRepaymentSetting(params: {
|
|
857
856
|
status: 'on' | 'off';
|
|
858
|
-
}): Promise<
|
|
857
|
+
}): Promise<{
|
|
859
858
|
status: 'on' | 'off';
|
|
860
|
-
}
|
|
859
|
+
}>;
|
|
861
860
|
/**
|
|
862
861
|
* Retrieve user auto repayment setting
|
|
863
862
|
*
|
|
864
|
-
* @returns Promise<
|
|
863
|
+
* @returns Promise<{ status: 'on' | 'off' }>
|
|
865
864
|
*/
|
|
866
|
-
getAutoRepaymentSetting(): Promise<
|
|
865
|
+
getAutoRepaymentSetting(): Promise<{
|
|
867
866
|
status: 'on' | 'off';
|
|
868
|
-
}
|
|
867
|
+
}>;
|
|
869
868
|
/**
|
|
870
869
|
* Get the max transferable amount for a specific margin currency
|
|
871
870
|
*
|
|
872
871
|
* @param params Parameters for retrieving the max transferable amount
|
|
873
|
-
* @returns Promise<
|
|
872
|
+
* @returns Promise<{
|
|
874
873
|
* currency: string;
|
|
875
874
|
* currency_pair?: string;
|
|
876
875
|
* amount: string;
|
|
877
|
-
* }
|
|
876
|
+
* }>
|
|
878
877
|
*/
|
|
879
878
|
getMarginTransferableAmount(params: {
|
|
880
879
|
currency: string;
|
|
881
880
|
currency_pair?: string;
|
|
882
|
-
}): Promise<
|
|
881
|
+
}): Promise<{
|
|
883
882
|
currency: string;
|
|
884
883
|
currency_pair?: string;
|
|
885
884
|
amount: string;
|
|
886
|
-
}
|
|
885
|
+
}>;
|
|
887
886
|
/**
|
|
888
887
|
* Currencies supported by cross margin
|
|
889
888
|
*
|
|
890
|
-
* @returns Promise<
|
|
889
|
+
* @returns Promise<GetCrossMarginCurrenciesResp[]>
|
|
891
890
|
*/
|
|
892
|
-
getCrossMarginCurrencies(): Promise<
|
|
891
|
+
getCrossMarginCurrencies(): Promise<CrossMarginCurrency[]>;
|
|
893
892
|
/**
|
|
894
893
|
* Retrieve detail of one single currency supported by cross margin
|
|
895
894
|
*
|
|
896
895
|
* @param params Parameters containing the currency name
|
|
897
|
-
* @returns Promise<
|
|
896
|
+
* @returns Promise<GetCrossMarginCurrenciesResp>
|
|
898
897
|
*/
|
|
899
898
|
getCrossMarginCurrency(params: {
|
|
900
899
|
currency: string;
|
|
901
|
-
}): Promise<
|
|
900
|
+
}): Promise<CrossMarginCurrency>;
|
|
902
901
|
/**
|
|
903
902
|
* Retrieve cross margin account
|
|
904
903
|
*
|
|
905
|
-
* @returns Promise<
|
|
904
|
+
* @returns Promise<GetCrossMarginAccountResp>
|
|
906
905
|
*/
|
|
907
|
-
getCrossMarginAccount(): Promise<
|
|
906
|
+
getCrossMarginAccount(): Promise<CrossMarginAccount>;
|
|
908
907
|
/**
|
|
909
908
|
* Retrieve cross margin account change history
|
|
910
909
|
*
|
|
911
910
|
* Record time range cannot exceed 30 days.
|
|
912
911
|
*
|
|
913
912
|
* @param params Parameters for retrieving cross margin account change history
|
|
914
|
-
* @returns Promise<
|
|
913
|
+
* @returns Promise<GetCrossMarginAccountHistoryResp[]>
|
|
915
914
|
*/
|
|
916
|
-
getCrossMarginAccountHistory(params?: GetCrossMarginAccountHistoryReq): Promise<
|
|
915
|
+
getCrossMarginAccountHistory(params?: GetCrossMarginAccountHistoryReq): Promise<CrossMarginAccountHistoryRecord[]>;
|
|
917
916
|
/**
|
|
918
917
|
* Create a cross margin borrow loan
|
|
919
918
|
*
|
|
920
919
|
* Borrow amount cannot be less than currency minimum borrow amount.
|
|
921
920
|
*
|
|
922
921
|
* @param params Parameters for creating a cross margin borrow loan
|
|
923
|
-
* @returns Promise<
|
|
922
|
+
* @returns Promise<SubmitCrossMarginBorrowLoanResp>
|
|
924
923
|
*/
|
|
925
|
-
submitCrossMarginBorrowLoan(params: SubmitCrossMarginBorrowLoanReq): Promise<
|
|
924
|
+
submitCrossMarginBorrowLoan(params: SubmitCrossMarginBorrowLoanReq): Promise<CrossMarginMorrowLoanRecord>;
|
|
926
925
|
/**
|
|
927
926
|
* List cross margin borrow history
|
|
928
927
|
*
|
|
929
928
|
* Sort by creation time in descending order by default. Set reverse=false to return ascending results.
|
|
930
929
|
*
|
|
931
930
|
* @param params Parameters for listing cross margin borrow history
|
|
932
|
-
* @returns Promise<
|
|
931
|
+
* @returns Promise<SubmitCrossMarginBorrowLoanResp[]>
|
|
933
932
|
*/
|
|
934
|
-
getCrossMarginBorrowHistory(params: GetCrossMarginBorrowHistoryReq): Promise<
|
|
933
|
+
getCrossMarginBorrowHistory(params: GetCrossMarginBorrowHistoryReq): Promise<CrossMarginMorrowLoanRecord[]>;
|
|
935
934
|
/**
|
|
936
935
|
* Retrieve single borrow loan detail
|
|
937
936
|
*
|
|
938
937
|
* @param params Parameters containing the borrow loan ID
|
|
939
|
-
* @returns Promise<
|
|
938
|
+
* @returns Promise<SubmitCrossMarginBorrowLoanResp>
|
|
940
939
|
*/
|
|
941
940
|
getCrossMarginBorrowLoan(params: {
|
|
942
941
|
loan_id: string;
|
|
943
|
-
}): Promise<
|
|
942
|
+
}): Promise<CrossMarginMorrowLoanRecord>;
|
|
944
943
|
/**
|
|
945
944
|
* Cross margin repayments
|
|
946
945
|
*
|
|
947
946
|
* When the liquidity of the currency is insufficient and the transaction risk is high, the currency will be disabled, and funds cannot be transferred. When the available balance of cross-margin is insufficient, the balance of the spot account can be used for repayment. Please ensure that the balance of the spot account is sufficient, and system uses cross-margin account for repayment first.
|
|
948
947
|
*
|
|
949
948
|
* @param params Parameters for cross margin repayments
|
|
950
|
-
* @returns Promise<
|
|
949
|
+
* @returns Promise<SubmitCrossMarginBorrowLoanResp[]>
|
|
951
950
|
*/
|
|
952
951
|
submitCrossMarginRepayment(params: {
|
|
953
952
|
currency: string;
|
|
954
953
|
amount: string;
|
|
955
|
-
}): Promise<
|
|
954
|
+
}): Promise<CrossMarginMorrowLoanRecord[]>;
|
|
956
955
|
/**
|
|
957
956
|
* Retrieve cross margin repayments
|
|
958
957
|
*
|
|
959
958
|
* Sort by creation time in descending order by default. Set reverse=false to return ascending results.
|
|
960
959
|
*
|
|
961
960
|
* @param params Parameters for retrieving cross margin repayments
|
|
962
|
-
* @returns Promise<
|
|
961
|
+
* @returns Promise<GetCrossMarginRepaymentsResp[]>
|
|
963
962
|
*/
|
|
964
|
-
getCrossMarginRepayments(params?: GetCrossMarginRepaymentsReq): Promise<
|
|
963
|
+
getCrossMarginRepayments(params?: GetCrossMarginRepaymentsReq): Promise<CrossMarginAccount[]>;
|
|
965
964
|
/**
|
|
966
965
|
* Interest records for the cross margin account
|
|
967
966
|
*
|
|
968
967
|
* @param params Parameters for retrieving interest records
|
|
969
|
-
* @returns Promise<
|
|
968
|
+
* @returns Promise<GetCrossMarginInterestRecordsResp[]>
|
|
970
969
|
*/
|
|
971
|
-
getCrossMarginInterestRecords(params?: GetCrossMarginInterestRecordsReq): Promise<
|
|
970
|
+
getCrossMarginInterestRecords(params?: GetCrossMarginInterestRecordsReq): Promise<GetCrossMarginInterestRecordsReq[]>;
|
|
972
971
|
/**
|
|
973
972
|
* Get the max transferable amount for a specific cross margin currency
|
|
974
973
|
*
|
|
975
974
|
* @param params Parameters for retrieving the max transferable amount
|
|
976
|
-
* @returns Promise<
|
|
975
|
+
* @returns Promise<{
|
|
977
976
|
* currency: string;
|
|
978
977
|
* amount: string;
|
|
979
|
-
* }
|
|
978
|
+
* }>
|
|
980
979
|
*/
|
|
981
980
|
getCrossMarginTransferableAmount(params: {
|
|
982
981
|
currency: string;
|
|
983
|
-
}): Promise<
|
|
982
|
+
}): Promise<{
|
|
984
983
|
currency: string;
|
|
985
984
|
amount: string;
|
|
986
|
-
}
|
|
985
|
+
}>;
|
|
987
986
|
/**
|
|
988
987
|
* Estimated interest rates
|
|
989
988
|
*
|
|
990
989
|
* Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate.
|
|
991
990
|
*
|
|
992
991
|
* @param params Parameters for retrieving estimated interest rates
|
|
993
|
-
* @returns Promise<
|
|
992
|
+
* @returns Promise<any>
|
|
994
993
|
*/
|
|
995
994
|
getEstimatedInterestRates(params: {
|
|
996
995
|
currencies: string[];
|
|
997
|
-
}): Promise<
|
|
996
|
+
}): Promise<any>;
|
|
998
997
|
/**
|
|
999
998
|
* Get the max borrowable amount for a specific cross margin currency
|
|
1000
999
|
*
|
|
1001
1000
|
* @param params Parameters for retrieving the max borrowable amount
|
|
1002
|
-
* @returns Promise<
|
|
1001
|
+
* @returns Promise<{
|
|
1003
1002
|
* currency: string;
|
|
1004
1003
|
* amount: string;
|
|
1005
|
-
* }
|
|
1004
|
+
* }>
|
|
1006
1005
|
*/
|
|
1007
1006
|
getCrossMarginBorrowableAmount(params: {
|
|
1008
1007
|
currency: string;
|
|
1009
|
-
}): Promise<
|
|
1008
|
+
}): Promise<{
|
|
1010
1009
|
currency: string;
|
|
1011
1010
|
amount: string;
|
|
1012
|
-
}
|
|
1011
|
+
}>;
|
|
1013
1012
|
/**==========================================================================================================================
|
|
1014
1013
|
* MARGIN UNI
|
|
1015
1014
|
* ==========================================================================================================================
|
|
@@ -1017,34 +1016,34 @@ export declare class RestClient extends BaseRestClient {
|
|
|
1017
1016
|
/**
|
|
1018
1017
|
* List lending markets
|
|
1019
1018
|
*
|
|
1020
|
-
* @returns Promise<
|
|
1019
|
+
* @returns Promise<GetLendingMarketsResp[]>
|
|
1021
1020
|
*/
|
|
1022
|
-
getLendingMarkets(): Promise<
|
|
1021
|
+
getLendingMarkets(): Promise<LendingMarket[]>;
|
|
1023
1022
|
/**
|
|
1024
1023
|
* Get detail of lending market
|
|
1025
1024
|
*
|
|
1026
1025
|
* @param params Parameters containing the currency pair
|
|
1027
|
-
* @returns Promise<
|
|
1026
|
+
* @returns Promise<{
|
|
1028
1027
|
* currency_pair: string;
|
|
1029
1028
|
* base_min_borrow_amount: string;
|
|
1030
1029
|
* quote_min_borrow_amount: string;
|
|
1031
1030
|
* leverage: string;
|
|
1032
|
-
* }
|
|
1031
|
+
* }>
|
|
1033
1032
|
*/
|
|
1034
1033
|
getLendingMarket(params: {
|
|
1035
1034
|
currency_pair: string;
|
|
1036
|
-
}): Promise<
|
|
1035
|
+
}): Promise<LendingMarket>;
|
|
1037
1036
|
/**
|
|
1038
1037
|
* Estimate interest rate
|
|
1039
1038
|
*
|
|
1040
1039
|
* Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate.
|
|
1041
1040
|
*
|
|
1042
1041
|
* @param params Parameters for retrieving estimated interest rates
|
|
1043
|
-
* @returns Promise<
|
|
1042
|
+
* @returns Promise<any>
|
|
1044
1043
|
*/
|
|
1045
1044
|
getEstimatedInterestRate(params: {
|
|
1046
1045
|
currencies: string[];
|
|
1047
|
-
}): Promise<
|
|
1046
|
+
}): Promise<any>;
|
|
1048
1047
|
/**
|
|
1049
1048
|
* Borrow or repay
|
|
1050
1049
|
*
|
|
@@ -1062,30 +1061,30 @@ export declare class RestClient extends BaseRestClient {
|
|
|
1062
1061
|
* List loans
|
|
1063
1062
|
*
|
|
1064
1063
|
* @param params Parameters for listing loans
|
|
1065
|
-
* @returns Promise<
|
|
1064
|
+
* @returns Promise<GetMarginUNILoansResp[]>
|
|
1066
1065
|
*/
|
|
1067
|
-
getMarginUNILoans(params?: GetMarginUNILoansReq): Promise<
|
|
1066
|
+
getMarginUNILoans(params?: GetMarginUNILoansReq): Promise<MarginUNILoan[]>;
|
|
1068
1067
|
/**
|
|
1069
1068
|
* Get loan records
|
|
1070
1069
|
*
|
|
1071
1070
|
* @param params Parameters for retrieving loan records
|
|
1072
|
-
* @returns Promise<
|
|
1071
|
+
* @returns Promise<GetMarginUNILoanRecordsResp[]>
|
|
1073
1072
|
*/
|
|
1074
|
-
getMarginUNILoanRecords(params?: GetMarginUNILoanRecordsReq): Promise<
|
|
1073
|
+
getMarginUNILoanRecords(params?: GetMarginUNILoanRecordsReq): Promise<MarginUNILoanRecord[]>;
|
|
1075
1074
|
/**
|
|
1076
1075
|
* List interest records
|
|
1077
1076
|
*
|
|
1078
1077
|
* @param params Parameters for listing interest records
|
|
1079
|
-
* @returns Promise<
|
|
1078
|
+
* @returns Promise<GetMarginUNIInterestRecordsResp[]>
|
|
1080
1079
|
*/
|
|
1081
|
-
getMarginUNIInterestRecords(params?: GetMarginUNIInterestRecordsReq): Promise<
|
|
1080
|
+
getMarginUNIInterestRecords(params?: GetMarginUNIInterestRecordsReq): Promise<MarginUNIInterestRecord[]>;
|
|
1082
1081
|
/**
|
|
1083
1082
|
* Get maximum borrowable
|
|
1084
1083
|
*
|
|
1085
1084
|
* @param params Parameters for retrieving the maximum borrowable amount
|
|
1086
|
-
* @returns Promise<
|
|
1085
|
+
* @returns Promise<GetMarginUNIMaxBorrowResp>
|
|
1087
1086
|
*/
|
|
1088
|
-
getMarginUNIMaxBorrow(params: GetMarginUNIMaxBorrowReq): Promise<
|
|
1087
|
+
getMarginUNIMaxBorrow(params: GetMarginUNIMaxBorrowReq): Promise<MarginUNIMaxBorrowable>;
|
|
1089
1088
|
/**==========================================================================================================================
|
|
1090
1089
|
* FLASH SWAP
|
|
1091
1090
|
* ==========================================================================================================================
|
|
@@ -1094,43 +1093,43 @@ export declare class RestClient extends BaseRestClient {
|
|
|
1094
1093
|
* List All Supported Currency Pairs In Flash Swap
|
|
1095
1094
|
*
|
|
1096
1095
|
* @param params Parameters for retrieving data of the specified currency
|
|
1097
|
-
* @returns Promise<
|
|
1096
|
+
* @returns Promise<GetFlashSwapCurrencyPairsResp[]>
|
|
1098
1097
|
*/
|
|
1099
1098
|
getFlashSwapCurrencyPairs(params?: {
|
|
1100
1099
|
currency?: string;
|
|
1101
|
-
}): Promise<
|
|
1100
|
+
}): Promise<FlashSwapCurrencyPair[]>;
|
|
1102
1101
|
/**
|
|
1103
1102
|
* Create a flash swap order
|
|
1104
1103
|
*
|
|
1105
1104
|
* Initiate a flash swap preview in advance because order creation requires a preview result.
|
|
1106
1105
|
*
|
|
1107
1106
|
* @param params Parameters for creating a flash swap order
|
|
1108
|
-
* @returns Promise<
|
|
1107
|
+
* @returns Promise<SubmitFlashSwapOrderResp>
|
|
1109
1108
|
*/
|
|
1110
|
-
submitFlashSwapOrder(params: SubmitFlashSwapOrderReq): Promise<
|
|
1109
|
+
submitFlashSwapOrder(params: SubmitFlashSwapOrderReq): Promise<FlashSwapOrder>;
|
|
1111
1110
|
/**
|
|
1112
1111
|
* List all flash swap orders
|
|
1113
1112
|
*
|
|
1114
1113
|
* @param params Parameters for listing flash swap orders
|
|
1115
|
-
* @returns Promise<
|
|
1114
|
+
* @returns Promise<GetFlashSwapOrdersResp[]>
|
|
1116
1115
|
*/
|
|
1117
|
-
getFlashSwapOrders(params?: GetFlashSwapOrdersReq): Promise<
|
|
1116
|
+
getFlashSwapOrders(params?: GetFlashSwapOrdersReq): Promise<FlashSwapOrder[]>;
|
|
1118
1117
|
/**
|
|
1119
1118
|
* Get a single flash swap order's detail
|
|
1120
1119
|
*
|
|
1121
1120
|
* @param params Parameters containing the flash swap order ID
|
|
1122
|
-
* @returns Promise<
|
|
1121
|
+
* @returns Promise<GetFlashSwapOrderResp>
|
|
1123
1122
|
*/
|
|
1124
1123
|
getFlashSwapOrder(params: {
|
|
1125
1124
|
order_id: number;
|
|
1126
|
-
}): Promise<
|
|
1125
|
+
}): Promise<FlashSwapOrder>;
|
|
1127
1126
|
/**
|
|
1128
1127
|
* Initiate a flash swap order preview
|
|
1129
1128
|
*
|
|
1130
1129
|
* @param params Parameters for initiating a flash swap order preview
|
|
1131
|
-
* @returns Promise<
|
|
1130
|
+
* @returns Promise<SubmitFlashSwapOrderPreviewResp>
|
|
1132
1131
|
*/
|
|
1133
|
-
submitFlashSwapOrderPreview(params: SubmitFlashSwapOrderPreviewReq): Promise<
|
|
1132
|
+
submitFlashSwapOrderPreview(params: SubmitFlashSwapOrderPreviewReq): Promise<SubmitFlashSwapOrderPreviewResp>;
|
|
1134
1133
|
/**==========================================================================================================================
|
|
1135
1134
|
* FUTURES
|
|
1136
1135
|
* ==========================================================================================================================
|
|
@@ -1139,39 +1138,39 @@ export declare class RestClient extends BaseRestClient {
|
|
|
1139
1138
|
* List all futures contracts
|
|
1140
1139
|
*
|
|
1141
1140
|
* @param params Parameters for listing futures contracts
|
|
1142
|
-
* @returns Promise<
|
|
1141
|
+
* @returns Promise<Contract[]>
|
|
1143
1142
|
*/
|
|
1144
1143
|
getFuturesContracts(params: {
|
|
1145
1144
|
settle: 'btc' | 'usdt' | 'usd';
|
|
1146
1145
|
limit?: number;
|
|
1147
1146
|
offset?: number;
|
|
1148
|
-
}): Promise<
|
|
1147
|
+
}): Promise<FuturesContract[]>;
|
|
1149
1148
|
/**
|
|
1150
1149
|
* Get a single contract
|
|
1151
1150
|
*
|
|
1152
1151
|
* @param params Parameters for retrieving a single contract
|
|
1153
|
-
* @returns Promise<
|
|
1152
|
+
* @returns Promise<Contract>
|
|
1154
1153
|
*/
|
|
1155
1154
|
getFuturesContract(params: {
|
|
1156
1155
|
settle: 'btc' | 'usdt' | 'usd';
|
|
1157
1156
|
contract: string;
|
|
1158
|
-
}): Promise<
|
|
1157
|
+
}): Promise<FuturesContract>;
|
|
1159
1158
|
/**
|
|
1160
1159
|
* Futures order book
|
|
1161
1160
|
*
|
|
1162
1161
|
* Bids will be sorted by price from high to low, while asks sorted reversely.
|
|
1163
1162
|
*
|
|
1164
1163
|
* @param params Parameters for retrieving the futures order book
|
|
1165
|
-
* @returns Promise<
|
|
1164
|
+
* @returns Promise<GetFuturesOrderBookResp>
|
|
1166
1165
|
*/
|
|
1167
|
-
getFuturesOrderBook(params: GetFuturesOrderBookReq): Promise<
|
|
1166
|
+
getFuturesOrderBook(params: GetFuturesOrderBookReq): Promise<FuturesOrderBook>;
|
|
1168
1167
|
/**
|
|
1169
1168
|
* Futures trading history
|
|
1170
1169
|
*
|
|
1171
1170
|
* @param params Parameters for retrieving futures trading history
|
|
1172
|
-
* @returns Promise<
|
|
1171
|
+
* @returns Promise<GetFuturesTradesResp[]>
|
|
1173
1172
|
*/
|
|
1174
|
-
getFuturesTrades(params: GetFuturesTradesReq): Promise<
|
|
1173
|
+
getFuturesTrades(params: GetFuturesTradesReq): Promise<FuturesTrade[]>;
|
|
1175
1174
|
/**
|
|
1176
1175
|
* Get futures Candles
|
|
1177
1176
|
*
|
|
@@ -1180,87 +1179,87 @@ export declare class RestClient extends BaseRestClient {
|
|
|
1180
1179
|
* Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying from, to and interval.
|
|
1181
1180
|
*
|
|
1182
1181
|
* @param params Parameters for retrieving futures Candles
|
|
1183
|
-
* @returns Promise<
|
|
1182
|
+
* @returns Promise<GetFuturesCandlesResp[]>
|
|
1184
1183
|
*/
|
|
1185
|
-
getFuturesCandles(params: GetFuturesCandlesReq): Promise<
|
|
1184
|
+
getFuturesCandles(params: GetFuturesCandlesReq): Promise<FuturesCandle[]>;
|
|
1186
1185
|
/**
|
|
1187
1186
|
* Premium Index K-Line
|
|
1188
1187
|
*
|
|
1189
1188
|
* Maximum of 1000 points can be returned in a query. Be sure not to exceed the limit when specifying from, to and interval.
|
|
1190
1189
|
*
|
|
1191
1190
|
* @param params Parameters for retrieving premium index K-Line
|
|
1192
|
-
* @returns Promise<
|
|
1191
|
+
* @returns Promise<GetPremiumIndexKLineResp[]>
|
|
1193
1192
|
*/
|
|
1194
|
-
getPremiumIndexKLines(params: GetFuturesCandlesReq): Promise<
|
|
1193
|
+
getPremiumIndexKLines(params: GetFuturesCandlesReq): Promise<PremiumIndexKLine[]>;
|
|
1195
1194
|
/**
|
|
1196
1195
|
* List futures tickers
|
|
1197
1196
|
*
|
|
1198
1197
|
* @param params Parameters for listing futures tickers
|
|
1199
|
-
* @returns Promise<
|
|
1198
|
+
* @returns Promise<GetFuturesTickersResp[]>
|
|
1200
1199
|
*/
|
|
1201
1200
|
getFuturesTickers(params: {
|
|
1202
1201
|
settle: 'btc' | 'usdt' | 'usd';
|
|
1203
1202
|
contract?: string;
|
|
1204
|
-
}): Promise<
|
|
1203
|
+
}): Promise<FuturesTicker[]>;
|
|
1205
1204
|
/**
|
|
1206
1205
|
* Funding rate history
|
|
1207
1206
|
*
|
|
1208
1207
|
* @param params Parameters for retrieving funding rate history
|
|
1209
|
-
* @returns Promise<
|
|
1208
|
+
* @returns Promise<{
|
|
1210
1209
|
* t: number;
|
|
1211
1210
|
* r: string;
|
|
1212
|
-
* }[]
|
|
1211
|
+
* }[]>
|
|
1213
1212
|
*/
|
|
1214
1213
|
getFundingRates(params: {
|
|
1215
1214
|
settle: 'btc' | 'usdt' | 'usd';
|
|
1216
1215
|
contract: string;
|
|
1217
1216
|
limit?: number;
|
|
1218
|
-
}): Promise<
|
|
1217
|
+
}): Promise<{
|
|
1219
1218
|
t: number;
|
|
1220
1219
|
r: string;
|
|
1221
|
-
}[]
|
|
1220
|
+
}[]>;
|
|
1222
1221
|
/**
|
|
1223
1222
|
* Futures insurance balance history
|
|
1224
1223
|
*
|
|
1225
1224
|
* @param params Parameters for retrieving futures insurance balance history
|
|
1226
|
-
* @returns Promise<
|
|
1225
|
+
* @returns Promise<{
|
|
1227
1226
|
* t: number;
|
|
1228
1227
|
* b: string;
|
|
1229
|
-
* }[]
|
|
1228
|
+
* }[]>
|
|
1230
1229
|
*/
|
|
1231
1230
|
getFuturesInsuranceBalanceHistory(params: {
|
|
1232
1231
|
settle: 'btc' | 'usdt' | 'usd';
|
|
1233
1232
|
limit?: number;
|
|
1234
|
-
}): Promise<
|
|
1233
|
+
}): Promise<{
|
|
1235
1234
|
t: number;
|
|
1236
1235
|
b: string;
|
|
1237
|
-
}[]
|
|
1236
|
+
}[]>;
|
|
1238
1237
|
/**
|
|
1239
1238
|
* Futures stats
|
|
1240
1239
|
*
|
|
1241
1240
|
* @param params Parameters for retrieving futures stats
|
|
1242
|
-
* @returns Promise<
|
|
1241
|
+
* @returns Promise<GetFuturesStatsResp[]>
|
|
1243
1242
|
*/
|
|
1244
|
-
getFuturesStats(params: GetFuturesStatsReq): Promise<
|
|
1243
|
+
getFuturesStats(params: GetFuturesStatsReq): Promise<FuturesStats[]>;
|
|
1245
1244
|
/**
|
|
1246
1245
|
* Get index constituents
|
|
1247
1246
|
*
|
|
1248
1247
|
* @param params Parameters for retrieving index constituents
|
|
1249
|
-
* @returns Promise<
|
|
1248
|
+
* @returns Promise<GetIndexConstituentsResp>
|
|
1250
1249
|
*/
|
|
1251
1250
|
getIndexConstituents(params: {
|
|
1252
1251
|
settle: 'btc' | 'usdt' | 'usd';
|
|
1253
1252
|
index: string;
|
|
1254
|
-
}): Promise<
|
|
1253
|
+
}): Promise<IndexConstituents>;
|
|
1255
1254
|
/**
|
|
1256
1255
|
* Retrieve liquidation history
|
|
1257
1256
|
*
|
|
1258
1257
|
* Interval between from and to cannot exceed 3600. Some private fields will not be returned in public endpoints. Refer to field description for detail.
|
|
1259
1258
|
*
|
|
1260
1259
|
* @param params Parameters for retrieving liquidation history
|
|
1261
|
-
* @returns Promise<
|
|
1260
|
+
* @returns Promise<GetLiquidationHistoryResp[]>
|
|
1262
1261
|
*/
|
|
1263
|
-
getLiquidationHistory(params: GetLiquidationHistoryReq): Promise<
|
|
1262
|
+
getLiquidationHistory(params: GetLiquidationHistoryReq): Promise<LiquidationHistoryRecord[]>;
|
|
1264
1263
|
/**
|
|
1265
1264
|
* List risk limit tiers
|
|
1266
1265
|
*
|
|
@@ -1269,125 +1268,125 @@ export declare class RestClient extends BaseRestClient {
|
|
|
1269
1268
|
* This only takes effect when the 'contract' parameter is empty.
|
|
1270
1269
|
*
|
|
1271
1270
|
* @param params Parameters for listing risk limit tiers
|
|
1272
|
-
* @returns Promise<
|
|
1271
|
+
* @returns Promise<GetRiskLimitTiersResp[]>
|
|
1273
1272
|
*/
|
|
1274
|
-
getRiskLimitTiers(params: GetRiskLimitTiersReq): Promise<
|
|
1273
|
+
getRiskLimitTiers(params: GetRiskLimitTiersReq): Promise<RiskLimitTier[]>;
|
|
1275
1274
|
/**
|
|
1276
1275
|
* Query futures account
|
|
1277
1276
|
*
|
|
1278
1277
|
* @param params Parameters for querying futures account
|
|
1279
|
-
* @returns Promise<
|
|
1278
|
+
* @returns Promise<GetFuturesAccountResp>
|
|
1280
1279
|
*/
|
|
1281
1280
|
getFuturesAccount(params: {
|
|
1282
1281
|
settle: 'btc' | 'usdt' | 'usd';
|
|
1283
|
-
}): Promise<
|
|
1282
|
+
}): Promise<FuturesAccount>;
|
|
1284
1283
|
/**
|
|
1285
1284
|
* Query account book
|
|
1286
1285
|
*
|
|
1287
1286
|
* If the contract field is provided, it can only filter records that include this field after 2023-10-30.
|
|
1288
1287
|
*
|
|
1289
1288
|
* @param params Parameters for querying account book
|
|
1290
|
-
* @returns Promise<
|
|
1289
|
+
* @returns Promise<GetFuturesAccountBookResp[]>
|
|
1291
1290
|
*/
|
|
1292
|
-
getFuturesAccountBook(params: GetFuturesAccountBookReq): Promise<
|
|
1291
|
+
getFuturesAccountBook(params: GetFuturesAccountBookReq): Promise<GetFuturesAccountBookReq[]>;
|
|
1293
1292
|
/**
|
|
1294
1293
|
* List all positions of a user
|
|
1295
1294
|
*
|
|
1296
1295
|
* @param params Parameters for listing all positions of a user
|
|
1297
|
-
* @returns Promise<
|
|
1296
|
+
* @returns Promise<Position[]>
|
|
1298
1297
|
*/
|
|
1299
|
-
getFuturesPositions(params: GetFuturesPositionsReq): Promise<
|
|
1298
|
+
getFuturesPositions(params: GetFuturesPositionsReq): Promise<FuturesPosition[]>;
|
|
1300
1299
|
/**
|
|
1301
1300
|
* Get single position
|
|
1302
1301
|
*
|
|
1303
1302
|
* @param params Parameters for retrieving a single position
|
|
1304
|
-
* @returns Promise<
|
|
1303
|
+
* @returns Promise<Position>
|
|
1305
1304
|
*/
|
|
1306
1305
|
getFuturesPosition(params: {
|
|
1307
1306
|
settle: 'btc' | 'usdt' | 'usd';
|
|
1308
1307
|
contract: string;
|
|
1309
|
-
}): Promise<
|
|
1308
|
+
}): Promise<FuturesPosition>;
|
|
1310
1309
|
/**
|
|
1311
1310
|
* Update position margin
|
|
1312
1311
|
*
|
|
1313
1312
|
* @param params Parameters for updating position margin
|
|
1314
|
-
* @returns Promise<
|
|
1313
|
+
* @returns Promise<Position>
|
|
1315
1314
|
*/
|
|
1316
1315
|
updateFuturesMargin(params: {
|
|
1317
1316
|
settle: 'btc' | 'usdt' | 'usd';
|
|
1318
1317
|
contract: string;
|
|
1319
1318
|
change: string;
|
|
1320
|
-
}): Promise<
|
|
1319
|
+
}): Promise<FuturesPosition>;
|
|
1321
1320
|
/**
|
|
1322
1321
|
* Update position leverage
|
|
1323
1322
|
*
|
|
1324
1323
|
* @param params Parameters for updating position leverage
|
|
1325
|
-
* @returns Promise<
|
|
1324
|
+
* @returns Promise<Position>
|
|
1326
1325
|
*/
|
|
1327
1326
|
updateFuturesLeverage(params: {
|
|
1328
1327
|
settle: 'btc' | 'usdt' | 'usd';
|
|
1329
1328
|
contract: string;
|
|
1330
1329
|
leverage: string;
|
|
1331
1330
|
cross_leverage_limit?: string;
|
|
1332
|
-
}): Promise<
|
|
1331
|
+
}): Promise<FuturesPosition>;
|
|
1333
1332
|
/**
|
|
1334
1333
|
* Update position risk limit
|
|
1335
1334
|
*
|
|
1336
1335
|
* @param params Parameters for updating position risk limit
|
|
1337
|
-
* @returns Promise<
|
|
1336
|
+
* @returns Promise<Position>
|
|
1338
1337
|
*/
|
|
1339
1338
|
updatePositionRiskLimit(params: {
|
|
1340
1339
|
settle: 'btc' | 'usdt' | 'usd';
|
|
1341
1340
|
contract: string;
|
|
1342
1341
|
risk_limit: string;
|
|
1343
|
-
}): Promise<
|
|
1342
|
+
}): Promise<FuturesPosition>;
|
|
1344
1343
|
/**
|
|
1345
1344
|
* Enable or disable dual mode
|
|
1346
1345
|
*
|
|
1347
1346
|
* Before setting dual mode, make sure all positions are closed and no orders are open.
|
|
1348
1347
|
*
|
|
1349
1348
|
* @param params Parameters for enabling or disabling dual mode
|
|
1350
|
-
* @returns Promise<
|
|
1349
|
+
* @returns Promise<ToggleFuturesDualModeResp>
|
|
1351
1350
|
*/
|
|
1352
1351
|
updateFuturesDualMode(params: {
|
|
1353
1352
|
settle: 'btc' | 'usdt' | 'usd';
|
|
1354
1353
|
dual_mode: boolean;
|
|
1355
|
-
}): Promise<
|
|
1354
|
+
}): Promise<UpdateFuturesDualModeResp>;
|
|
1356
1355
|
/**
|
|
1357
1356
|
* Retrieve position detail in dual mode
|
|
1358
1357
|
*
|
|
1359
1358
|
* @param params Parameters for retrieving position detail in dual mode
|
|
1360
|
-
* @returns Promise<
|
|
1359
|
+
* @returns Promise<Position[]>
|
|
1361
1360
|
*/
|
|
1362
1361
|
getDualModePosition(params: {
|
|
1363
1362
|
settle: 'btc' | 'usdt' | 'usd';
|
|
1364
1363
|
contract: string;
|
|
1365
|
-
}): Promise<
|
|
1364
|
+
}): Promise<FuturesPosition[]>;
|
|
1366
1365
|
/**
|
|
1367
1366
|
* Update position margin in dual mode
|
|
1368
1367
|
*
|
|
1369
1368
|
* @param params Parameters for updating position margin in dual mode
|
|
1370
|
-
* @returns Promise<
|
|
1369
|
+
* @returns Promise<Position[]>
|
|
1371
1370
|
*/
|
|
1372
|
-
updateDualModePositionMargin(params: UpdateDualModePositionMarginReq): Promise<
|
|
1371
|
+
updateDualModePositionMargin(params: UpdateDualModePositionMarginReq): Promise<FuturesPosition[]>;
|
|
1373
1372
|
/**
|
|
1374
1373
|
* Update position leverage in dual mode
|
|
1375
1374
|
*
|
|
1376
1375
|
* @param params Parameters for updating position leverage in dual mode
|
|
1377
|
-
* @returns Promise<
|
|
1376
|
+
* @returns Promise<Position[]>
|
|
1378
1377
|
*/
|
|
1379
|
-
updateDualModePositionLeverage(params: UpdateDualModePositionLeverageReq): Promise<
|
|
1378
|
+
updateDualModePositionLeverage(params: UpdateDualModePositionLeverageReq): Promise<FuturesPosition[]>;
|
|
1380
1379
|
/**
|
|
1381
1380
|
* Update position risk limit in dual mode
|
|
1382
1381
|
*
|
|
1383
1382
|
* @param params Parameters for updating position risk limit in dual mode
|
|
1384
|
-
* @returns Promise<
|
|
1383
|
+
* @returns Promise<Position[]>
|
|
1385
1384
|
*/
|
|
1386
1385
|
updateDualModePositionRiskLimit(params: {
|
|
1387
1386
|
settle: 'btc' | 'usdt' | 'usd';
|
|
1388
1387
|
contract: string;
|
|
1389
1388
|
risk_limit: string;
|
|
1390
|
-
}): Promise<
|
|
1389
|
+
}): Promise<FuturesPosition[]>;
|
|
1391
1390
|
/**
|
|
1392
1391
|
* Create a futures order
|
|
1393
1392
|
*
|
|
@@ -1399,9 +1398,9 @@ export declare class RestClient extends BaseRestClient {
|
|
|
1399
1398
|
* Set stp_act to decide the strategy of self-trade prevention. For detailed usage, refer to the stp_act parameter in the request body.
|
|
1400
1399
|
*
|
|
1401
1400
|
* @param params Parameters for creating a futures order
|
|
1402
|
-
* @returns Promise<
|
|
1401
|
+
* @returns Promise<SubmitFuturesOrderReq>
|
|
1403
1402
|
*/
|
|
1404
|
-
submitFuturesOrder(params: SubmitFuturesOrderReq): Promise<
|
|
1403
|
+
submitFuturesOrder(params: SubmitFuturesOrderReq): Promise<FuturesOrder>;
|
|
1405
1404
|
/**
|
|
1406
1405
|
* List futures orders
|
|
1407
1406
|
*
|
|
@@ -1409,25 +1408,25 @@ export declare class RestClient extends BaseRestClient {
|
|
|
1409
1408
|
* Historical orders, by default, only data within the past 6 months is supported. If you need to query data for a longer period, please use GET /futures/{settle}/orders_timerange.
|
|
1410
1409
|
*
|
|
1411
1410
|
* @param params Parameters for listing futures orders
|
|
1412
|
-
* @returns Promise<
|
|
1411
|
+
* @returns Promise<FuturesOrder[]>
|
|
1413
1412
|
*/
|
|
1414
|
-
getFuturesOrders(params: GetFuturesOrdersReq): Promise<
|
|
1413
|
+
getFuturesOrders(params: GetFuturesOrdersReq): Promise<FuturesOrder[]>;
|
|
1415
1414
|
/**
|
|
1416
1415
|
* Cancel all open orders matched
|
|
1417
1416
|
*
|
|
1418
1417
|
* Zero-filled order cannot be retrieved 10 minutes after order cancellation.
|
|
1419
1418
|
*
|
|
1420
1419
|
* @param params Parameters for cancelling all open orders matched
|
|
1421
|
-
* @returns Promise<
|
|
1420
|
+
* @returns Promise<FuturesOrder[]>
|
|
1422
1421
|
*/
|
|
1423
|
-
cancelAllFuturesOrders(params: DeleteAllFuturesOrdersReq): Promise<
|
|
1422
|
+
cancelAllFuturesOrders(params: DeleteAllFuturesOrdersReq): Promise<FuturesOrder[]>;
|
|
1424
1423
|
/**
|
|
1425
1424
|
* List Futures Orders By Time Range
|
|
1426
1425
|
*
|
|
1427
1426
|
* @param params Parameters for listing futures orders by time range
|
|
1428
|
-
* @returns Promise<
|
|
1427
|
+
* @returns Promise<FuturesOrder[]>
|
|
1429
1428
|
*/
|
|
1430
|
-
getFuturesOrdersByTimeRange(params: GetFuturesOrdersByTimeRangeReq): Promise<
|
|
1429
|
+
getFuturesOrdersByTimeRange(params: GetFuturesOrdersByTimeRangeReq): Promise<FuturesOrder[]>;
|
|
1431
1430
|
/**
|
|
1432
1431
|
* Create a batch of futures orders
|
|
1433
1432
|
*
|
|
@@ -1440,12 +1439,12 @@ export declare class RestClient extends BaseRestClient {
|
|
|
1440
1439
|
* In the rate limiting, each order is counted individually.
|
|
1441
1440
|
*
|
|
1442
1441
|
* @param params Parameters for creating a batch of futures orders
|
|
1443
|
-
* @returns Promise<
|
|
1442
|
+
* @returns Promise<FuturesOrder[]>
|
|
1444
1443
|
*/
|
|
1445
1444
|
submitFuturesBatchOrders(params: {
|
|
1446
1445
|
settle: 'btc' | 'usdt' | 'usd';
|
|
1447
1446
|
orders: SubmitFuturesOrderReq[];
|
|
1448
|
-
}): Promise<
|
|
1447
|
+
}): Promise<FuturesOrder[]>;
|
|
1449
1448
|
/**
|
|
1450
1449
|
* Get a single order
|
|
1451
1450
|
*
|
|
@@ -1453,59 +1452,59 @@ export declare class RestClient extends BaseRestClient {
|
|
|
1453
1452
|
* Historical orders, by default, only data within the past 6 months is supported.
|
|
1454
1453
|
*
|
|
1455
1454
|
* @param params Parameters for retrieving a single order
|
|
1456
|
-
* @returns Promise<
|
|
1455
|
+
* @returns Promise<FuturesOrder>
|
|
1457
1456
|
*/
|
|
1458
1457
|
getFuturesOrder(params: {
|
|
1459
1458
|
settle: 'btc' | 'usdt' | 'usd';
|
|
1460
1459
|
order_id: string;
|
|
1461
|
-
}): Promise<
|
|
1460
|
+
}): Promise<FuturesOrder>;
|
|
1462
1461
|
/**
|
|
1463
1462
|
* Cancel a single order
|
|
1464
1463
|
*
|
|
1465
1464
|
* @param params Parameters for cancelling a single order
|
|
1466
|
-
* @returns Promise<
|
|
1465
|
+
* @returns Promise<FuturesOrder>
|
|
1467
1466
|
*/
|
|
1468
1467
|
cancelFuturesOrder(params: {
|
|
1469
1468
|
settle: 'btc' | 'usdt' | 'usd';
|
|
1470
1469
|
order_id: string;
|
|
1471
|
-
}): Promise<
|
|
1470
|
+
}): Promise<FuturesOrder>;
|
|
1472
1471
|
/**
|
|
1473
1472
|
* Amend an order
|
|
1474
1473
|
*
|
|
1475
1474
|
* @param params Parameters for amending an order
|
|
1476
|
-
* @returns Promise<
|
|
1475
|
+
* @returns Promise<FuturesOrder>
|
|
1477
1476
|
*/
|
|
1478
|
-
updateFuturesOrder(params: UpdateFuturesOrderReq): Promise<
|
|
1477
|
+
updateFuturesOrder(params: UpdateFuturesOrderReq): Promise<FuturesOrder>;
|
|
1479
1478
|
/**
|
|
1480
1479
|
* List personal trading history
|
|
1481
1480
|
*
|
|
1482
1481
|
* By default, only data within the past 6 months is supported. If you need to query data for a longer period, please use GET /futures/{settle}/my_trades_timerange.
|
|
1483
1482
|
*
|
|
1484
1483
|
* @param params Parameters for listing personal trading history
|
|
1485
|
-
* @returns Promise<
|
|
1484
|
+
* @returns Promise<GetFuturesTradingHistoryResp[]>
|
|
1486
1485
|
*/
|
|
1487
|
-
getFuturesTradingHistory(params: GetFuturesTradingHistoryReq): Promise<
|
|
1486
|
+
getFuturesTradingHistory(params: GetFuturesTradingHistoryReq): Promise<FuturesTradingHistoryRecord[]>;
|
|
1488
1487
|
/**
|
|
1489
1488
|
* List position close history
|
|
1490
1489
|
*
|
|
1491
1490
|
* @param params Parameters for listing position close history
|
|
1492
|
-
* @returns Promise<
|
|
1491
|
+
* @returns Promise<GetFuturesPositionHistoryResp[]>
|
|
1493
1492
|
*/
|
|
1494
|
-
getFuturesPositionHistory(params: GetFuturesPositionHistoryReq): Promise<
|
|
1493
|
+
getFuturesPositionHistory(params: GetFuturesPositionHistoryReq): Promise<FuturesPositionHistoryRecord[]>;
|
|
1495
1494
|
/**
|
|
1496
1495
|
* List liquidation history
|
|
1497
1496
|
*
|
|
1498
1497
|
* @param params Parameters for listing liquidation history
|
|
1499
|
-
* @returns Promise<
|
|
1498
|
+
* @returns Promise<GetFuturesLiquidationHistoryResp[]>
|
|
1500
1499
|
*/
|
|
1501
|
-
getFuturesLiquidationHistory(params: GetFuturesLiquidationHistoryReq): Promise<
|
|
1500
|
+
getFuturesLiquidationHistory(params: GetFuturesLiquidationHistoryReq): Promise<FuturesLiquidationHistoryRecord[]>;
|
|
1502
1501
|
/**
|
|
1503
1502
|
* List Auto-Deleveraging History
|
|
1504
1503
|
*
|
|
1505
1504
|
* @param params Parameters for listing auto-deleveraging history
|
|
1506
|
-
* @returns Promise<
|
|
1505
|
+
* @returns Promise<GetFuturesAutoDeleveragingHistoryResp[]>
|
|
1507
1506
|
*/
|
|
1508
|
-
getFuturesAutoDeleveragingHistory(params: GetFuturesLiquidationHistoryReq): Promise<
|
|
1507
|
+
getFuturesAutoDeleveragingHistory(params: GetFuturesLiquidationHistoryReq): Promise<FuturesAutoDeleveragingHistoryRecord[]>;
|
|
1509
1508
|
/**
|
|
1510
1509
|
* Countdown cancel orders
|
|
1511
1510
|
*
|
|
@@ -1514,83 +1513,83 @@ export declare class RestClient extends BaseRestClient {
|
|
|
1514
1513
|
* If the timeout is set to 0 within 30 seconds, the countdown timer will expire and the cancel function will be cancelled.
|
|
1515
1514
|
*
|
|
1516
1515
|
* @param params Parameters for setting countdown cancel orders
|
|
1517
|
-
* @returns Promise<
|
|
1516
|
+
* @returns Promise<{ triggerTime: number }>
|
|
1518
1517
|
*/
|
|
1519
1518
|
setFuturesOrderCancelCountdown(params: {
|
|
1520
1519
|
settle: 'btc' | 'usdt' | 'usd';
|
|
1521
1520
|
timeout: number;
|
|
1522
1521
|
contract?: string;
|
|
1523
|
-
}): Promise<
|
|
1522
|
+
}): Promise<{
|
|
1524
1523
|
triggerTime: number;
|
|
1525
|
-
}
|
|
1524
|
+
}>;
|
|
1526
1525
|
/**
|
|
1527
1526
|
* Query user trading fee rates
|
|
1528
1527
|
*
|
|
1529
1528
|
* @param params Parameters for querying user trading fee rates
|
|
1530
|
-
* @returns Promise<
|
|
1529
|
+
* @returns Promise<any>
|
|
1531
1530
|
*/
|
|
1532
1531
|
getFuturesUserTradingFees(params: {
|
|
1533
1532
|
settle: 'btc' | 'usdt' | 'usd';
|
|
1534
1533
|
contract?: string;
|
|
1535
|
-
}): Promise<
|
|
1534
|
+
}): Promise<any>;
|
|
1536
1535
|
/**
|
|
1537
1536
|
* Cancel a batch of orders with an ID list
|
|
1538
1537
|
*
|
|
1539
1538
|
* Multiple distinct order ID list can be specified. Each request can cancel a maximum of 20 records.
|
|
1540
1539
|
*
|
|
1541
1540
|
* @param params Parameters for cancelling a batch of orders with an ID list
|
|
1542
|
-
* @returns Promise<
|
|
1541
|
+
* @returns Promise<DeleteFuturesBatchOrdersResp[]>
|
|
1543
1542
|
*/
|
|
1544
1543
|
batchCancelFuturesOrders(params: {
|
|
1545
1544
|
settle: 'btc' | 'usdt' | 'usd';
|
|
1546
1545
|
orderIds: string[];
|
|
1547
|
-
}): Promise<
|
|
1546
|
+
}): Promise<DeleteFuturesBatchOrdersResp[]>;
|
|
1548
1547
|
/**
|
|
1549
1548
|
* Create a price-triggered order
|
|
1550
1549
|
*
|
|
1551
1550
|
* @param params Parameters for creating a price-triggered order
|
|
1552
|
-
* @returns Promise<
|
|
1551
|
+
* @returns Promise<{ id: number }>
|
|
1553
1552
|
*/
|
|
1554
|
-
submitFuturesPriceTriggeredOrder(params: SubmitFuturesTriggeredOrderReq): Promise<
|
|
1553
|
+
submitFuturesPriceTriggeredOrder(params: SubmitFuturesTriggeredOrderReq): Promise<{
|
|
1555
1554
|
id: number;
|
|
1556
|
-
}
|
|
1555
|
+
}>;
|
|
1557
1556
|
/**
|
|
1558
1557
|
* List all auto orders
|
|
1559
1558
|
*
|
|
1560
1559
|
* @param params Parameters for listing all auto orders
|
|
1561
|
-
* @returns Promise<
|
|
1560
|
+
* @returns Promise<FuturesPriceTriggeredOrder[]>
|
|
1562
1561
|
*/
|
|
1563
|
-
getFuturesAutoOrders(params: GetFuturesAutoOrdersReq): Promise<
|
|
1562
|
+
getFuturesAutoOrders(params: GetFuturesAutoOrdersReq): Promise<FuturesPriceTriggeredOrder[]>;
|
|
1564
1563
|
/**
|
|
1565
1564
|
* Cancel all open orders
|
|
1566
1565
|
*
|
|
1567
1566
|
* @param params Parameters for cancelling all open orders
|
|
1568
|
-
* @returns Promise<
|
|
1567
|
+
* @returns Promise<FuturesPriceTriggeredOrder[]>
|
|
1569
1568
|
*/
|
|
1570
1569
|
cancelAllOpenFuturesOrders(params: {
|
|
1571
1570
|
settle: 'btc' | 'usdt' | 'usd';
|
|
1572
1571
|
contract: string;
|
|
1573
|
-
}): Promise<
|
|
1572
|
+
}): Promise<FuturesPriceTriggeredOrder[]>;
|
|
1574
1573
|
/**
|
|
1575
1574
|
* Get a price-triggered order
|
|
1576
1575
|
*
|
|
1577
1576
|
* @param params Parameters for retrieving a price-triggered order
|
|
1578
|
-
* @returns Promise<
|
|
1577
|
+
* @returns Promise<FuturesPriceTriggeredOrder>
|
|
1579
1578
|
*/
|
|
1580
1579
|
getFuturesPriceTriggeredOrder(params: {
|
|
1581
1580
|
settle: 'btc' | 'usdt' | 'usd';
|
|
1582
1581
|
order_id: string;
|
|
1583
|
-
}): Promise<
|
|
1582
|
+
}): Promise<FuturesPriceTriggeredOrder>;
|
|
1584
1583
|
/**
|
|
1585
1584
|
* Cancel a price-triggered order
|
|
1586
1585
|
*
|
|
1587
1586
|
* @param params Parameters for cancelling a price-triggered order
|
|
1588
|
-
* @returns Promise<
|
|
1587
|
+
* @returns Promise<FuturesPriceTriggeredOrder>
|
|
1589
1588
|
*/
|
|
1590
1589
|
cancelFuturesPriceTriggeredOrder(params: {
|
|
1591
1590
|
settle: 'btc' | 'usdt' | 'usd';
|
|
1592
1591
|
order_id: string;
|
|
1593
|
-
}): Promise<
|
|
1592
|
+
}): Promise<FuturesPriceTriggeredOrder>;
|
|
1594
1593
|
/**==========================================================================================================================
|
|
1595
1594
|
* DELIVERY
|
|
1596
1595
|
* ==========================================================================================================================
|
|
@@ -1599,37 +1598,37 @@ export declare class RestClient extends BaseRestClient {
|
|
|
1599
1598
|
* List all futures contracts
|
|
1600
1599
|
*
|
|
1601
1600
|
* @param params Parameters for listing all futures contracts
|
|
1602
|
-
* @returns Promise<
|
|
1601
|
+
* @returns Promise<DeliveryContract[]>
|
|
1603
1602
|
*/
|
|
1604
1603
|
getAllDeliveryContracts(params: {
|
|
1605
1604
|
settle: 'usdt';
|
|
1606
|
-
}): Promise<
|
|
1605
|
+
}): Promise<FuturesDeliveryContract[]>;
|
|
1607
1606
|
/**
|
|
1608
1607
|
* Get a single contract
|
|
1609
1608
|
*
|
|
1610
1609
|
* @param params Parameters for retrieving a single contract
|
|
1611
|
-
* @returns Promise<
|
|
1610
|
+
* @returns Promise<DeliveryContract>
|
|
1612
1611
|
*/
|
|
1613
1612
|
getDeliveryContract(params: {
|
|
1614
1613
|
settle: 'usdt';
|
|
1615
1614
|
contract: string;
|
|
1616
|
-
}): Promise<
|
|
1615
|
+
}): Promise<FuturesDeliveryContract>;
|
|
1617
1616
|
/**
|
|
1618
1617
|
* Futures order book
|
|
1619
1618
|
*
|
|
1620
1619
|
* Bids will be sorted by price from high to low, while asks sorted reversely
|
|
1621
1620
|
*
|
|
1622
1621
|
* @param params Parameters for retrieving the futures order book
|
|
1623
|
-
* @returns Promise<
|
|
1622
|
+
* @returns Promise<GetDeliveryOrderBookResp>
|
|
1624
1623
|
*/
|
|
1625
|
-
getDeliveryOrderBook(params: GetDeliveryOrderBookReq): Promise<
|
|
1624
|
+
getDeliveryOrderBook(params: GetDeliveryOrderBookReq): Promise<DeliveryOrderBook>;
|
|
1626
1625
|
/**
|
|
1627
1626
|
* Futures trading history
|
|
1628
1627
|
*
|
|
1629
1628
|
* @param params Parameters for retrieving the futures trading history
|
|
1630
|
-
* @returns Promise<
|
|
1629
|
+
* @returns Promise<GetDeliveryTradesResp[]>
|
|
1631
1630
|
*/
|
|
1632
|
-
getDeliveryTrades(params: GetDeliveryTradesReq): Promise<
|
|
1631
|
+
getDeliveryTrades(params: GetDeliveryTradesReq): Promise<DeliveryTrade[]>;
|
|
1633
1632
|
/**
|
|
1634
1633
|
* Get futures Candles
|
|
1635
1634
|
*
|
|
@@ -1637,230 +1636,230 @@ export declare class RestClient extends BaseRestClient {
|
|
|
1637
1636
|
* Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying from, to and interval.
|
|
1638
1637
|
*
|
|
1639
1638
|
* @param params Parameters for retrieving futures Candles
|
|
1640
|
-
* @returns Promise<
|
|
1639
|
+
* @returns Promise<GetDeliveryCandlesResp[]>
|
|
1641
1640
|
*/
|
|
1642
|
-
getDeliveryCandles(params: GetDeliveryCandlesReq): Promise<
|
|
1641
|
+
getDeliveryCandles(params: GetDeliveryCandlesReq): Promise<DeliveryCandle[]>;
|
|
1643
1642
|
/**
|
|
1644
1643
|
* List futures tickers
|
|
1645
1644
|
*
|
|
1646
1645
|
* @param params Parameters for listing futures tickers
|
|
1647
|
-
* @returns Promise<
|
|
1646
|
+
* @returns Promise<GetDeliveryTickersResp[]>
|
|
1648
1647
|
*/
|
|
1649
1648
|
getDeliveryTickers(params: {
|
|
1650
1649
|
settle: 'usdt';
|
|
1651
1650
|
contract?: string;
|
|
1652
|
-
}): Promise<
|
|
1651
|
+
}): Promise<DeliveryTicker[]>;
|
|
1653
1652
|
/**
|
|
1654
1653
|
* Futures insurance balance history
|
|
1655
1654
|
*
|
|
1656
1655
|
* @param params Parameters for retrieving the futures insurance balance history
|
|
1657
|
-
* @returns Promise<
|
|
1656
|
+
* @returns Promise<{
|
|
1658
1657
|
* t: number;
|
|
1659
1658
|
* b: string;
|
|
1660
|
-
* }[]
|
|
1659
|
+
* }[]>
|
|
1661
1660
|
*/
|
|
1662
1661
|
getDeliveryInsuranceBalanceHistory(params: {
|
|
1663
1662
|
settle: 'usdt';
|
|
1664
1663
|
limit?: number;
|
|
1665
|
-
}): Promise<
|
|
1664
|
+
}): Promise<{
|
|
1666
1665
|
t: number;
|
|
1667
1666
|
b: string;
|
|
1668
|
-
}[]
|
|
1667
|
+
}[]>;
|
|
1669
1668
|
/**
|
|
1670
1669
|
* Query futures account
|
|
1671
1670
|
*
|
|
1672
1671
|
* @param params Parameters for querying futures account
|
|
1673
|
-
* @returns Promise<
|
|
1672
|
+
* @returns Promise<GetDeliveryAccountResp>
|
|
1674
1673
|
*/
|
|
1675
1674
|
getDeliveryAccount(params: {
|
|
1676
1675
|
settle: 'usdt';
|
|
1677
|
-
}): Promise<
|
|
1676
|
+
}): Promise<DeliveryAccount>;
|
|
1678
1677
|
/**
|
|
1679
1678
|
* Query account book
|
|
1680
1679
|
*
|
|
1681
1680
|
* @param params Parameters for querying account book
|
|
1682
|
-
* @returns Promise<
|
|
1681
|
+
* @returns Promise<GetDeliveryBookResp[]>
|
|
1683
1682
|
*/
|
|
1684
|
-
getDeliveryBook(params: GetDeliveryBookReq): Promise<
|
|
1683
|
+
getDeliveryBook(params: GetDeliveryBookReq): Promise<DeliveryBook[]>;
|
|
1685
1684
|
/**
|
|
1686
1685
|
* List all positions of a user
|
|
1687
1686
|
*
|
|
1688
1687
|
* @param params Parameters for listing all positions of a user
|
|
1689
|
-
* @returns Promise<
|
|
1688
|
+
* @returns Promise<Position[]>
|
|
1690
1689
|
*/
|
|
1691
1690
|
getDeliveryPositions(params: {
|
|
1692
1691
|
settle: 'usdt';
|
|
1693
|
-
}): Promise<
|
|
1692
|
+
}): Promise<FuturesPosition[]>;
|
|
1694
1693
|
/**
|
|
1695
1694
|
* Get single position
|
|
1696
1695
|
*
|
|
1697
1696
|
* @param params Parameters for retrieving a single position
|
|
1698
|
-
* @returns Promise<
|
|
1697
|
+
* @returns Promise<Position>
|
|
1699
1698
|
*/
|
|
1700
1699
|
getDeliveryPosition(params: {
|
|
1701
1700
|
settle: 'usdt';
|
|
1702
1701
|
contract: string;
|
|
1703
|
-
}): Promise<
|
|
1702
|
+
}): Promise<FuturesPosition>;
|
|
1704
1703
|
/**
|
|
1705
1704
|
* Update position margin
|
|
1706
1705
|
*
|
|
1707
1706
|
* @param params Parameters for updating position margin
|
|
1708
|
-
* @returns Promise<
|
|
1707
|
+
* @returns Promise<Position>
|
|
1709
1708
|
*/
|
|
1710
1709
|
updateDeliveryMargin(params: {
|
|
1711
1710
|
settle: 'usdt';
|
|
1712
1711
|
contract: string;
|
|
1713
1712
|
change: string;
|
|
1714
|
-
}): Promise<
|
|
1713
|
+
}): Promise<FuturesPosition>;
|
|
1715
1714
|
/**
|
|
1716
1715
|
* Update position leverage
|
|
1717
1716
|
*
|
|
1718
1717
|
* @param params Parameters for updating position leverage
|
|
1719
|
-
* @returns Promise<
|
|
1718
|
+
* @returns Promise<Position>
|
|
1720
1719
|
*/
|
|
1721
1720
|
updateDeliveryLeverage(params: {
|
|
1722
1721
|
settle: 'usdt';
|
|
1723
1722
|
contract: string;
|
|
1724
1723
|
leverage: string;
|
|
1725
|
-
}): Promise<
|
|
1724
|
+
}): Promise<FuturesPosition>;
|
|
1726
1725
|
/**
|
|
1727
1726
|
* Update position risk limit
|
|
1728
1727
|
*
|
|
1729
1728
|
* @param params Parameters for updating position risk limit
|
|
1730
|
-
* @returns Promise<
|
|
1729
|
+
* @returns Promise<Position>
|
|
1731
1730
|
*/
|
|
1732
1731
|
updateDeliveryRiskLimit(params: {
|
|
1733
1732
|
settle: 'usdt';
|
|
1734
1733
|
contract: string;
|
|
1735
1734
|
risk_limit: string;
|
|
1736
|
-
}): Promise<
|
|
1735
|
+
}): Promise<FuturesPosition>;
|
|
1737
1736
|
/**
|
|
1738
1737
|
* Create a futures order
|
|
1739
1738
|
*
|
|
1740
1739
|
* Zero-filled order cannot be retrieved 10 minutes after order cancellation
|
|
1741
1740
|
*
|
|
1742
1741
|
* @param params Parameters for creating a futures order
|
|
1743
|
-
* @returns Promise<
|
|
1742
|
+
* @returns Promise<FuturesOrder>
|
|
1744
1743
|
*/
|
|
1745
|
-
submitDeliveryOrder(params: SubmitDeliveryFuturesOrderReq): Promise<
|
|
1744
|
+
submitDeliveryOrder(params: SubmitDeliveryFuturesOrderReq): Promise<FuturesOrder>;
|
|
1746
1745
|
/**
|
|
1747
1746
|
* List futures orders
|
|
1748
1747
|
*
|
|
1749
1748
|
* Zero-fill order cannot be retrieved 10 minutes after order cancellation.
|
|
1750
1749
|
*
|
|
1751
1750
|
* @param params Parameters for listing futures orders
|
|
1752
|
-
* @returns Promise<
|
|
1751
|
+
* @returns Promise<FuturesOrder[]>
|
|
1753
1752
|
*/
|
|
1754
|
-
getDeliveryOrders(params: GetDeliveryOrdersReq): Promise<
|
|
1753
|
+
getDeliveryOrders(params: GetDeliveryOrdersReq): Promise<FuturesOrder[]>;
|
|
1755
1754
|
/**
|
|
1756
1755
|
* Cancel all open orders matched
|
|
1757
1756
|
*
|
|
1758
1757
|
* Zero-filled order cannot be retrieved 10 minutes after order cancellation
|
|
1759
1758
|
*
|
|
1760
1759
|
* @param params Parameters for cancelling all open orders matched
|
|
1761
|
-
* @returns Promise<
|
|
1760
|
+
* @returns Promise<FuturesOrder[]>
|
|
1762
1761
|
*/
|
|
1763
1762
|
cancelAllDeliveryOrders(params: {
|
|
1764
1763
|
settle: 'usdt';
|
|
1765
1764
|
contract: string;
|
|
1766
1765
|
side?: 'ask' | 'bid';
|
|
1767
|
-
}): Promise<
|
|
1766
|
+
}): Promise<FuturesOrder[]>;
|
|
1768
1767
|
/**
|
|
1769
1768
|
* Get a single order
|
|
1770
1769
|
*
|
|
1771
1770
|
* Zero-filled order cannot be retrieved 10 minutes after order cancellation
|
|
1772
1771
|
*
|
|
1773
1772
|
* @param params Parameters for retrieving a single order
|
|
1774
|
-
* @returns Promise<
|
|
1773
|
+
* @returns Promise<FuturesOrder>
|
|
1775
1774
|
*/
|
|
1776
1775
|
getDeliveryOrder(params: {
|
|
1777
1776
|
settle: 'usdt';
|
|
1778
1777
|
order_id: string;
|
|
1779
|
-
}): Promise<
|
|
1778
|
+
}): Promise<FuturesOrder>;
|
|
1780
1779
|
/**
|
|
1781
1780
|
* Cancel a single order
|
|
1782
1781
|
*
|
|
1783
1782
|
* @param params Parameters for cancelling a single order
|
|
1784
|
-
* @returns Promise<
|
|
1783
|
+
* @returns Promise<FuturesOrder>
|
|
1785
1784
|
*/
|
|
1786
1785
|
cancelDeliveryOrder(params: {
|
|
1787
1786
|
settle: 'usdt';
|
|
1788
1787
|
order_id: string;
|
|
1789
|
-
}): Promise<
|
|
1788
|
+
}): Promise<FuturesOrder>;
|
|
1790
1789
|
/**
|
|
1791
1790
|
* List personal trading history
|
|
1792
1791
|
*
|
|
1793
1792
|
* @param params Parameters for listing personal trading history
|
|
1794
|
-
* @returns Promise<
|
|
1793
|
+
* @returns Promise<GetDeliveryTradingHistoryResp[]>
|
|
1795
1794
|
*/
|
|
1796
|
-
getDeliveryTradingHistory(params: GetDeliveryTradingHistoryReq): Promise<
|
|
1795
|
+
getDeliveryTradingHistory(params: GetDeliveryTradingHistoryReq): Promise<DeliveryTradingHistoryRecord[]>;
|
|
1797
1796
|
/**
|
|
1798
1797
|
* List position close history
|
|
1799
1798
|
*
|
|
1800
1799
|
* @param params Parameters for listing position close history
|
|
1801
|
-
* @returns Promise<
|
|
1800
|
+
* @returns Promise<GetDeliveryClosedPositionsResp[]>
|
|
1802
1801
|
*/
|
|
1803
|
-
getDeliveryClosedPositions(params: GetDeliveryClosedPositionsReq): Promise<
|
|
1802
|
+
getDeliveryClosedPositions(params: GetDeliveryClosedPositionsReq): Promise<DeliveryClosedPosition[]>;
|
|
1804
1803
|
/**
|
|
1805
1804
|
* List liquidation history
|
|
1806
1805
|
*
|
|
1807
1806
|
* @param params Parameters for listing liquidation history
|
|
1808
|
-
* @returns Promise<
|
|
1807
|
+
* @returns Promise<GetDeliveryLiquidationHistoryResp[]>
|
|
1809
1808
|
*/
|
|
1810
|
-
getDeliveryLiquidationHistory(params: GetDeliveryLiquidationHistoryReq): Promise<
|
|
1809
|
+
getDeliveryLiquidationHistory(params: GetDeliveryLiquidationHistoryReq): Promise<DeliveryLiquidationHistoryRecord[]>;
|
|
1811
1810
|
/**
|
|
1812
1811
|
* List settlement history
|
|
1813
1812
|
*
|
|
1814
1813
|
* @param params Parameters for listing settlement history
|
|
1815
|
-
* @returns Promise<
|
|
1814
|
+
* @returns Promise<GetDeliverySettlementHistoryResp[]>
|
|
1816
1815
|
*/
|
|
1817
|
-
getDeliverySettlementHistory(params: GetDeliverySettlementHistoryReq): Promise<
|
|
1816
|
+
getDeliverySettlementHistory(params: GetDeliverySettlementHistoryReq): Promise<DeliverySettlementHistoryRecord[]>;
|
|
1818
1817
|
/**
|
|
1819
1818
|
* Create a price-triggered order
|
|
1820
1819
|
*
|
|
1821
1820
|
* @param params Parameters for creating a price-triggered order
|
|
1822
|
-
* @returns Promise<
|
|
1821
|
+
* @returns Promise<{ id: number }>
|
|
1823
1822
|
*/
|
|
1824
|
-
submitDeliveryTriggeredOrder(params: SubmitFuturesTriggeredOrderReq): Promise<
|
|
1823
|
+
submitDeliveryTriggeredOrder(params: SubmitFuturesTriggeredOrderReq): Promise<{
|
|
1825
1824
|
id: number;
|
|
1826
|
-
}
|
|
1825
|
+
}>;
|
|
1827
1826
|
/**
|
|
1828
1827
|
* List all auto orders
|
|
1829
1828
|
*
|
|
1830
1829
|
* @param params Parameters for listing all auto orders
|
|
1831
|
-
* @returns Promise<
|
|
1830
|
+
* @returns Promise<FuturesPriceTriggeredOrder[]>
|
|
1832
1831
|
*/
|
|
1833
|
-
getDeliveryAutoOrders(params: GetDeliveryAutoOrdersReq): Promise<
|
|
1832
|
+
getDeliveryAutoOrders(params: GetDeliveryAutoOrdersReq): Promise<FuturesPriceTriggeredOrder[]>;
|
|
1834
1833
|
/**
|
|
1835
1834
|
* Cancel all open orders
|
|
1836
1835
|
*
|
|
1837
1836
|
* @param params Parameters for cancelling all open orders
|
|
1838
|
-
* @returns Promise<
|
|
1837
|
+
* @returns Promise<FuturesPriceTriggeredOrder[]>
|
|
1839
1838
|
*/
|
|
1840
1839
|
cancelAllOpenDeliveryOrders(params: {
|
|
1841
1840
|
settle: 'usdt';
|
|
1842
1841
|
contract: string;
|
|
1843
|
-
}): Promise<
|
|
1842
|
+
}): Promise<FuturesPriceTriggeredOrder[]>;
|
|
1844
1843
|
/**
|
|
1845
1844
|
* Get a price-triggered order
|
|
1846
1845
|
*
|
|
1847
1846
|
* @param params Parameters for retrieving a price-triggered order
|
|
1848
|
-
* @returns Promise<
|
|
1847
|
+
* @returns Promise<FuturesPriceTriggeredOrder>
|
|
1849
1848
|
*/
|
|
1850
1849
|
getDeliveryTriggeredOrder(params: {
|
|
1851
1850
|
settle: 'usdt';
|
|
1852
1851
|
order_id: string;
|
|
1853
|
-
}): Promise<
|
|
1852
|
+
}): Promise<FuturesPriceTriggeredOrder>;
|
|
1854
1853
|
/**
|
|
1855
1854
|
* Cancel a price-triggered order
|
|
1856
1855
|
*
|
|
1857
1856
|
* @param params Parameters for cancelling a price-triggered order
|
|
1858
|
-
* @returns Promise<
|
|
1857
|
+
* @returns Promise<FuturesPriceTriggeredOrder>
|
|
1859
1858
|
*/
|
|
1860
1859
|
cancelTriggeredDeliveryOrder(params: {
|
|
1861
1860
|
settle: 'usdt';
|
|
1862
1861
|
order_id: string;
|
|
1863
|
-
}): Promise<
|
|
1862
|
+
}): Promise<FuturesPriceTriggeredOrder>;
|
|
1864
1863
|
/**==========================================================================================================================
|
|
1865
1864
|
* OPTIONS
|
|
1866
1865
|
* ==========================================================================================================================
|
|
@@ -1868,212 +1867,212 @@ export declare class RestClient extends BaseRestClient {
|
|
|
1868
1867
|
/**
|
|
1869
1868
|
* List all underlyings
|
|
1870
1869
|
*
|
|
1871
|
-
* @returns Promise<
|
|
1870
|
+
* @returns Promise<{ name: string; index_price: string }[]>
|
|
1872
1871
|
*/
|
|
1873
|
-
getOptionsUnderlyings(): Promise<
|
|
1872
|
+
getOptionsUnderlyings(): Promise<{
|
|
1874
1873
|
name: string;
|
|
1875
1874
|
index_price: string;
|
|
1876
|
-
}[]
|
|
1875
|
+
}[]>;
|
|
1877
1876
|
/**
|
|
1878
1877
|
* List all expiration times
|
|
1879
1878
|
*
|
|
1880
1879
|
* @param params Parameters for listing expiration times
|
|
1881
|
-
* @returns Promise<
|
|
1880
|
+
* @returns Promise<number[]>
|
|
1882
1881
|
*/
|
|
1883
1882
|
getOptionsExpirationTimes(params: {
|
|
1884
1883
|
underlying: string;
|
|
1885
|
-
}): Promise<
|
|
1884
|
+
}): Promise<number[]>;
|
|
1886
1885
|
/**
|
|
1887
1886
|
* List all the contracts with specified underlying and expiration time
|
|
1888
1887
|
*
|
|
1889
1888
|
* @param params Parameters for listing contracts
|
|
1890
|
-
* @returns Promise<
|
|
1889
|
+
* @returns Promise<GetOptionsContractsResp[]>
|
|
1891
1890
|
*/
|
|
1892
1891
|
getOptionsContracts(params: {
|
|
1893
1892
|
underlying: string;
|
|
1894
1893
|
expiration?: number;
|
|
1895
|
-
}): Promise<
|
|
1894
|
+
}): Promise<OptionsContract[]>;
|
|
1896
1895
|
/**
|
|
1897
1896
|
* Query specified contract detail
|
|
1898
1897
|
*
|
|
1899
1898
|
* @param params Parameters for querying specified contract detail
|
|
1900
|
-
* @returns Promise<
|
|
1899
|
+
* @returns Promise<GetOptionsContractsResp>
|
|
1901
1900
|
*/
|
|
1902
1901
|
getOptionsContract(params: {
|
|
1903
1902
|
contract: string;
|
|
1904
|
-
}): Promise<
|
|
1903
|
+
}): Promise<OptionsContract>;
|
|
1905
1904
|
/**
|
|
1906
1905
|
* List settlement history
|
|
1907
1906
|
*
|
|
1908
1907
|
* @param params Parameters for listing settlement history
|
|
1909
|
-
* @returns Promise<
|
|
1908
|
+
* @returns Promise<GetOptionsSettlementHistoryResp[]>
|
|
1910
1909
|
*/
|
|
1911
|
-
getOptionsSettlementHistory(params: GetOptionsSettlementHistoryReq): Promise<
|
|
1910
|
+
getOptionsSettlementHistory(params: GetOptionsSettlementHistoryReq): Promise<OptionsSettlementHistoryRecord[]>;
|
|
1912
1911
|
/**
|
|
1913
1912
|
* Get specified contract's settlement
|
|
1914
1913
|
*
|
|
1915
1914
|
* @param params Parameters for retrieving specified contract's settlement
|
|
1916
|
-
* @returns Promise<
|
|
1915
|
+
* @returns Promise<GetOptionsSettlementHistoryResp}>
|
|
1917
1916
|
*/
|
|
1918
1917
|
getOptionsContractSettlement(params: {
|
|
1919
1918
|
contract: string;
|
|
1920
1919
|
underlying: string;
|
|
1921
1920
|
at: number;
|
|
1922
|
-
}): Promise<
|
|
1921
|
+
}): Promise<OptionsSettlementHistoryRecord>;
|
|
1923
1922
|
/**
|
|
1924
1923
|
* List my options settlements
|
|
1925
1924
|
*
|
|
1926
1925
|
* @param params Parameters for listing my options settlements
|
|
1927
|
-
* @returns Promise<
|
|
1926
|
+
* @returns Promise<GetOptionsMySettlementsResp[]>
|
|
1928
1927
|
*/
|
|
1929
|
-
getOptionsMySettlements(params: GetOptionsMySettlementsReq): Promise<
|
|
1928
|
+
getOptionsMySettlements(params: GetOptionsMySettlementsReq): Promise<OptionsUserSettlement[]>;
|
|
1930
1929
|
/**
|
|
1931
1930
|
* Options order book
|
|
1932
1931
|
*
|
|
1933
1932
|
* Bids will be sorted by price from high to low, while asks sorted reversely
|
|
1934
1933
|
*
|
|
1935
1934
|
* @param params Parameters for retrieving options order book
|
|
1936
|
-
* @returns Promise<
|
|
1935
|
+
* @returns Promise<GetOptionsOrderBookResp>
|
|
1937
1936
|
*/
|
|
1938
|
-
getOptionsOrderBook(params: GetOptionsOrderBookReq): Promise<
|
|
1937
|
+
getOptionsOrderBook(params: GetOptionsOrderBookReq): Promise<OptionsOrderBook>;
|
|
1939
1938
|
/**
|
|
1940
1939
|
* List tickers of options contracts
|
|
1941
1940
|
*
|
|
1942
1941
|
* @param params Parameters for listing tickers of options contracts
|
|
1943
|
-
* @returns Promise<
|
|
1942
|
+
* @returns Promise<GetOptionsTickersResp[]>
|
|
1944
1943
|
*/
|
|
1945
1944
|
getOptionsTickers(params: {
|
|
1946
1945
|
underlying: string;
|
|
1947
|
-
}): Promise<
|
|
1946
|
+
}): Promise<OptionsTicker[]>;
|
|
1948
1947
|
/**
|
|
1949
1948
|
* Get underlying ticker
|
|
1950
1949
|
*
|
|
1951
1950
|
* @param params Parameters for retrieving underlying ticker
|
|
1952
|
-
* @returns Promise<
|
|
1951
|
+
* @returns Promise<{
|
|
1953
1952
|
* trade_put: number;
|
|
1954
1953
|
* trade_call: number;
|
|
1955
1954
|
* index_price: string;
|
|
1956
|
-
* }
|
|
1955
|
+
* }>
|
|
1957
1956
|
*/
|
|
1958
1957
|
getOptionsUnderlyingTicker(params: {
|
|
1959
1958
|
underlying: string;
|
|
1960
|
-
}): Promise<
|
|
1959
|
+
}): Promise<{
|
|
1961
1960
|
trade_put: number;
|
|
1962
1961
|
trade_call: number;
|
|
1963
1962
|
index_price: string;
|
|
1964
|
-
}
|
|
1963
|
+
}>;
|
|
1965
1964
|
/**
|
|
1966
1965
|
* Get options Candles
|
|
1967
1966
|
*
|
|
1968
1967
|
* @param params Parameters for retrieving options Candles
|
|
1969
|
-
* @returns Promise<
|
|
1968
|
+
* @returns Promise<GetOptionsCandlesResp[]>
|
|
1970
1969
|
*/
|
|
1971
|
-
getOptionsCandles(params: GetOptionsCandlesReq): Promise<
|
|
1970
|
+
getOptionsCandles(params: GetOptionsCandlesReq): Promise<OptionsCandle[]>;
|
|
1972
1971
|
/**
|
|
1973
1972
|
* Mark price Candles of an underlying
|
|
1974
1973
|
*
|
|
1975
1974
|
* @param params Parameters for retrieving mark price Candles of an underlying
|
|
1976
|
-
* @returns Promise<
|
|
1975
|
+
* @returns Promise<GetOptionsUnderlyingCandlesResp[]>
|
|
1977
1976
|
*/
|
|
1978
|
-
getOptionsUnderlyingCandles(params: GetOptionsUnderlyingCandlesReq): Promise<
|
|
1977
|
+
getOptionsUnderlyingCandles(params: GetOptionsUnderlyingCandlesReq): Promise<OptionsUnderlyingCandle[]>;
|
|
1979
1978
|
/**
|
|
1980
1979
|
* Options trade history
|
|
1981
1980
|
*
|
|
1982
1981
|
* @param params Parameters for retrieving options trade history
|
|
1983
|
-
* @returns Promise<
|
|
1982
|
+
* @returns Promise<GetOptionsTradesResp[]>
|
|
1984
1983
|
*/
|
|
1985
|
-
getOptionsTrades(params: GetOptionsTradesReq): Promise<
|
|
1984
|
+
getOptionsTrades(params: GetOptionsTradesReq): Promise<OptionsTrade[]>;
|
|
1986
1985
|
/**
|
|
1987
1986
|
* List options account
|
|
1988
1987
|
*
|
|
1989
|
-
* @returns Promise<
|
|
1988
|
+
* @returns Promise<GetOptionsAccountResp>
|
|
1990
1989
|
*/
|
|
1991
|
-
getOptionsAccount(): Promise<
|
|
1990
|
+
getOptionsAccount(): Promise<OptionsAccount>;
|
|
1992
1991
|
/**
|
|
1993
1992
|
* List account changing history
|
|
1994
1993
|
*
|
|
1995
1994
|
* @param params Parameters for listing account changing history
|
|
1996
|
-
* @returns Promise<
|
|
1995
|
+
* @returns Promise<GetOptionsAccountChangeResp[]>
|
|
1997
1996
|
*/
|
|
1998
|
-
getOptionsAccountChange(params?: GetOptionsAccountChangeReq): Promise<
|
|
1997
|
+
getOptionsAccountChange(params?: GetOptionsAccountChangeReq): Promise<OptionsAccountChangeRecord[]>;
|
|
1999
1998
|
/**
|
|
2000
1999
|
* List user's positions of specified underlying
|
|
2001
2000
|
*
|
|
2002
2001
|
* @param params Parameters for listing user's positions of specified underlying
|
|
2003
|
-
* @returns Promise<
|
|
2002
|
+
* @returns Promise<GetOptionsPositionsUnderlyingResp[]>
|
|
2004
2003
|
*/
|
|
2005
2004
|
getOptionsPositionsUnderlying(params: {
|
|
2006
2005
|
underlying?: string;
|
|
2007
|
-
}): Promise<
|
|
2006
|
+
}): Promise<OptionsPositionsUnderlying[]>;
|
|
2008
2007
|
/**
|
|
2009
2008
|
* Get specified contract position
|
|
2010
2009
|
*
|
|
2011
2010
|
* @param params Parameters for retrieving specified contract position
|
|
2012
|
-
* @returns Promise<
|
|
2011
|
+
* @returns Promise<GetOptionsPositionsUnderlyingResp>
|
|
2013
2012
|
*/
|
|
2014
2013
|
getOptionsPositionContract(params: {
|
|
2015
2014
|
contract: string;
|
|
2016
|
-
}): Promise<
|
|
2015
|
+
}): Promise<OptionsPositionsUnderlying>;
|
|
2017
2016
|
/**
|
|
2018
2017
|
* List user's liquidation history of specified underlying
|
|
2019
2018
|
*
|
|
2020
2019
|
* @param params Parameters for listing user's liquidation history of specified underlying
|
|
2021
|
-
* @returns Promise<
|
|
2020
|
+
* @returns Promise<GetOptionsLiquidationResp[]>
|
|
2022
2021
|
*/
|
|
2023
2022
|
getOptionsLiquidation(params: {
|
|
2024
2023
|
underlying: string;
|
|
2025
2024
|
contract?: string;
|
|
2026
|
-
}): Promise<
|
|
2025
|
+
}): Promise<GetOptionsLiquidationResp[]>;
|
|
2027
2026
|
/**
|
|
2028
2027
|
* Create an options order
|
|
2029
2028
|
*
|
|
2030
2029
|
* @param params Parameters for creating an options order
|
|
2031
|
-
* @returns Promise<
|
|
2030
|
+
* @returns Promise<SubmitOptionsOrderResp>
|
|
2032
2031
|
*/
|
|
2033
|
-
submitOptionsOrder(params: SubmitOptionsOrderReq): Promise<
|
|
2032
|
+
submitOptionsOrder(params: SubmitOptionsOrderReq): Promise<SubmitOptionsOrderResp>;
|
|
2034
2033
|
/**
|
|
2035
2034
|
* List options orders
|
|
2036
2035
|
*
|
|
2037
2036
|
* @param params Parameters for listing options orders
|
|
2038
|
-
* @returns Promise<
|
|
2037
|
+
* @returns Promise<SubmitOptionsOrderResp[]>
|
|
2039
2038
|
*/
|
|
2040
|
-
getOptionsOrders(params: GetOptionsOrdersReq): Promise<
|
|
2039
|
+
getOptionsOrders(params: GetOptionsOrdersReq): Promise<SubmitOptionsOrderResp[]>;
|
|
2041
2040
|
/**
|
|
2042
2041
|
* Cancel all open orders matched
|
|
2043
2042
|
*
|
|
2044
2043
|
* @param params Parameters for canceling all open orders matched
|
|
2045
|
-
* @returns Promise<
|
|
2044
|
+
* @returns Promise<SubmitOptionsOrderResp[]>
|
|
2046
2045
|
*/
|
|
2047
2046
|
cancelAllOpenOptionsOrders(params: {
|
|
2048
2047
|
contract?: string;
|
|
2049
2048
|
underlying?: string;
|
|
2050
2049
|
side?: 'ask' | 'bid';
|
|
2051
|
-
}): Promise<
|
|
2050
|
+
}): Promise<SubmitOptionsOrderResp[]>;
|
|
2052
2051
|
/**
|
|
2053
2052
|
* Get a single order
|
|
2054
2053
|
*
|
|
2055
2054
|
* @param params Parameters for retrieving a single order
|
|
2056
|
-
* @returns Promise<
|
|
2055
|
+
* @returns Promise<SubmitOptionsOrderResp>
|
|
2057
2056
|
*/
|
|
2058
2057
|
getOptionsOrder(params: {
|
|
2059
2058
|
order_id: number;
|
|
2060
|
-
}): Promise<
|
|
2059
|
+
}): Promise<SubmitOptionsOrderResp>;
|
|
2061
2060
|
/**
|
|
2062
2061
|
* Cancel a single order
|
|
2063
2062
|
*
|
|
2064
2063
|
* @param params Parameters for canceling a single order
|
|
2065
|
-
* @returns Promise<
|
|
2064
|
+
* @returns Promise<SubmitOptionsOrderResp>
|
|
2066
2065
|
*/
|
|
2067
2066
|
cancelOptionsOrder(params: {
|
|
2068
2067
|
order_id: number;
|
|
2069
|
-
}): Promise<
|
|
2068
|
+
}): Promise<SubmitOptionsOrderResp>;
|
|
2070
2069
|
/**
|
|
2071
2070
|
* List personal trading history
|
|
2072
2071
|
*
|
|
2073
2072
|
* @param params Parameters for listing personal trading history
|
|
2074
|
-
* @returns Promise<
|
|
2073
|
+
* @returns Promise<GetOptionsPersonalHistoryResp[]>
|
|
2075
2074
|
*/
|
|
2076
|
-
getOptionsPersonalHistory(params: GetOptionsPersonalHistoryReq): Promise<
|
|
2075
|
+
getOptionsPersonalHistory(params: GetOptionsPersonalHistoryReq): Promise<OptionsUserHistoryRecord[]>;
|
|
2077
2076
|
/**==========================================================================================================================
|
|
2078
2077
|
* EARN UNI
|
|
2079
2078
|
* ==========================================================================================================================
|
|
@@ -2081,98 +2080,98 @@ export declare class RestClient extends BaseRestClient {
|
|
|
2081
2080
|
/**
|
|
2082
2081
|
* List currencies for lending
|
|
2083
2082
|
*
|
|
2084
|
-
* @returns Promise<
|
|
2083
|
+
* @returns Promise<GetLendingCurrenciesResp[]>
|
|
2085
2084
|
*/
|
|
2086
|
-
getLendingCurrencies(): Promise<
|
|
2085
|
+
getLendingCurrencies(): Promise<LendingCurrency[]>;
|
|
2087
2086
|
/**
|
|
2088
2087
|
* Get currency detail for lending
|
|
2089
2088
|
*
|
|
2090
2089
|
* @param params Parameters for retrieving currency detail for lending
|
|
2091
|
-
* @returns Promise<
|
|
2090
|
+
* @returns Promise<GetLendingCurrenciesResp>
|
|
2092
2091
|
*/
|
|
2093
2092
|
getLendingCurrency(params: {
|
|
2094
2093
|
currency: string;
|
|
2095
|
-
}): Promise<
|
|
2094
|
+
}): Promise<LendingCurrency>;
|
|
2096
2095
|
/**
|
|
2097
2096
|
* Lend or redeem
|
|
2098
2097
|
*
|
|
2099
2098
|
* @param params Parameters for lending or redeeming
|
|
2100
|
-
* @returns Promise<
|
|
2099
|
+
* @returns Promise<any>
|
|
2101
2100
|
*/
|
|
2102
|
-
submitLendOrRedeemOrder(params: SubmitLendOrRedeemReq): Promise<
|
|
2101
|
+
submitLendOrRedeemOrder(params: SubmitLendOrRedeemReq): Promise<any>;
|
|
2103
2102
|
/**
|
|
2104
2103
|
* List user's lending orders
|
|
2105
2104
|
*
|
|
2106
2105
|
* @param params Parameters for listing user's lending orders
|
|
2107
|
-
* @returns Promise<
|
|
2106
|
+
* @returns Promise<GetLendingOrdersResp[]>
|
|
2108
2107
|
*/
|
|
2109
|
-
getLendingOrders(params?: GetLendingOrdersReq): Promise<
|
|
2108
|
+
getLendingOrders(params?: GetLendingOrdersReq): Promise<LendingOrder[]>;
|
|
2110
2109
|
/**
|
|
2111
2110
|
* Amend lending order
|
|
2112
2111
|
*
|
|
2113
2112
|
* Currently only supports amending the minimum interest rate (hour)
|
|
2114
2113
|
*
|
|
2115
2114
|
* @param params Parameters for amending lending order
|
|
2116
|
-
* @returns Promise<
|
|
2115
|
+
* @returns Promise<any>
|
|
2117
2116
|
*/
|
|
2118
2117
|
updateLendingOrder(params: {
|
|
2119
2118
|
currency?: string;
|
|
2120
2119
|
min_rate?: string;
|
|
2121
|
-
}): Promise<
|
|
2120
|
+
}): Promise<any>;
|
|
2122
2121
|
/**
|
|
2123
2122
|
* List records of lending
|
|
2124
2123
|
*
|
|
2125
2124
|
* @param params Parameters for listing records of lending
|
|
2126
|
-
* @returns Promise<
|
|
2125
|
+
* @returns Promise<GetLendingRecordsResp[]>
|
|
2127
2126
|
*/
|
|
2128
|
-
getLendingRecords(params?: GetLendingRecordsReq): Promise<
|
|
2127
|
+
getLendingRecords(params?: GetLendingRecordsReq): Promise<LendingRecord[]>;
|
|
2129
2128
|
/**
|
|
2130
2129
|
* Get the user's total interest income of specified currency
|
|
2131
2130
|
*
|
|
2132
2131
|
* @param params Parameters for retrieving the user's total interest income of specified currency
|
|
2133
|
-
* @returns Promise<
|
|
2132
|
+
* @returns Promise<{
|
|
2134
2133
|
* currency: string;
|
|
2135
2134
|
* interest: string;
|
|
2136
|
-
* }
|
|
2135
|
+
* }>
|
|
2137
2136
|
*/
|
|
2138
2137
|
getLendingTotalInterest(params: {
|
|
2139
2138
|
currency: string;
|
|
2140
|
-
}): Promise<
|
|
2139
|
+
}): Promise<{
|
|
2141
2140
|
currency: string;
|
|
2142
2141
|
interest: string;
|
|
2143
|
-
}
|
|
2142
|
+
}>;
|
|
2144
2143
|
/**
|
|
2145
2144
|
* List interest records
|
|
2146
2145
|
*
|
|
2147
2146
|
* @param params Parameters for listing interest records
|
|
2148
|
-
* @returns Promise<
|
|
2147
|
+
* @returns Promise<GetLendingInterestRecordsResp[]>
|
|
2149
2148
|
*/
|
|
2150
|
-
getLendingInterestRecords(params?: GetLendingInterestRecordsReq): Promise<
|
|
2149
|
+
getLendingInterestRecords(params?: GetLendingInterestRecordsReq): Promise<LendingInterestRecord[]>;
|
|
2151
2150
|
/**
|
|
2152
2151
|
* Set interest reinvestment toggle
|
|
2153
2152
|
*
|
|
2154
2153
|
* @param params Parameters for setting interest reinvestment toggle
|
|
2155
|
-
* @returns Promise<
|
|
2154
|
+
* @returns Promise<any>
|
|
2156
2155
|
*/
|
|
2157
2156
|
updateInterestReinvestment(params: {
|
|
2158
2157
|
currency: string;
|
|
2159
2158
|
status: boolean;
|
|
2160
|
-
}): Promise<
|
|
2159
|
+
}): Promise<any>;
|
|
2161
2160
|
/**
|
|
2162
2161
|
* Query currency interest compounding status
|
|
2163
2162
|
*
|
|
2164
2163
|
* @param params Parameters for querying currency interest compounding status
|
|
2165
|
-
* @returns Promise<
|
|
2164
|
+
* @returns Promise<{
|
|
2166
2165
|
* currency: string;
|
|
2167
2166
|
* interest_status: string;
|
|
2168
|
-
* }
|
|
2167
|
+
* }>
|
|
2169
2168
|
*/
|
|
2170
2169
|
getLendingInterestStatus(params: {
|
|
2171
2170
|
currency: string;
|
|
2172
|
-
}): Promise<
|
|
2171
|
+
}): Promise<{
|
|
2173
2172
|
currency: string;
|
|
2174
2173
|
interest_status: string;
|
|
2175
|
-
}
|
|
2174
|
+
}>;
|
|
2176
2175
|
/**==========================================================================================================================
|
|
2177
2176
|
* COLLATERAL LOAN
|
|
2178
2177
|
* ==========================================================================================================================
|
|
@@ -2181,102 +2180,102 @@ export declare class RestClient extends BaseRestClient {
|
|
|
2181
2180
|
* Place order
|
|
2182
2181
|
*
|
|
2183
2182
|
* @param params Parameters for placing an order
|
|
2184
|
-
* @returns Promise<
|
|
2183
|
+
* @returns Promise<{ order_id: number }>
|
|
2185
2184
|
*/
|
|
2186
|
-
submitLoanOrder(params: SubmitLoanOrderReq): Promise<
|
|
2185
|
+
submitLoanOrder(params: SubmitLoanOrderReq): Promise<{
|
|
2187
2186
|
order_id: number;
|
|
2188
|
-
}
|
|
2187
|
+
}>;
|
|
2189
2188
|
/**
|
|
2190
2189
|
* List Orders
|
|
2191
2190
|
*
|
|
2192
2191
|
* @param params Parameters for listing orders
|
|
2193
|
-
* @returns Promise<
|
|
2192
|
+
* @returns Promise<GetLoanOrdersResp[]>
|
|
2194
2193
|
*/
|
|
2195
|
-
getLoanOrders(params?: GetLoanOrdersReq): Promise<
|
|
2194
|
+
getLoanOrders(params?: GetLoanOrdersReq): Promise<LoanOrder[]>;
|
|
2196
2195
|
/**
|
|
2197
2196
|
* Get a single order
|
|
2198
2197
|
*
|
|
2199
2198
|
* @param params Parameters for retrieving a single order
|
|
2200
|
-
* @returns Promise<
|
|
2199
|
+
* @returns Promise<GetLoanOrdersResp>
|
|
2201
2200
|
*/
|
|
2202
2201
|
getLoanOrder(params: {
|
|
2203
2202
|
order_id: number;
|
|
2204
|
-
}): Promise<
|
|
2203
|
+
}): Promise<LoanOrder>;
|
|
2205
2204
|
/**
|
|
2206
2205
|
* Repayment
|
|
2207
2206
|
*
|
|
2208
2207
|
* @param params Parameters for repayment
|
|
2209
|
-
* @returns Promise<
|
|
2208
|
+
* @returns Promise<{
|
|
2210
2209
|
* repaid_principal: string;
|
|
2211
2210
|
* repaid_interest: string;
|
|
2212
|
-
* }
|
|
2211
|
+
* }>
|
|
2213
2212
|
*/
|
|
2214
2213
|
submitLoanRepay(params: {
|
|
2215
2214
|
order_id: number;
|
|
2216
2215
|
repay_amount: string;
|
|
2217
2216
|
repaid_all: boolean;
|
|
2218
|
-
}): Promise<
|
|
2217
|
+
}): Promise<{
|
|
2219
2218
|
repaid_principal: string;
|
|
2220
2219
|
repaid_interest: string;
|
|
2221
|
-
}
|
|
2220
|
+
}>;
|
|
2222
2221
|
/**
|
|
2223
2222
|
* Repayment history
|
|
2224
2223
|
*
|
|
2225
2224
|
* @param params Parameters for retrieving repayment history
|
|
2226
|
-
* @returns Promise<
|
|
2225
|
+
* @returns Promise<GetLoanRepaymentHistoryResp[]>
|
|
2227
2226
|
*/
|
|
2228
|
-
getLoanRepaymentHistory(params: GetLoanRepaymentHistoryReq): Promise<
|
|
2227
|
+
getLoanRepaymentHistory(params: GetLoanRepaymentHistoryReq): Promise<LoanRepaymentHistoryRecord[]>;
|
|
2229
2228
|
/**
|
|
2230
2229
|
* Increase or redeem collateral
|
|
2231
2230
|
*
|
|
2232
2231
|
* @param params Parameters for increasing or redeeming collateral
|
|
2233
|
-
* @returns Promise<
|
|
2232
|
+
* @returns Promise<any>
|
|
2234
2233
|
*/
|
|
2235
|
-
updateLoanCollateral(params: UpdateLoanCollateralReq): Promise<
|
|
2234
|
+
updateLoanCollateral(params: UpdateLoanCollateralReq): Promise<any>;
|
|
2236
2235
|
/**
|
|
2237
2236
|
* Query collateral adjustment records
|
|
2238
2237
|
*
|
|
2239
2238
|
* @param params Parameters for querying collateral adjustment records
|
|
2240
|
-
* @returns Promise<
|
|
2239
|
+
* @returns Promise<GetLoanCollateralRecordsResp[]>
|
|
2241
2240
|
*/
|
|
2242
|
-
getLoanCollateralRecords(params?: GetLoanCollateralRecordsReq): Promise<
|
|
2241
|
+
getLoanCollateralRecords(params?: GetLoanCollateralRecordsReq): Promise<LoanCollateralRecord[]>;
|
|
2243
2242
|
/**
|
|
2244
2243
|
* Query the total borrowing and collateral amount for the user
|
|
2245
2244
|
*
|
|
2246
|
-
* @returns Promise<
|
|
2245
|
+
* @returns Promise<{
|
|
2247
2246
|
* borrow_amount: string;
|
|
2248
2247
|
* collateral_amount: string;
|
|
2249
|
-
* }
|
|
2248
|
+
* }>
|
|
2250
2249
|
*/
|
|
2251
|
-
getLoanTotalAmount(): Promise<
|
|
2250
|
+
getLoanTotalAmount(): Promise<{
|
|
2252
2251
|
borrow_amount: string;
|
|
2253
2252
|
collateral_amount: string;
|
|
2254
|
-
}
|
|
2253
|
+
}>;
|
|
2255
2254
|
/**
|
|
2256
2255
|
* Query user's collateralization ratio
|
|
2257
2256
|
*
|
|
2258
2257
|
* @param params Parameters for querying user's collateralization ratio
|
|
2259
|
-
* @returns Promise<
|
|
2258
|
+
* @returns Promise<GetLoanCollateralizationRatioResp>
|
|
2260
2259
|
*/
|
|
2261
2260
|
getLoanCollateralizationRatio(params: {
|
|
2262
2261
|
collateral_currency: string;
|
|
2263
2262
|
borrow_currency: string;
|
|
2264
|
-
}): Promise<
|
|
2263
|
+
}): Promise<LoanCollateralRatio>;
|
|
2265
2264
|
/**
|
|
2266
2265
|
* Query supported borrowing and collateral currencies
|
|
2267
2266
|
*
|
|
2268
2267
|
* @param params Parameters for querying supported borrowing and collateral currencies
|
|
2269
|
-
* @returns Promise<
|
|
2268
|
+
* @returns Promise<{
|
|
2270
2269
|
* loan_currency: string;
|
|
2271
2270
|
* collateral_currency: string[];
|
|
2272
|
-
* }[]
|
|
2271
|
+
* }[]>
|
|
2273
2272
|
*/
|
|
2274
2273
|
getLoanSupportedCurrencies(params?: {
|
|
2275
2274
|
loan_currency?: string;
|
|
2276
|
-
}): Promise<
|
|
2275
|
+
}): Promise<{
|
|
2277
2276
|
loan_currency: string;
|
|
2278
2277
|
collateral_currency: string[];
|
|
2279
|
-
}[]
|
|
2278
|
+
}[]>;
|
|
2280
2279
|
/**==========================================================================================================================
|
|
2281
2280
|
* MULTI COLLATERAL LOAN
|
|
2282
2281
|
* ==========================================================================================================================
|
|
@@ -2285,83 +2284,83 @@ export declare class RestClient extends BaseRestClient {
|
|
|
2285
2284
|
* Create Multi-Collateral Order
|
|
2286
2285
|
*
|
|
2287
2286
|
* @param params Parameters for creating a multi-collateral order
|
|
2288
|
-
* @returns Promise<
|
|
2287
|
+
* @returns Promise<{ order_id: number }>
|
|
2289
2288
|
*/
|
|
2290
|
-
submitMultiLoanOrder(params: SubmitMultiLoanOrderReq): Promise<
|
|
2289
|
+
submitMultiLoanOrder(params: SubmitMultiLoanOrderReq): Promise<{
|
|
2291
2290
|
order_id: number;
|
|
2292
|
-
}
|
|
2291
|
+
}>;
|
|
2293
2292
|
/**
|
|
2294
2293
|
* List Multi-Collateral Orders
|
|
2295
2294
|
*
|
|
2296
2295
|
* @param params Parameters for listing multi-collateral orders
|
|
2297
|
-
* @returns Promise<
|
|
2296
|
+
* @returns Promise<GetMultiLoanOrdersResp[]>
|
|
2298
2297
|
*/
|
|
2299
|
-
getMultiLoanOrders(params?: GetMultiLoanOrdersReq): Promise<
|
|
2298
|
+
getMultiLoanOrders(params?: GetMultiLoanOrdersReq): Promise<MultiLoanOrder[]>;
|
|
2300
2299
|
/**
|
|
2301
2300
|
* Get Multi-Collateral Order Detail
|
|
2302
2301
|
*
|
|
2303
2302
|
* @param params Parameters for retrieving a multi-collateral order detail
|
|
2304
|
-
* @returns Promise<
|
|
2303
|
+
* @returns Promise<GetMultiLoanOrdersResp>
|
|
2305
2304
|
*/
|
|
2306
2305
|
getMultiLoanOrder(params: {
|
|
2307
2306
|
order_id: string;
|
|
2308
|
-
}): Promise<
|
|
2307
|
+
}): Promise<MultiLoanOrder>;
|
|
2309
2308
|
/**
|
|
2310
2309
|
* Repay Multi-Collateral Loan
|
|
2311
2310
|
*
|
|
2312
2311
|
* @param params Parameters for repaying a multi-collateral loan
|
|
2313
|
-
* @returns Promise<
|
|
2312
|
+
* @returns Promise<RepayMultiLoanResp>
|
|
2314
2313
|
*/
|
|
2315
|
-
repayMultiLoan(params: RepayMultiLoanReq): Promise<
|
|
2314
|
+
repayMultiLoan(params: RepayMultiLoanReq): Promise<RepayMultiLoanResp>;
|
|
2316
2315
|
/**
|
|
2317
2316
|
* List Multi-Collateral Repay Records
|
|
2318
2317
|
*
|
|
2319
2318
|
* @param params Parameters for listing multi-collateral repay records
|
|
2320
|
-
* @returns Promise<
|
|
2319
|
+
* @returns Promise<GetMultiLoanRepayRecordsResp[]>
|
|
2321
2320
|
*/
|
|
2322
|
-
getMultiLoanRepayRecords(params: GetMultiLoanRepayRecordsReq): Promise<
|
|
2321
|
+
getMultiLoanRepayRecords(params: GetMultiLoanRepayRecordsReq): Promise<MultiLoanRepayRecord[]>;
|
|
2323
2322
|
/**
|
|
2324
2323
|
* Operate Multi-Collateral
|
|
2325
2324
|
*
|
|
2326
2325
|
* @param params Parameters for operating multi-collateral
|
|
2327
|
-
* @returns Promise<
|
|
2326
|
+
* @returns Promise<UpdateMultiLoanResp>
|
|
2328
2327
|
*/
|
|
2329
|
-
updateMultiLoan(params: UpdateMultiLoanReq): Promise<
|
|
2328
|
+
updateMultiLoan(params: UpdateMultiLoanReq): Promise<UpdateMultiLoanResp>;
|
|
2330
2329
|
/**
|
|
2331
2330
|
* Query collateral adjustment records
|
|
2332
2331
|
*
|
|
2333
2332
|
* @param params Parameters for querying collateral adjustment records
|
|
2334
|
-
* @returns Promise<
|
|
2333
|
+
* @returns Promise<GetMultiLoanAdjustmentRecordsResp[]>
|
|
2335
2334
|
*/
|
|
2336
|
-
getMultiLoanAdjustmentRecords(params?: GetMultiLoanAdjustmentRecordsReq): Promise<
|
|
2335
|
+
getMultiLoanAdjustmentRecords(params?: GetMultiLoanAdjustmentRecordsReq): Promise<MultiLoanAdjustmentRecord[]>;
|
|
2337
2336
|
/**
|
|
2338
2337
|
* List User Currency Quota
|
|
2339
2338
|
*
|
|
2340
2339
|
* @param params Parameters for listing user currency quota
|
|
2341
|
-
* @returns Promise<
|
|
2340
|
+
* @returns Promise<GetMultiLoanCurrencyQuotaResp[]>
|
|
2342
2341
|
*/
|
|
2343
2342
|
getMultiLoanCurrencyQuota(params: {
|
|
2344
2343
|
type: 'collateral' | 'borrow';
|
|
2345
2344
|
currency: string;
|
|
2346
|
-
}): Promise<
|
|
2345
|
+
}): Promise<MultiLoanCurrencyQuota[]>;
|
|
2347
2346
|
/**
|
|
2348
2347
|
* Query supported borrowing and collateral currencies in Multi-Collateral
|
|
2349
2348
|
*
|
|
2350
|
-
* @returns Promise<
|
|
2349
|
+
* @returns Promise<GetMultiLoanSupportedCurrenciesResp>
|
|
2351
2350
|
*/
|
|
2352
|
-
getMultiLoanSupportedCurrencies(): Promise<
|
|
2351
|
+
getMultiLoanSupportedCurrencies(): Promise<MultiLoanSupportedCurrencies>;
|
|
2353
2352
|
/**
|
|
2354
2353
|
* Get Multi-Collateral ratio
|
|
2355
2354
|
*
|
|
2356
|
-
* @returns Promise<
|
|
2355
|
+
* @returns Promise<GetMultiLoanRatioResp>
|
|
2357
2356
|
*/
|
|
2358
|
-
getMultiLoanRatio(): Promise<
|
|
2357
|
+
getMultiLoanRatio(): Promise<MultiLoanRatio>;
|
|
2359
2358
|
/**
|
|
2360
2359
|
* Query fixed interest rates for the currency for 7 days and 30 days
|
|
2361
2360
|
*
|
|
2362
|
-
* @returns Promise<
|
|
2361
|
+
* @returns Promise<GetMultiLoanFixedRatesResp[]>
|
|
2363
2362
|
*/
|
|
2364
|
-
getMultiLoanFixedRates(): Promise<
|
|
2363
|
+
getMultiLoanFixedRates(): Promise<MultiLoanFixedRate[]>;
|
|
2365
2364
|
/**==========================================================================================================================
|
|
2366
2365
|
* EARN
|
|
2367
2366
|
* ==========================================================================================================================
|
|
@@ -2370,58 +2369,58 @@ export declare class RestClient extends BaseRestClient {
|
|
|
2370
2369
|
* ETH2 swap
|
|
2371
2370
|
*
|
|
2372
2371
|
* @param params Parameters for ETH2 swap
|
|
2373
|
-
* @returns Promise<
|
|
2372
|
+
* @returns Promise<any>
|
|
2374
2373
|
*/
|
|
2375
2374
|
submitEth2Swap(params: {
|
|
2376
2375
|
side: '1' | '2';
|
|
2377
2376
|
amount: string;
|
|
2378
|
-
}): Promise<
|
|
2377
|
+
}): Promise<any>;
|
|
2379
2378
|
/**
|
|
2380
2379
|
* Dual Investment product list
|
|
2381
2380
|
*
|
|
2382
|
-
* @returns Promise<
|
|
2381
|
+
* @returns Promise<GetDualInvestmentProductsResp[]>
|
|
2383
2382
|
*/
|
|
2384
|
-
getDualInvestmentProducts(): Promise<
|
|
2383
|
+
getDualInvestmentProducts(): Promise<DualInvestmentProduct[]>;
|
|
2385
2384
|
/**
|
|
2386
2385
|
* Dual Investment order list
|
|
2387
2386
|
*
|
|
2388
|
-
* @returns Promise<
|
|
2387
|
+
* @returns Promise<GetDualInvestmentOrdersResp[]>
|
|
2389
2388
|
*/
|
|
2390
|
-
getDualInvestmentOrders(): Promise<
|
|
2389
|
+
getDualInvestmentOrders(): Promise<DualInvestmentOrder[]>;
|
|
2391
2390
|
/**
|
|
2392
2391
|
* Place Dual Investment order
|
|
2393
2392
|
*
|
|
2394
2393
|
* @param params Parameters for placing a dual investment order
|
|
2395
|
-
* @returns Promise<
|
|
2394
|
+
* @returns Promise<any>
|
|
2396
2395
|
*/
|
|
2397
2396
|
submitDualInvestmentOrder(params: {
|
|
2398
2397
|
plan_id: string;
|
|
2399
2398
|
copies: string;
|
|
2400
|
-
}): Promise<
|
|
2399
|
+
}): Promise<any>;
|
|
2401
2400
|
/**
|
|
2402
2401
|
* Structured Product List
|
|
2403
2402
|
*
|
|
2404
2403
|
* @param params Parameters for listing structured products
|
|
2405
|
-
* @returns Promise<
|
|
2404
|
+
* @returns Promise<GetStructuredProductListResp[]>
|
|
2406
2405
|
*/
|
|
2407
|
-
getStructuredProducts(params: GetStructuredProductListReq): Promise<
|
|
2406
|
+
getStructuredProducts(params: GetStructuredProductListReq): Promise<StructuredProduct[]>;
|
|
2408
2407
|
/**
|
|
2409
2408
|
* Structured Product Order List
|
|
2410
2409
|
*
|
|
2411
2410
|
* @param params Parameters for listing structured product orders
|
|
2412
|
-
* @returns Promise<
|
|
2411
|
+
* @returns Promise<GetStructuredProductOrdersResp[]>
|
|
2413
2412
|
*/
|
|
2414
|
-
getStructuredProductOrders(params?: GetStructuredProductOrdersReq): Promise<
|
|
2413
|
+
getStructuredProductOrders(params?: GetStructuredProductOrdersReq): Promise<StructuredProductOrder[]>;
|
|
2415
2414
|
/**
|
|
2416
2415
|
* Place Structured Product Order
|
|
2417
2416
|
*
|
|
2418
2417
|
* @param params Parameters for placing a structured product order
|
|
2419
|
-
* @returns Promise<
|
|
2418
|
+
* @returns Promise<any>
|
|
2420
2419
|
*/
|
|
2421
2420
|
submitStructuredProductOrder(params: {
|
|
2422
2421
|
pid?: string;
|
|
2423
2422
|
amount?: string;
|
|
2424
|
-
}): Promise<
|
|
2423
|
+
}): Promise<any>;
|
|
2425
2424
|
/**==========================================================================================================================
|
|
2426
2425
|
* ACCOUNT
|
|
2427
2426
|
* ==========================================================================================================================
|
|
@@ -2429,54 +2428,54 @@ export declare class RestClient extends BaseRestClient {
|
|
|
2429
2428
|
/**
|
|
2430
2429
|
* Get account detail
|
|
2431
2430
|
*
|
|
2432
|
-
* @returns Promise<
|
|
2431
|
+
* @returns Promise<GetAccountDetailResp>
|
|
2433
2432
|
*/
|
|
2434
|
-
getAccountDetail(): Promise<
|
|
2433
|
+
getAccountDetail(): Promise<AccountDetail>;
|
|
2435
2434
|
/**
|
|
2436
2435
|
* Create STP Group
|
|
2437
2436
|
*
|
|
2438
2437
|
* @param params Parameters for creating an STP group
|
|
2439
|
-
* @returns Promise<
|
|
2438
|
+
* @returns Promise<CreateStpGroupResp>
|
|
2440
2439
|
*/
|
|
2441
|
-
createStpGroup(params: CreateStpGroupReq): Promise<
|
|
2440
|
+
createStpGroup(params: CreateStpGroupReq): Promise<StpGroup>;
|
|
2442
2441
|
/**
|
|
2443
2442
|
* List STP Groups
|
|
2444
2443
|
*
|
|
2445
2444
|
* @param params Parameters for listing STP groups
|
|
2446
|
-
* @returns Promise<
|
|
2445
|
+
* @returns Promise<CreateStpGroupResp[]>
|
|
2447
2446
|
*/
|
|
2448
2447
|
getStpGroups(params?: {
|
|
2449
2448
|
name?: string;
|
|
2450
|
-
}): Promise<
|
|
2449
|
+
}): Promise<StpGroup[]>;
|
|
2451
2450
|
/**
|
|
2452
2451
|
* List users of the STP group
|
|
2453
2452
|
*
|
|
2454
2453
|
* @param params Parameters for listing users of the STP group
|
|
2455
|
-
* @returns Promise<
|
|
2454
|
+
* @returns Promise<StpResp[]>
|
|
2456
2455
|
*/
|
|
2457
2456
|
getStpGroupUsers(params: {
|
|
2458
2457
|
stp_id: number;
|
|
2459
|
-
}): Promise<
|
|
2458
|
+
}): Promise<StpGroupUser[]>;
|
|
2460
2459
|
/**
|
|
2461
2460
|
* Add users to the STP group
|
|
2462
2461
|
*
|
|
2463
2462
|
* @param params Parameters for adding users to the STP group
|
|
2464
|
-
* @returns Promise<
|
|
2463
|
+
* @returns Promise<StpResp[]>
|
|
2465
2464
|
*/
|
|
2466
2465
|
addUsersToStpGroup(params: {
|
|
2467
2466
|
stp_id: number;
|
|
2468
2467
|
body: number[];
|
|
2469
|
-
}): Promise<
|
|
2468
|
+
}): Promise<StpGroupUser[]>;
|
|
2470
2469
|
/**
|
|
2471
2470
|
* Delete the user in the STP group
|
|
2472
2471
|
*
|
|
2473
2472
|
* @param params Parameters for deleting users from the STP group
|
|
2474
|
-
* @returns Promise<
|
|
2473
|
+
* @returns Promise<StpResp[]>
|
|
2475
2474
|
*/
|
|
2476
2475
|
deleteUserFromStpGroup(params: {
|
|
2477
2476
|
stp_id: number;
|
|
2478
2477
|
user_id: number;
|
|
2479
|
-
}): Promise<
|
|
2478
|
+
}): Promise<StpGroupUser[]>;
|
|
2480
2479
|
/**==========================================================================================================================
|
|
2481
2480
|
* REBATES
|
|
2482
2481
|
* ==========================================================================================================================
|
|
@@ -2486,49 +2485,49 @@ export declare class RestClient extends BaseRestClient {
|
|
|
2486
2485
|
* Record time range cannot exceed 30 days.
|
|
2487
2486
|
*
|
|
2488
2487
|
* @param params Parameters for retrieving transaction history
|
|
2489
|
-
* @returns Promise<
|
|
2488
|
+
* @returns Promise<GetAgencyTransactionHistoryResp>
|
|
2490
2489
|
*/
|
|
2491
|
-
getAgencyTransactionHistory(params: GetAgencyTransactionHistoryReq): Promise<
|
|
2490
|
+
getAgencyTransactionHistory(params: GetAgencyTransactionHistoryReq): Promise<{
|
|
2492
2491
|
total: number;
|
|
2493
2492
|
list: AgencyTransactionHistoryRecord[];
|
|
2494
|
-
}
|
|
2493
|
+
}>;
|
|
2495
2494
|
/**
|
|
2496
2495
|
* The agency obtains the commission history of the recommended user.
|
|
2497
2496
|
* Record time range cannot exceed 30 days.
|
|
2498
2497
|
*
|
|
2499
2498
|
* @param params Parameters for retrieving commission history
|
|
2500
|
-
* @returns Promise<
|
|
2499
|
+
* @returns Promise<GetAgencyCommissionHistoryResp>
|
|
2501
2500
|
*/
|
|
2502
|
-
getAgencyCommissionHistory(params: GetAgencyCommissionHistoryReq): Promise<
|
|
2501
|
+
getAgencyCommissionHistory(params: GetAgencyCommissionHistoryReq): Promise<{
|
|
2503
2502
|
total: number;
|
|
2504
2503
|
list: AgencyCommissionHistoryRecord[];
|
|
2505
|
-
}
|
|
2504
|
+
}>;
|
|
2506
2505
|
/**
|
|
2507
2506
|
* The broker obtains the user's commission rebate records.
|
|
2508
2507
|
* Record time range cannot exceed 30 days.
|
|
2509
2508
|
*
|
|
2510
2509
|
* @param params Parameters for retrieving commission rebate records
|
|
2511
|
-
* @returns Promise<
|
|
2510
|
+
* @returns Promise<GetBrokerCommissionHistoryResp>
|
|
2512
2511
|
*/
|
|
2513
|
-
getBrokerCommissionHistory(params: GetBrokerCommissionHistoryReq): Promise<
|
|
2512
|
+
getBrokerCommissionHistory(params: GetBrokerCommissionHistoryReq): Promise<{
|
|
2514
2513
|
total: number;
|
|
2515
2514
|
list: BrokerCommissionHistoryRecord[];
|
|
2516
|
-
}
|
|
2515
|
+
}>;
|
|
2517
2516
|
/**
|
|
2518
2517
|
* The broker obtains the user's trading history.
|
|
2519
2518
|
* Record time range cannot exceed 30 days.
|
|
2520
2519
|
*
|
|
2521
2520
|
* @param params Parameters for retrieving trading history
|
|
2522
|
-
* @returns Promise<
|
|
2521
|
+
* @returns Promise<GetBrokerTransactionHistoryResp>
|
|
2523
2522
|
*/
|
|
2524
|
-
getBrokerTransactionHistory(params: GetBrokerTransactionHistoryReq): Promise<
|
|
2523
|
+
getBrokerTransactionHistory(params: GetBrokerTransactionHistoryReq): Promise<{
|
|
2525
2524
|
total: number;
|
|
2526
2525
|
list: BrokerTransactionHistoryRecord[];
|
|
2527
|
-
}
|
|
2526
|
+
}>;
|
|
2528
2527
|
/**
|
|
2529
2528
|
* User retrieves rebate information.
|
|
2530
2529
|
*/
|
|
2531
|
-
getUserRebateInfo(): Promise<
|
|
2530
|
+
getUserRebateInfo(): Promise<{
|
|
2532
2531
|
invite_uid: number;
|
|
2533
|
-
}
|
|
2532
|
+
}>;
|
|
2534
2533
|
}
|