Skip to content

Commit adc07af

Browse files
author
gateio
committed
update to v7.1.7
1 parent bc2a0ff commit adc07af

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+345
-189
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## gate-api@6.104.3
1+
## gate-api@7.1.7
22

33
TypeScript NodeJS client for gate-api.
44

@@ -7,7 +7,7 @@ APIv4 provides operations related to spot, margin, and contract trading, includi
77

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

10-
- API version: v4.104.3
10+
- API version: v4.105.7
1111
- Package version:
1212
- Build package: org.openapitools.codegen.languages.TypeScriptNodeClientCodegen
1313
For more information, please visit [https://www.gate.com/page/contacts](https://www.gate.com/page/contacts)
@@ -327,7 +327,7 @@ Class | Method | HTTP request | Description
327327
*UnifiedApi* | [**getUnifiedMode**](docs/UnifiedApi.md#getUnifiedMode) | **GET** /unified/unified_mode | Query mode of the unified account
328328
*UnifiedApi* | [**setUnifiedMode**](docs/UnifiedApi.md#setUnifiedMode) | **PUT** /unified/unified_mode | Set unified account mode
329329
*UnifiedApi* | [**getUnifiedEstimateRate**](docs/UnifiedApi.md#getUnifiedEstimateRate) | **GET** /unified/estimate_rate | Query unified account estimated interest rate
330-
*UnifiedApi* | [**listCurrencyDiscountTiers**](docs/UnifiedApi.md#listCurrencyDiscountTiers) | **GET** /unified/currency_discount_tiers | Query unified account tiered discount
330+
*UnifiedApi* | [**listCurrencyDiscountTiers**](docs/UnifiedApi.md#listCurrencyDiscountTiers) | **GET** /unified/currency_discount_tiers | Query unified account tiered
331331
*UnifiedApi* | [**listLoanMarginTiers**](docs/UnifiedApi.md#listLoanMarginTiers) | **GET** /unified/loan_margin_tiers | Query unified account tiered loan margin
332332
*UnifiedApi* | [**calculatePortfolioMargin**](docs/UnifiedApi.md#calculatePortfolioMargin) | **POST** /unified/portfolio_calculator | Portfolio margin calculator
333333
*UnifiedApi* | [**getUserLeverageCurrencyConfig**](docs/UnifiedApi.md#getUserLeverageCurrencyConfig) | **GET** /unified/leverage/user_currency_config | Maximum and minimum currency leverage that can be set

api/deliveryApi.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ export class DeliveryApi {
200200
* @param contract Futures contract
201201
* @param opts Optional parameters
202202
* @param opts.limit Maximum number of records returned in a single list
203-
* @param opts.lastId 以上个列表的最后一条记录的 ID 作为下个列表的起点。 该字段不再继续支持,新的请求请使用 `from` 和 `to` 字段来限定时间范围
203+
* @param opts.lastId Use the ID of the last record in the previous list as the starting point for the next list.This field is no longer supported. For new requests, please use the fromand tofields to specify the time rang
204204
* @param opts.from Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned.
205205
* @param opts.to Specify end time in Unix seconds, default to current time.
206206
*/
@@ -271,7 +271,7 @@ export class DeliveryApi {
271271
* @param opts.from Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified
272272
* @param opts.to Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision
273273
* @param opts.limit Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected.
274-
* @param opts.interval Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeTime interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial timeweek, 7d time is aligned with Unix initial time
274+
* @param opts.interval Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial time
275275
*/
276276
public async listDeliveryCandlesticks(
277277
settle: 'usdt',
@@ -490,7 +490,7 @@ export class DeliveryApi {
490490
* @param opts.limit Maximum number of records returned in a single list
491491
* @param opts.from Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
492492
* @param opts.to Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
493-
* @param opts.type Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate
493+
* @param opts.type Change types: - dnw: Deposit and withdrawal - pnl: Profit and loss from position reduction - fee: Trading fees - refr: Referrer rebates - fund: Funding fees - point_dnw: Point card deposit and withdrawal - point_fee: Point card trading fees - point_refr: Point card referrer rebates
494494
*/
495495
public async listDeliveryAccountBook(
496496
settle: 'usdt',
@@ -823,7 +823,7 @@ export class DeliveryApi {
823823
* @param opts.contract Futures contract
824824
* @param opts.limit Maximum number of records returned in a single list
825825
* @param opts.offset List offset, starting from 0
826-
* @param opts.lastId Specify the currency name to query in batches, and support up to 100 pass parameters at a time
826+
* @param opts.lastId Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used
827827
* @param opts.countTotal Whether to return total number matched, defaults to 0 (no return)
828828
*/
829829
public async listDeliveryOrders(
@@ -1088,7 +1088,7 @@ export class DeliveryApi {
10881088
* @param opts.order Futures order ID, return related data only if specified
10891089
* @param opts.limit Maximum number of records returned in a single list
10901090
* @param opts.offset List offset, starting from 0
1091-
* @param opts.lastId Specify the currency name to query in batches, and support up to 100 pass parameters at a time
1091+
* @param opts.lastId Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used
10921092
* @param opts.countTotal Whether to return total number matched, defaults to 0 (no return)
10931093
*/
10941094
public async getMyDeliveryTrades(
@@ -1317,7 +1317,7 @@ export class DeliveryApi {
13171317
}
13181318

13191319
/**
1320-
* When the \'contract\' parameter is not passed, the default is to query the risk limits for the top 100 markets.\'Limit\' and \'offset\' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect empty.
1320+
* When the \'contract\' parameter is not passed, the default is to query the risk limits for the top 100 markets. \'Limit\' and \'offset\' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the contract parameter is empty.
13211321
* @summary Query risk limit tiers
13221322
* @param settle Settle currency
13231323
* @param opts Optional parameters

api/earnApi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ export class EarnApi {
362362
* @summary Staking coins
363363
* @param findCoin
364364
*/
365-
public async findCoin(findCoin: FindCoin): Promise<{ response: AxiosResponse; body: Array<string> }> {
365+
public async findCoin(findCoin: FindCoin): Promise<{ response: AxiosResponse; body: object }> {
366366
const localVarPath = this.client.basePath + '/earn/staking/coins';
367367
let localVarQueryParameters: any = {};
368368
let localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders);
@@ -388,7 +388,7 @@ export class EarnApi {
388388
};
389389

390390
const authSettings = ['apiv4'];
391-
return this.client.request<Array<string>>(config, 'Array<string>', authSettings);
391+
return this.client.request<object>(config, 'object', authSettings);
392392
}
393393

394394
/**

api/futuresApi.ts

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ export class FuturesApi {
306306
* @param opts.to Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision
307307
* @param opts.limit Maximum number of recent data points to return. &#x60;limit&#x60; conflicts with &#x60;from&#x60; and &#x60;to&#x60;. If either &#x60;from&#x60; or &#x60;to&#x60; is specified, request will be rejected.
308308
* @param opts.interval Interval time between data points. Note that &#x60;1w&#x60; means natural week(Mon-Sun), while &#x60;7d&#x60; means every 7d since unix 0. 30d represents a natural month, not 30 days
309+
* @param opts.timezone Time zone: all/utc0/utc8, default utc0
309310
*/
310311
public async listFuturesCandlesticks(
311312
settle: 'btc' | 'usdt',
@@ -315,6 +316,7 @@ export class FuturesApi {
315316
to?: number;
316317
limit?: number;
317318
interval?: '10s' | '1m' | '5m' | '15m' | '30m' | '1h' | '4h' | '8h' | '1d' | '7d';
319+
timezone?: string;
318320
},
319321
): Promise<{ response: AxiosResponse; body: Array<FuturesCandlestick> }> {
320322
const localVarPath =
@@ -362,6 +364,10 @@ export class FuturesApi {
362364
);
363365
}
364366

367+
if (opts.timezone !== undefined) {
368+
localVarQueryParameters['timezone'] = ObjectSerializer.serialize(opts.timezone, 'string');
369+
}
370+
365371
const config: AxiosRequestConfig = {
366372
method: 'GET',
367373
params: localVarQueryParameters,
@@ -719,7 +725,7 @@ export class FuturesApi {
719725
}
720726

721727
/**
722-
* The time interval between from and to is maximum 3600. Some private fields are not returned by public interfaces, refer to field descriptions for detailsThe time interval between from and to is maximum 3600. Some private fields are not returned by public interfaces, refer to field descriptions for interfaces, refer to field descriptions for details
728+
* The time interval between from and to is maximum 3600. Some private fields are not returned by public interfaces, refer to field descriptions for details
723729
* @summary Query liquidation order history
724730
* @param settle Settle currency
725731
* @param opts Optional parameters
@@ -779,7 +785,7 @@ export class FuturesApi {
779785
}
780786

781787
/**
782-
* When the \'contract\' parameter is not passed, the default is to query the risk limits for the top 100 markets.\'Limit\' and \'offset\' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect empty.
788+
* When the \'contract\' parameter is not passed, the default is to query the risk limits for the top 100 markets. \'Limit\' and \'offset\' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the contract parameter is empty.
783789
* @summary Query risk limit tiers
784790
* @param settle Settle currency
785791
* @param opts Optional parameters
@@ -880,7 +886,7 @@ export class FuturesApi {
880886
* @param opts.offset List offset, starting from 0
881887
* @param opts.from Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit)
882888
* @param opts.to Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
883-
* @param opts.type Changing Type: - dnw: Deposit &amp; Withdraw - pnl: Profit &amp; Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: point_fee: POINT Trading fee - point_refr: POINT Referrer rebate - bonus_offset: bouns deduction
889+
* @param opts.type Change types: - dnw: Deposit and withdrawal - pnl: Profit and loss from position reduction - fee: Trading fees - refr: Referrer rebates - fund: Funding fees - point_dnw: Point card deposit and withdrawal - point_fee: Point card trading fees - point_refr: Point card referrer rebates - bonus_offset: Trial fund deduction
884890
*/
885891
public async listFuturesAccountBook(
886892
settle: 'btc' | 'usdt',
@@ -1104,12 +1110,13 @@ export class FuturesApi {
11041110
* @param leverage New position leverage
11051111
* @param opts Optional parameters
11061112
* @param opts.crossLeverageLimit Cross margin leverage (valid only when &#x60;leverage&#x60; is 0)
1113+
* @param opts.pid Product ID
11071114
*/
11081115
public async updatePositionLeverage(
11091116
settle: 'btc' | 'usdt',
11101117
contract: string,
11111118
leverage: string,
1112-
opts: { crossLeverageLimit?: string },
1119+
opts: { crossLeverageLimit?: string; pid?: number },
11131120
): Promise<{ response: AxiosResponse; body: Position }> {
11141121
const localVarPath =
11151122
this.client.basePath +
@@ -1151,6 +1158,10 @@ export class FuturesApi {
11511158
);
11521159
}
11531160

1161+
if (opts.pid !== undefined) {
1162+
localVarQueryParameters['pid'] = ObjectSerializer.serialize(opts.pid, 'number');
1163+
}
1164+
11541165
const config: AxiosRequestConfig = {
11551166
method: 'POST',
11561167
params: localVarQueryParameters,
@@ -1622,7 +1633,7 @@ export class FuturesApi {
16221633
* @param opts.contract Futures contract, return related data only if specified
16231634
* @param opts.limit Maximum number of records returned in a single list
16241635
* @param opts.offset List offset, starting from 0
1625-
* @param opts.lastId Specify the currency name to query in batches, and support up to 100 pass parameters at a time
1636+
* @param opts.lastId Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used
16261637
*/
16271638
public async listFuturesOrders(
16281639
settle: 'btc' | 'usdt',
@@ -1742,12 +1753,14 @@ export class FuturesApi {
17421753
* @param contract Futures contract
17431754
* @param opts Optional parameters
17441755
* @param opts.xGateExptime Specify the expiration time (milliseconds); if the GATE receives the request time greater than the expiration time, the request will be rejected
1745-
* @param opts.side Specify all buy orders or all sell orders, both are included if not specified. Set to bid, set to ask to cancel all sell ordersspecified. Set to bid, set to ask to cancel all sell ordersspecified. Set to bid, set to ask to cancel all sell orders
1756+
* @param opts.side Specify all buy orders or all sell orders, both are included if not specified. Set to bid to cancel all buy orders, set to ask to cancel all sell orders
1757+
* @param opts.excludeReduceOnly Whether to exclude reduce-only orders
1758+
* @param opts.text Remark for order cancellation
17461759
*/
17471760
public async cancelFuturesOrders(
17481761
settle: 'btc' | 'usdt',
17491762
contract: string,
1750-
opts: { xGateExptime?: string; side?: string },
1763+
opts: { xGateExptime?: string; side?: string; excludeReduceOnly?: boolean; text?: string },
17511764
): Promise<{ response: AxiosResponse; body: Array<FuturesOrder> }> {
17521765
const localVarPath =
17531766
this.client.basePath +
@@ -1779,6 +1792,17 @@ export class FuturesApi {
17791792
localVarQueryParameters['side'] = ObjectSerializer.serialize(opts.side, 'string');
17801793
}
17811794

1795+
if (opts.excludeReduceOnly !== undefined) {
1796+
localVarQueryParameters['exclude_reduce_only'] = ObjectSerializer.serialize(
1797+
opts.excludeReduceOnly,
1798+
'boolean',
1799+
);
1800+
}
1801+
1802+
if (opts.text !== undefined) {
1803+
localVarQueryParameters['text'] = ObjectSerializer.serialize(opts.text, 'string');
1804+
}
1805+
17821806
if (opts.xGateExptime !== undefined) {
17831807
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'string');
17841808
}

api/multiCollateralLoanApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class MultiCollateralLoanApi {
5050
* @param opts.page Page number
5151
* @param opts.limit Maximum number of records returned in a single list
5252
* @param opts.sort Sort type: &#x60;time_desc&#x60; - Created time descending (default), &#x60;ltv_asc&#x60; - Collateral ratio ascending, &#x60;ltv_desc&#x60; - Collateral ratio descending.
53-
* @param opts.orderType Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specifiedOrder type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified
53+
* @param opts.orderType Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified
5454
*/
5555
public async listMultiCollateralOrders(opts: {
5656
page?: number;

api/rebateApi.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ export class RebateApi {
113113
* @summary Broker obtains rebate history of recommended users
114114
* @param opts Optional parameters
115115
* @param opts.currency Specify the currency. If not specified, returns all currencies
116+
* @param opts.commissionType Rebate type: 1 - Direct rebate, 2 - Indirect rebate, 3 - Self rebate
116117
* @param opts.userId User ID. If not specified, all user records will be returned
117118
* @param opts.from Start time for querying records, defaults to 7 days before current time if not specified
118119
* @param opts.to End timestamp for the query, defaults to current time if not specified
@@ -121,6 +122,7 @@ export class RebateApi {
121122
*/
122123
public async agencyCommissionsHistory(opts: {
123124
currency?: string;
125+
commissionType?: number;
124126
userId?: number;
125127
from?: number;
126128
to?: number;
@@ -143,6 +145,10 @@ export class RebateApi {
143145
localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string');
144146
}
145147

148+
if (opts.commissionType !== undefined) {
149+
localVarQueryParameters['commission_type'] = ObjectSerializer.serialize(opts.commissionType, 'number');
150+
}
151+
146152
if (opts.userId !== undefined) {
147153
localVarQueryParameters['user_id'] = ObjectSerializer.serialize(opts.userId, 'number');
148154
}

api/spotApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ export class SpotApi {
282282
* @param currencyPair Currency pair
283283
* @param opts Optional parameters
284284
* @param opts.limit Maximum number of items returned in list. Default: 100, minimum: 1, maximum: 1000
285-
* @param opts.lastId Specify the currency name to query in batches, and support up to 100 pass parameters at a time
285+
* @param opts.lastId Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used
286286
* @param opts.reverse Whether to retrieve data less than &#x60;last_id&#x60;. Default returns records greater than &#x60;last_id&#x60;. Set to &#x60;true&#x60; to trace back market trade records, &#x60;false&#x60; to get latest trades. No effect when &#x60;last_id&#x60; is not set.
287287
* @param opts.from Start timestamp for the query
288288
* @param opts.to End timestamp for the query, defaults to current time if not specified

api/unifiedApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ export class UnifiedApi {
573573

574574
/**
575575
*
576-
* @summary Query unified account tiered discount
576+
* @summary Query unified account tiered
577577
*/
578578
public async listCurrencyDiscountTiers(): Promise<{ response: AxiosResponse; body: Array<UnifiedDiscount> }> {
579579
const localVarPath = this.client.basePath + '/unified/currency_discount_tiers';

0 commit comments

Comments
 (0)