Skip to content

Commit a3ac627

Browse files
author
gateio
committed
update to v6.96.0
1 parent a63630f commit a3ac627

22 files changed

+271
-172
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## gate-api@6.95.0
1+
## gate-api@6.96.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.95.0
11+
- API version: 4.96.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)
@@ -600,6 +600,7 @@ Class | Method | HTTP request | Description
600600
- [UnifiedLeverageSetting](docs/UnifiedLeverageSetting.md)
601601
- [UnifiedLoan](docs/UnifiedLoan.md)
602602
- [UnifiedLoanRecord](docs/UnifiedLoanRecord.md)
603+
- [UnifiedLoanResult](docs/UnifiedLoanResult.md)
603604
- [UnifiedMarginTiers](docs/UnifiedMarginTiers.md)
604605
- [UnifiedModeSet](docs/UnifiedModeSet.md)
605606
- [UnifiedPortfolioInput](docs/UnifiedPortfolioInput.md)

api/futuresApi.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,7 +1575,7 @@ export class FuturesApi {
15751575
public async createFuturesOrder(
15761576
settle: 'btc' | 'usdt',
15771577
futuresOrder: FuturesOrder,
1578-
opts: { xGateExptime?: number },
1578+
opts: { xGateExptime?: string },
15791579
): Promise<{ response: AxiosResponse; body: FuturesOrder }> {
15801580
const localVarPath =
15811581
this.client.basePath +
@@ -1602,7 +1602,7 @@ export class FuturesApi {
16021602

16031603
opts = opts || {};
16041604
if (opts.xGateExptime !== undefined) {
1605-
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'number');
1605+
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'string');
16061606
}
16071607

16081608
const config: AxiosRequestConfig = {
@@ -1624,12 +1624,12 @@ export class FuturesApi {
16241624
* @param contract Futures contract
16251625
* @param opts Optional parameters
16261626
* @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
1627-
* @param opts.side All bids or asks. Both included if not specified
1627+
* @param opts.side Specify all buy orders or all sell orders, if not specify them, both are included. Revoke all buy orders and revoke all sell orders and make ask
16281628
*/
16291629
public async cancelFuturesOrders(
16301630
settle: 'btc' | 'usdt',
16311631
contract: string,
1632-
opts: { xGateExptime?: number; side?: string },
1632+
opts: { xGateExptime?: string; side?: string },
16331633
): Promise<{ response: AxiosResponse; body: Array<FuturesOrder> }> {
16341634
const localVarPath =
16351635
this.client.basePath +
@@ -1662,7 +1662,7 @@ export class FuturesApi {
16621662
}
16631663

16641664
if (opts.xGateExptime !== undefined) {
1665-
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'number');
1665+
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'string');
16661666
}
16671667

16681668
const config: AxiosRequestConfig = {
@@ -1752,7 +1752,7 @@ export class FuturesApi {
17521752
public async createBatchFuturesOrder(
17531753
settle: 'btc' | 'usdt',
17541754
futuresOrder: Array<FuturesOrder>,
1755-
opts: { xGateExptime?: number },
1755+
opts: { xGateExptime?: string },
17561756
): Promise<{ response: AxiosResponse; body: Array<BatchFuturesOrder> }> {
17571757
const localVarPath =
17581758
this.client.basePath +
@@ -1781,7 +1781,7 @@ export class FuturesApi {
17811781

17821782
opts = opts || {};
17831783
if (opts.xGateExptime !== undefined) {
1784-
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'number');
1784+
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'string');
17851785
}
17861786

17871787
const config: AxiosRequestConfig = {
@@ -1855,7 +1855,7 @@ export class FuturesApi {
18551855
settle: 'btc' | 'usdt',
18561856
orderId: string,
18571857
futuresOrderAmendment: FuturesOrderAmendment,
1858-
opts: { xGateExptime?: number },
1858+
opts: { xGateExptime?: string },
18591859
): Promise<{ response: AxiosResponse; body: FuturesOrder }> {
18601860
const localVarPath =
18611861
this.client.basePath +
@@ -1891,7 +1891,7 @@ export class FuturesApi {
18911891

18921892
opts = opts || {};
18931893
if (opts.xGateExptime !== undefined) {
1894-
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'number');
1894+
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'string');
18951895
}
18961896

18971897
const config: AxiosRequestConfig = {
@@ -1917,7 +1917,7 @@ export class FuturesApi {
19171917
public async cancelFuturesOrder(
19181918
settle: 'btc' | 'usdt',
19191919
orderId: string,
1920-
opts: { xGateExptime?: number },
1920+
opts: { xGateExptime?: string },
19211921
): Promise<{ response: AxiosResponse; body: FuturesOrder }> {
19221922
const localVarPath =
19231923
this.client.basePath +
@@ -1946,7 +1946,7 @@ export class FuturesApi {
19461946

19471947
opts = opts || {};
19481948
if (opts.xGateExptime !== undefined) {
1949-
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'number');
1949+
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'string');
19501950
}
19511951

19521952
const config: AxiosRequestConfig = {
@@ -2399,7 +2399,7 @@ export class FuturesApi {
23992399
public async cancelBatchFutureOrders(
24002400
settle: 'btc' | 'usdt',
24012401
requestBody: Array<string>,
2402-
opts: { xGateExptime?: number },
2402+
opts: { xGateExptime?: string },
24032403
): Promise<{ response: AxiosResponse; body: Array<FutureCancelOrderResult> }> {
24042404
const localVarPath =
24052405
this.client.basePath +
@@ -2428,7 +2428,7 @@ export class FuturesApi {
24282428

24292429
opts = opts || {};
24302430
if (opts.xGateExptime !== undefined) {
2431-
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'number');
2431+
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'string');
24322432
}
24332433

24342434
const config: AxiosRequestConfig = {
@@ -2458,7 +2458,7 @@ export class FuturesApi {
24582458
public async amendBatchFutureOrders(
24592459
settle: 'btc' | 'usdt',
24602460
batchAmendOrderReq: Array<BatchAmendOrderReq>,
2461-
opts: { xGateExptime?: number },
2461+
opts: { xGateExptime?: string },
24622462
): Promise<{ response: AxiosResponse; body: Array<BatchFuturesOrder> }> {
24632463
const localVarPath =
24642464
this.client.basePath +
@@ -2487,7 +2487,7 @@ export class FuturesApi {
24872487

24882488
opts = opts || {};
24892489
if (opts.xGateExptime !== undefined) {
2490-
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'number');
2490+
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'string');
24912491
}
24922492

24932493
const config: AxiosRequestConfig = {

api/spotApi.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ export class SpotApi {
602602
*/
603603
public async createBatchOrders(
604604
order: Array<Order>,
605-
opts: { xGateExptime?: number },
605+
opts: { xGateExptime?: string },
606606
): Promise<{ response: AxiosResponse; body: Array<BatchOrder> }> {
607607
const localVarPath = this.client.basePath + '/spot/batch_orders';
608608
let localVarQueryParameters: any = {};
@@ -622,7 +622,7 @@ export class SpotApi {
622622

623623
opts = opts || {};
624624
if (opts.xGateExptime !== undefined) {
625-
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'number');
625+
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'string');
626626
}
627627

628628
const config: AxiosRequestConfig = {
@@ -811,7 +811,7 @@ export class SpotApi {
811811
*/
812812
public async createOrder(
813813
order: Order,
814-
opts: { xGateExptime?: number },
814+
opts: { xGateExptime?: string },
815815
): Promise<{ response: AxiosResponse; body: Order }> {
816816
const localVarPath = this.client.basePath + '/spot/orders';
817817
let localVarQueryParameters: any = {};
@@ -831,7 +831,7 @@ export class SpotApi {
831831

832832
opts = opts || {};
833833
if (opts.xGateExptime !== undefined) {
834-
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'number');
834+
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'string');
835835
}
836836

837837
const config: AxiosRequestConfig = {
@@ -861,7 +861,7 @@ export class SpotApi {
861861
side?: string;
862862
account?: string;
863863
actionMode?: string;
864-
xGateExptime?: number;
864+
xGateExptime?: string;
865865
}): Promise<{ response: AxiosResponse; body: Array<OrderCancel> }> {
866866
const localVarPath = this.client.basePath + '/spot/orders';
867867
let localVarQueryParameters: any = {};
@@ -892,7 +892,7 @@ export class SpotApi {
892892
}
893893

894894
if (opts.xGateExptime !== undefined) {
895-
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'number');
895+
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'string');
896896
}
897897

898898
const config: AxiosRequestConfig = {
@@ -915,7 +915,7 @@ export class SpotApi {
915915
*/
916916
public async cancelBatchOrders(
917917
cancelBatchOrder: Array<CancelBatchOrder>,
918-
opts: { xGateExptime?: number },
918+
opts: { xGateExptime?: string },
919919
): Promise<{ response: AxiosResponse; body: Array<CancelOrderResult> }> {
920920
const localVarPath = this.client.basePath + '/spot/cancel_batch_orders';
921921
let localVarQueryParameters: any = {};
@@ -937,7 +937,7 @@ export class SpotApi {
937937

938938
opts = opts || {};
939939
if (opts.xGateExptime !== undefined) {
940-
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'number');
940+
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'string');
941941
}
942942

943943
const config: AxiosRequestConfig = {
@@ -1019,7 +1019,7 @@ export class SpotApi {
10191019
public async cancelOrder(
10201020
orderId: string,
10211021
currencyPair: string,
1022-
opts: { account?: string; actionMode?: string; xGateExptime?: number },
1022+
opts: { account?: string; actionMode?: string; xGateExptime?: string },
10231023
): Promise<{ response: AxiosResponse; body: Order }> {
10241024
const localVarPath =
10251025
this.client.basePath +
@@ -1056,7 +1056,7 @@ export class SpotApi {
10561056
}
10571057

10581058
if (opts.xGateExptime !== undefined) {
1059-
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'number');
1059+
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'string');
10601060
}
10611061

10621062
const config: AxiosRequestConfig = {
@@ -1083,7 +1083,7 @@ export class SpotApi {
10831083
public async amendOrder(
10841084
orderId: string,
10851085
orderPatch: OrderPatch,
1086-
opts: { currencyPair?: string; account?: string; xGateExptime?: number },
1086+
opts: { currencyPair?: string; account?: string; xGateExptime?: string },
10871087
): Promise<{ response: AxiosResponse; body: Order }> {
10881088
const localVarPath =
10891089
this.client.basePath +
@@ -1118,7 +1118,7 @@ export class SpotApi {
11181118
}
11191119

11201120
if (opts.xGateExptime !== undefined) {
1121-
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'number');
1121+
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'string');
11221122
}
11231123

11241124
const config: AxiosRequestConfig = {
@@ -1279,7 +1279,7 @@ export class SpotApi {
12791279
*/
12801280
public async amendBatchOrders(
12811281
batchAmendItem: Array<BatchAmendItem>,
1282-
opts: { xGateExptime?: number },
1282+
opts: { xGateExptime?: string },
12831283
): Promise<{ response: AxiosResponse; body: Array<BatchOrder> }> {
12841284
const localVarPath = this.client.basePath + '/spot/amend_batch_orders';
12851285
let localVarQueryParameters: any = {};
@@ -1299,7 +1299,7 @@ export class SpotApi {
12991299

13001300
opts = opts || {};
13011301
if (opts.xGateExptime !== undefined) {
1302-
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'number');
1302+
localVarHeaderParams['x-gate-exptime'] = ObjectSerializer.serialize(opts.xGateExptime, 'string');
13031303
}
13041304

13051305
const config: AxiosRequestConfig = {

api/unifiedApi.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import { UnifiedLeverageConfig } from '../model/unifiedLeverageConfig';
2222
import { UnifiedLeverageSetting } from '../model/unifiedLeverageSetting';
2323
import { UnifiedLoan } from '../model/unifiedLoan';
2424
import { UnifiedLoanRecord } from '../model/unifiedLoanRecord';
25+
import { UnifiedLoanResult } from '../model/unifiedLoanResult';
2526
import { UnifiedMarginTiers } from '../model/unifiedMarginTiers';
2627
import { UnifiedModeSet } from '../model/unifiedModeSet';
2728
import { UnifiedPortfolioInput } from '../model/unifiedPortfolioInput';
@@ -259,10 +260,19 @@ export class UnifiedApi {
259260
* @summary Borrow or repay
260261
* @param unifiedLoan
261262
*/
262-
public async createUnifiedLoan(unifiedLoan: UnifiedLoan): Promise<{ response: AxiosResponse; body?: any }> {
263+
public async createUnifiedLoan(
264+
unifiedLoan: UnifiedLoan,
265+
): Promise<{ response: AxiosResponse; body: UnifiedLoanResult }> {
263266
const localVarPath = this.client.basePath + '/unified/loans';
264267
let localVarQueryParameters: any = {};
265268
let localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders);
269+
const produces = ['application/json'];
270+
// give precedence to 'application/json'
271+
if (produces.indexOf('application/json') >= 0) {
272+
localVarHeaderParams.Accept = 'application/json';
273+
} else {
274+
localVarHeaderParams.Accept = produces.join(',');
275+
}
266276

267277
// verify required parameter 'unifiedLoan' is not null or undefined
268278
if (unifiedLoan === null || unifiedLoan === undefined) {
@@ -278,7 +288,7 @@ export class UnifiedApi {
278288
};
279289

280290
const authSettings = ['apiv4'];
281-
return this.client.request<any>(config, '', authSettings);
291+
return this.client.request<UnifiedLoanResult>(config, 'UnifiedLoanResult', authSettings);
282292
}
283293

284294
/**

docs/FuturesAccount.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ Name | Type | Description | Notes
2222
**crossMaintenanceMargin** | **string** | Maintain deposit in full warehouse, suitable for new classic account margin models | [optional] [default to undefined]
2323
**crossUnrealisedPnl** | **string** | The full warehouse does not achieve profit and loss, suitable for the new classic account margin model | [optional] [default to undefined]
2424
**crossAvailable** | **string** | Full warehouse available amount, suitable for the new classic account margin model | [optional] [default to undefined]
25+
**crossMarginBalance** | **string** | Full margin balance, suitable for the new classic account margin model | [optional] [default to undefined]
26+
**crossMmr** | **string** | Maintain margin ratio for the full position, suitable for the new classic account margin model | [optional] [default to undefined]
27+
**crossImr** | **string** | The initial margin rate of the full position is suitable for the new classic account margin model | [optional] [default to undefined]
2528
**isolatedPositionMargin** | **string** | Ware -position margin, suitable for the new classic account margin model | [optional] [default to undefined]
2629
**enableNewDualMode** | **boolean** | Whether to open a new two-way position mode | [optional] [default to undefined]
2730
**marginMode** | **number** | Margin mode, 0-classic margin mode, 1-cross-currency margin mode, 2-combined margin mode | [optional] [default to undefined]

0 commit comments

Comments
 (0)