gateio-api 1.0.4 → 1.0.5

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