Skip to content

Commit 1d22fce

Browse files
author
gateio
committed
update to v6.97.0
1 parent a3ac627 commit 1d22fce

28 files changed

+1558
-133
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## gate-api@6.96.0
1+
## gate-api@6.97.0
22

33
TypeScript NodeJS client for gate-api.
44

@@ -8,7 +8,7 @@ APIv4 provides spot, margin and futures trading operations. There are public API
88

99
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
1010

11-
- API version: 4.96.0
11+
- API version: 4.97.0
1212
- Package version:
1313
- Build package: org.openapitools.codegen.languages.TypeScriptNodeClientCodegen
1414
For more information, please visit [https://www.gate.io/page/contacts](https://www.gate.io/page/contacts)
@@ -145,6 +145,7 @@ Class | Method | HTTP request | Description
145145
*EarnUniApi* | [**listUniInterestRecords**](docs/EarnUniApi.md#listUniInterestRecords) | **GET** /earn/uni/interest_records | List interest records
146146
*EarnUniApi* | [**switchInterestReinvest**](docs/EarnUniApi.md#switchInterestReinvest) | **PUT** /earn/uni/interest_reinvest | Set interest reinvestment toggle
147147
*EarnUniApi* | [**getUniInterestStatus**](docs/EarnUniApi.md#getUniInterestStatus) | **GET** /earn/uni/interest_status/{currency} | query currency interest compounding status
148+
*EarnUniApi* | [**listUniChart**](docs/EarnUniApi.md#listUniChart) | **GET** /earn/uni/chart | UniLoan currency annualized trend chart
148149
*FlashSwapApi* | [**listFlashSwapCurrencyPair**](docs/FlashSwapApi.md#listFlashSwapCurrencyPair) | **GET** /flash_swap/currency_pairs | List All Supported Currency Pairs In Flash Swap
149150
*FlashSwapApi* | [**listFlashSwapOrders**](docs/FlashSwapApi.md#listFlashSwapOrders) | **GET** /flash_swap/orders | List all flash swap orders
150151
*FlashSwapApi* | [**createFlashSwapOrder**](docs/FlashSwapApi.md#createFlashSwapOrder) | **POST** /flash_swap/orders | Create a flash swap order
@@ -169,6 +170,7 @@ Class | Method | HTTP request | Description
169170
*FuturesApi* | [**getPosition**](docs/FuturesApi.md#getPosition) | **GET** /futures/{settle}/positions/{contract} | Get single position
170171
*FuturesApi* | [**updatePositionMargin**](docs/FuturesApi.md#updatePositionMargin) | **POST** /futures/{settle}/positions/{contract}/margin | Update position margin
171172
*FuturesApi* | [**updatePositionLeverage**](docs/FuturesApi.md#updatePositionLeverage) | **POST** /futures/{settle}/positions/{contract}/leverage | Update position leverage
173+
*FuturesApi* | [**updatePositionCrossMode**](docs/FuturesApi.md#updatePositionCrossMode) | **POST** /futures/{settle}/positions/cross_mode | Switch to the full position-by-store mode
172174
*FuturesApi* | [**updatePositionRiskLimit**](docs/FuturesApi.md#updatePositionRiskLimit) | **POST** /futures/{settle}/positions/{contract}/risk_limit | Update position risk limit
173175
*FuturesApi* | [**setDualMode**](docs/FuturesApi.md#setDualMode) | **POST** /futures/{settle}/dual_mode | Enable or disable dual mode
174176
*FuturesApi* | [**getDualModePosition**](docs/FuturesApi.md#getDualModePosition) | **GET** /futures/{settle}/dual_comp/positions/{contract} | Retrieve position detail in dual mode
@@ -324,6 +326,7 @@ Class | Method | HTTP request | Description
324326
*UnifiedApi* | [**getUnifiedBorrowable**](docs/UnifiedApi.md#getUnifiedBorrowable) | **GET** /unified/borrowable | Query about the maximum borrowing for the unified account
325327
*UnifiedApi* | [**getUnifiedTransferable**](docs/UnifiedApi.md#getUnifiedTransferable) | **GET** /unified/transferable | Query about the maximum transferable for the unified account
326328
*UnifiedApi* | [**getUnifiedTransferables**](docs/UnifiedApi.md#getUnifiedTransferables) | **GET** /unified/transferables | Batch query can be transferred out at most for unified accounts; each currency is the maximum value. After the user withdraws the currency, the amount of transferable currency will be changed.
329+
*UnifiedApi* | [**getUnifiedBorrowableList**](docs/UnifiedApi.md#getUnifiedBorrowableList) | **GET** /unified/batch_borrowable | Batch query unified account can be borrowed up to a maximum
327330
*UnifiedApi* | [**listUnifiedLoans**](docs/UnifiedApi.md#listUnifiedLoans) | **GET** /unified/loans | List loans
328331
*UnifiedApi* | [**createUnifiedLoan**](docs/UnifiedApi.md#createUnifiedLoan) | **POST** /unified/loans | Borrow or repay
329332
*UnifiedApi* | [**listUnifiedLoanRecords**](docs/UnifiedApi.md#listUnifiedLoanRecords) | **GET** /unified/loan_records | Get load records
@@ -428,6 +431,7 @@ Class | Method | HTTP request | Description
428431
- [DeliveryContract](docs/DeliveryContract.md)
429432
- [DeliverySettlement](docs/DeliverySettlement.md)
430433
- [DepositAddress](docs/DepositAddress.md)
434+
- [DepositRecord](docs/DepositRecord.md)
431435
- [DualGetOrders](docs/DualGetOrders.md)
432436
- [DualGetPlans](docs/DualGetPlans.md)
433437
- [Eth2RateList](docs/Eth2RateList.md)
@@ -462,6 +466,8 @@ Class | Method | HTTP request | Description
462466
- [FuturesTicker](docs/FuturesTicker.md)
463467
- [FuturesTrade](docs/FuturesTrade.md)
464468
- [IndexConstituent](docs/IndexConstituent.md)
469+
- [InlineObject](docs/InlineObject.md)
470+
- [InlineResponse200](docs/InlineResponse200.md)
465471
- [InsuranceRecord](docs/InsuranceRecord.md)
466472
- [LedgerRecord](docs/LedgerRecord.md)
467473
- [LiquidateOrder](docs/LiquidateOrder.md)
@@ -591,6 +597,7 @@ Class | Method | HTTP request | Description
591597
- [UnifiedAccount](docs/UnifiedAccount.md)
592598
- [UnifiedBalance](docs/UnifiedBalance.md)
593599
- [UnifiedBorrowable](docs/UnifiedBorrowable.md)
600+
- [UnifiedBorrowable1](docs/UnifiedBorrowable1.md)
594601
- [UnifiedCurrency](docs/UnifiedCurrency.md)
595602
- [UnifiedDiscount](docs/UnifiedDiscount.md)
596603
- [UnifiedDiscountTiers](docs/UnifiedDiscountTiers.md)

api/earnUniApi.ts

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
/* tslint:disable:no-unused-locals */
1313
import { CreateUniLend } from '../model/createUniLend';
14+
import { InlineResponse200 } from '../model/inlineResponse200';
1415
import { PatchUniLend } from '../model/patchUniLend';
1516
import { UniCurrency } from '../model/uniCurrency';
1617
import { UniCurrencyInterest } from '../model/uniCurrencyInterest';
@@ -433,4 +434,59 @@ export class EarnUniApi {
433434
const authSettings = ['apiv4'];
434435
return this.client.request<UniCurrencyInterest>(config, 'UniCurrencyInterest', authSettings);
435436
}
437+
438+
/**
439+
* Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-05-08 09:24+0000 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <[email protected]> Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0
440+
* @summary UniLoan currency annualized trend chart
441+
* @param from Start timestamp, unit s, maximum span of 30 days
442+
* @param to End timestamp, unit s, maximum span of 30 days
443+
* @param asset Currency name
444+
*/
445+
public async listUniChart(
446+
from: number,
447+
to: number,
448+
asset: string,
449+
): Promise<{ response: AxiosResponse; body: Array<InlineResponse200> }> {
450+
const localVarPath = this.client.basePath + '/earn/uni/chart';
451+
let localVarQueryParameters: any = {};
452+
let localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders);
453+
const produces = ['application/json'];
454+
// give precedence to 'application/json'
455+
if (produces.indexOf('application/json') >= 0) {
456+
localVarHeaderParams.Accept = 'application/json';
457+
} else {
458+
localVarHeaderParams.Accept = produces.join(',');
459+
}
460+
461+
// verify required parameter 'from' is not null or undefined
462+
if (from === null || from === undefined) {
463+
throw new Error('Required parameter from was null or undefined when calling listUniChart.');
464+
}
465+
466+
// verify required parameter 'to' is not null or undefined
467+
if (to === null || to === undefined) {
468+
throw new Error('Required parameter to was null or undefined when calling listUniChart.');
469+
}
470+
471+
// verify required parameter 'asset' is not null or undefined
472+
if (asset === null || asset === undefined) {
473+
throw new Error('Required parameter asset was null or undefined when calling listUniChart.');
474+
}
475+
476+
localVarQueryParameters['from'] = ObjectSerializer.serialize(from, 'number');
477+
478+
localVarQueryParameters['to'] = ObjectSerializer.serialize(to, 'number');
479+
480+
localVarQueryParameters['asset'] = ObjectSerializer.serialize(asset, 'string');
481+
482+
const config: AxiosRequestConfig = {
483+
method: 'GET',
484+
params: localVarQueryParameters,
485+
headers: localVarHeaderParams,
486+
url: localVarPath,
487+
};
488+
489+
const authSettings = ['apiv4'];
490+
return this.client.request<Array<InlineResponse200>>(config, 'Array<InlineResponse200>', authSettings);
491+
}
436492
}

api/futuresApi.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import { FuturesPremiumIndex } from '../model/futuresPremiumIndex';
3333
import { FuturesPriceTriggeredOrder } from '../model/futuresPriceTriggeredOrder';
3434
import { FuturesTicker } from '../model/futuresTicker';
3535
import { FuturesTrade } from '../model/futuresTrade';
36+
import { InlineObject } from '../model/inlineObject';
3637
import { InsuranceRecord } from '../model/insuranceRecord';
3738
import { MyFuturesTrade } from '../model/myFuturesTrade';
3839
import { MyFuturesTradeTimeRange } from '../model/myFuturesTradeTimeRange';
@@ -1143,6 +1144,53 @@ export class FuturesApi {
11431144
return this.client.request<Position>(config, 'Position', authSettings);
11441145
}
11451146

1147+
/**
1148+
*
1149+
* @summary Switch to the full position-by-store mode
1150+
* @param settle Settle currency
1151+
* @param inlineObject
1152+
*/
1153+
public async updatePositionCrossMode(
1154+
settle: 'btc' | 'usdt',
1155+
inlineObject: InlineObject,
1156+
): Promise<{ response: AxiosResponse; body: Position }> {
1157+
const localVarPath =
1158+
this.client.basePath +
1159+
'/futures/{settle}/positions/cross_mode'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle)));
1160+
let localVarQueryParameters: any = {};
1161+
let localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders);
1162+
const produces = ['application/json'];
1163+
// give precedence to 'application/json'
1164+
if (produces.indexOf('application/json') >= 0) {
1165+
localVarHeaderParams.Accept = 'application/json';
1166+
} else {
1167+
localVarHeaderParams.Accept = produces.join(',');
1168+
}
1169+
1170+
// verify required parameter 'settle' is not null or undefined
1171+
if (settle === null || settle === undefined) {
1172+
throw new Error('Required parameter settle was null or undefined when calling updatePositionCrossMode.');
1173+
}
1174+
1175+
// verify required parameter 'inlineObject' is not null or undefined
1176+
if (inlineObject === null || inlineObject === undefined) {
1177+
throw new Error(
1178+
'Required parameter inlineObject was null or undefined when calling updatePositionCrossMode.',
1179+
);
1180+
}
1181+
1182+
const config: AxiosRequestConfig = {
1183+
method: 'POST',
1184+
params: localVarQueryParameters,
1185+
headers: localVarHeaderParams,
1186+
url: localVarPath,
1187+
data: ObjectSerializer.serialize(inlineObject, 'InlineObject'),
1188+
};
1189+
1190+
const authSettings = ['apiv4'];
1191+
return this.client.request<Position>(config, 'Position', authSettings);
1192+
}
1193+
11461194
/**
11471195
*
11481196
* @summary Update position risk limit

api/spotApi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ export class SpotApi {
362362
limit?: number;
363363
from?: number;
364364
to?: number;
365-
interval?: '10s' | '1m' | '5m' | '15m' | '30m' | '1h' | '4h' | '8h' | '1d' | '7d' | '30d';
365+
interval?: '1s' | '10s' | '1m' | '5m' | '15m' | '30m' | '1h' | '4h' | '8h' | '1d' | '7d' | '30d';
366366
},
367367
): Promise<{ response: AxiosResponse; body: Array<Array<string>> }> {
368368
const localVarPath = this.client.basePath + '/spot/candlesticks';
@@ -399,7 +399,7 @@ export class SpotApi {
399399
if (opts.interval !== undefined) {
400400
localVarQueryParameters['interval'] = ObjectSerializer.serialize(
401401
opts.interval,
402-
"'10s' | '1m' | '5m' | '15m' | '30m' | '1h' | '4h' | '8h' | '1d' | '7d' | '30d'",
402+
"'1s' | '10s' | '1m' | '5m' | '15m' | '30m' | '1h' | '4h' | '8h' | '1d' | '7d' | '30d'",
403403
);
404404
}
405405

api/unifiedApi.ts

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { UniLoan } from '../model/uniLoan';
1515
import { UniLoanInterestRecord } from '../model/uniLoanInterestRecord';
1616
import { UnifiedAccount } from '../model/unifiedAccount';
1717
import { UnifiedBorrowable } from '../model/unifiedBorrowable';
18+
import { UnifiedBorrowable1 } from '../model/unifiedBorrowable1';
1819
import { UnifiedCurrency } from '../model/unifiedCurrency';
1920
import { UnifiedDiscount } from '../model/unifiedDiscount';
2021
import { UnifiedHistoryLoanRate } from '../model/unifiedHistoryLoanRate';
@@ -201,6 +202,45 @@ export class UnifiedApi {
201202
return this.client.request<Array<TransferablesResult>>(config, 'Array<TransferablesResult>', authSettings);
202203
}
203204

205+
/**
206+
*
207+
* @summary Batch query unified account can be borrowed up to a maximum
208+
* @param currencies Specify the currency names for querying in an array, separated by commas, with a maximum of 10 currencies.
209+
*/
210+
public async getUnifiedBorrowableList(
211+
currencies: Array<string>,
212+
): Promise<{ response: AxiosResponse; body: Array<UnifiedBorrowable1> }> {
213+
const localVarPath = this.client.basePath + '/unified/batch_borrowable';
214+
let localVarQueryParameters: any = {};
215+
let localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders);
216+
const produces = ['application/json'];
217+
// give precedence to 'application/json'
218+
if (produces.indexOf('application/json') >= 0) {
219+
localVarHeaderParams.Accept = 'application/json';
220+
} else {
221+
localVarHeaderParams.Accept = produces.join(',');
222+
}
223+
224+
// verify required parameter 'currencies' is not null or undefined
225+
if (currencies === null || currencies === undefined) {
226+
throw new Error(
227+
'Required parameter currencies was null or undefined when calling getUnifiedBorrowableList.',
228+
);
229+
}
230+
231+
localVarQueryParameters['currencies'] = ObjectSerializer.serialize(currencies, 'Array<string>');
232+
233+
const config: AxiosRequestConfig = {
234+
method: 'GET',
235+
params: localVarQueryParameters,
236+
headers: localVarHeaderParams,
237+
url: localVarPath,
238+
};
239+
240+
const authSettings = ['apiv4'];
241+
return this.client.request<Array<UnifiedBorrowable1>>(config, 'Array<UnifiedBorrowable1>', authSettings);
242+
}
243+
204244
/**
205245
*
206246
* @summary List loans

api/walletApi.ts

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import { ConvertSmallBalance } from '../model/convertSmallBalance';
1414
import { CurrencyChain } from '../model/currencyChain';
1515
import { DepositAddress } from '../model/depositAddress';
16-
import { LedgerRecord } from '../model/ledgerRecord';
16+
import { DepositRecord } from '../model/depositRecord';
1717
import { SavedAddress } from '../model/savedAddress';
1818
import { SmallBalance } from '../model/smallBalance';
1919
import { SmallBalanceHistory } from '../model/smallBalanceHistory';
@@ -127,13 +127,19 @@ export class WalletApi {
127127
* @summary Retrieve withdrawal records
128128
* @param opts Optional parameters
129129
* @param opts.currency Filter by currency. Return all currency records if not specified
130+
* @param opts.withdrawId The withdrawal record id starts with w, such as: w1879219868. When withdraw_id is not empty, the value querys this withdrawal record and no longer querys according to time
131+
* @param opts.assetClass The currency type of withdrawal record is empty by default. It supports users to query the withdrawal records in the main and innovation areas on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone
132+
* @param opts.withdrawOrderId User-defined order number when withdrawing. Default is empty. When not empty, the specified user-defined order number record will be queried
130133
* @param opts.from Time range beginning, default to 7 days before current time
131134
* @param opts.to Time range ending, default to current time
132135
* @param opts.limit Maximum number of records to be returned in a single list
133136
* @param opts.offset List offset, starting from 0
134137
*/
135138
public async listWithdrawals(opts: {
136139
currency?: string;
140+
withdrawId?: string;
141+
assetClass?: string;
142+
withdrawOrderId?: string;
137143
from?: number;
138144
to?: number;
139145
limit?: number;
@@ -155,6 +161,18 @@ export class WalletApi {
155161
localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string');
156162
}
157163

164+
if (opts.withdrawId !== undefined) {
165+
localVarQueryParameters['withdraw_id'] = ObjectSerializer.serialize(opts.withdrawId, 'string');
166+
}
167+
168+
if (opts.assetClass !== undefined) {
169+
localVarQueryParameters['asset_class'] = ObjectSerializer.serialize(opts.assetClass, 'string');
170+
}
171+
172+
if (opts.withdrawOrderId !== undefined) {
173+
localVarQueryParameters['withdraw_order_id'] = ObjectSerializer.serialize(opts.withdrawOrderId, 'string');
174+
}
175+
158176
if (opts.from !== undefined) {
159177
localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number');
160178
}
@@ -198,7 +216,7 @@ export class WalletApi {
198216
to?: number;
199217
limit?: number;
200218
offset?: number;
201-
}): Promise<{ response: AxiosResponse; body: Array<LedgerRecord> }> {
219+
}): Promise<{ response: AxiosResponse; body: Array<DepositRecord> }> {
202220
const localVarPath = this.client.basePath + '/wallet/deposits';
203221
let localVarQueryParameters: any = {};
204222
let localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders);
@@ -239,7 +257,7 @@ export class WalletApi {
239257
};
240258

241259
const authSettings = ['apiv4'];
242-
return this.client.request<Array<LedgerRecord>>(config, 'Array<LedgerRecord>', authSettings);
260+
return this.client.request<Array<DepositRecord>>(config, 'Array<DepositRecord>', authSettings);
243261
}
244262

245263
/**

docs/DepositRecord.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# DepositRecord
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**id** | **string** | Record ID | [optional] [readonly] [default to undefined]
8+
**txid** | **string** | Hash record of the withdrawal | [optional] [readonly] [default to undefined]
9+
**withdrawOrderId** | **string** | Client order id, up to 32 length and can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional] [default to undefined]
10+
**timestamp** | **string** | Operation time | [optional] [readonly] [default to undefined]
11+
**amount** | **string** | Currency amount | [default to undefined]
12+
**currency** | **string** | Currency name | [default to undefined]
13+
**address** | **string** | Withdrawal address. Required for withdrawals | [optional] [default to undefined]
14+
**memo** | **string** | Additional remarks with regards to the withdrawal | [optional] [default to undefined]
15+
**status** | **string** | Trading Status - REVIEW: Recharge review (compliance review) - PEND: Processing - DONE: Waiting for funds to be unlocked - INVALID: Invalid data - TRACK: Track the number of confirmations, waiting to add funds to the user (spot) - BLOCKED: Rejected Recharge - DEP_CREDITED: Recharge to account, withdrawal is not unlocked | [optional] [readonly] [default to undefined]
16+
**chain** | **string** | Name of the chain used in withdrawals | [default to undefined]
17+

0 commit comments

Comments
 (0)