Skip to content

Commit a63630f

Browse files
author
gateio
committed
update to v6.95.0
1 parent ed1ee40 commit a63630f

Some content is hidden

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

42 files changed

+2180
-1395
lines changed

.eslintrc.js

-44
This file was deleted.

README.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## gate-api@6.94.2
1+
## gate-api@6.95.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.94.2
11+
- API version: 4.95.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)
@@ -216,6 +216,10 @@ Class | Method | HTTP request | Description
216216
*MarginApi* | [**getCrossMarginTransferable**](docs/MarginApi.md#getCrossMarginTransferable) | **GET** /margin/cross/transferable | Get the max transferable amount for a specific cross margin currency. (deprecated)
217217
*MarginApi* | [**getCrossMarginEstimateRate**](docs/MarginApi.md#getCrossMarginEstimateRate) | **GET** /margin/cross/estimate_rate | Estimated interest rates. (deprecated)
218218
*MarginApi* | [**getCrossMarginBorrowable**](docs/MarginApi.md#getCrossMarginBorrowable) | **GET** /margin/cross/borrowable | Get the max borrowable amount for a specific cross margin currency. (deprecated)
219+
*MarginApi* | [**getUserMarginTier**](docs/MarginApi.md#getUserMarginTier) | **GET** /margin/user/loan_margin_tiers | Check the user\'s own leverage lending gradient in the current market
220+
*MarginApi* | [**getMarketMarginTier**](docs/MarginApi.md#getMarketMarginTier) | **GET** /margin/loan_margin_tiers | Query the current market leverage lending gradient
221+
*MarginApi* | [**setUserMarketLeverage**](docs/MarginApi.md#setUserMarketLeverage) | **POST** /margin/leverage/user_market_setting | Set the user market leverage multiple
222+
*MarginApi* | [**listMarginUserAccount**](docs/MarginApi.md#listMarginUserAccount) | **GET** /margin/user/account | Query the user\'s leverage account list
219223
*MarginUniApi* | [**listUniCurrencyPairs**](docs/MarginUniApi.md#listUniCurrencyPairs) | **GET** /margin/uni/currency_pairs | List lending markets
220224
*MarginUniApi* | [**getUniCurrencyPair**](docs/MarginUniApi.md#getUniCurrencyPair) | **GET** /margin/uni/currency_pairs/{currency_pair} | Get detail of lending market
221225
*MarginUniApi* | [**getMarginUniEstimateRate**](docs/MarginUniApi.md#getMarginUniEstimateRate) | **GET** /margin/uni/estimate_rate | Estimate interest Rate
@@ -319,6 +323,7 @@ Class | Method | HTTP request | Description
319323
*UnifiedApi* | [**listUnifiedAccounts**](docs/UnifiedApi.md#listUnifiedAccounts) | **GET** /unified/accounts | Get unified account information
320324
*UnifiedApi* | [**getUnifiedBorrowable**](docs/UnifiedApi.md#getUnifiedBorrowable) | **GET** /unified/borrowable | Query about the maximum borrowing for the unified account
321325
*UnifiedApi* | [**getUnifiedTransferable**](docs/UnifiedApi.md#getUnifiedTransferable) | **GET** /unified/transferable | Query about the maximum transferable for the unified account
326+
*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.
322327
*UnifiedApi* | [**listUnifiedLoans**](docs/UnifiedApi.md#listUnifiedLoans) | **GET** /unified/loans | List loans
323328
*UnifiedApi* | [**createUnifiedLoan**](docs/UnifiedApi.md#createUnifiedLoan) | **POST** /unified/loans | Borrow or repay
324329
*UnifiedApi* | [**listUnifiedLoanRecords**](docs/UnifiedApi.md#listUnifiedLoanRecords) | **GET** /unified/loan_records | Get load records
@@ -463,6 +468,8 @@ Class | Method | HTTP request | Description
463468
- [MarginAccount](docs/MarginAccount.md)
464469
- [MarginAccountBook](docs/MarginAccountBook.md)
465470
- [MarginAccountCurrency](docs/MarginAccountCurrency.md)
471+
- [MarginLeverageTier](docs/MarginLeverageTier.md)
472+
- [MarginMarketLeverage](docs/MarginMarketLeverage.md)
466473
- [MarginTiers](docs/MarginTiers.md)
467474
- [MarginTransferable](docs/MarginTransferable.md)
468475
- [MaxUniBorrowable](docs/MaxUniBorrowable.md)
@@ -564,6 +571,7 @@ Class | Method | HTTP request | Description
564571
- [TransactionID](docs/TransactionID.md)
565572
- [Transfer](docs/Transfer.md)
566573
- [TransferOrderStatus](docs/TransferOrderStatus.md)
574+
- [TransferablesResult](docs/TransferablesResult.md)
567575
- [TriggerOrderResponse](docs/TriggerOrderResponse.md)
568576
- [TriggerTime](docs/TriggerTime.md)
569577
- [UidPushOrder](docs/UidPushOrder.md)

api/accountApi.ts

+18-18
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ export class AccountApi {
4040
*/
4141
public async getAccountDetail(): Promise<{ response: AxiosResponse; body: AccountDetail }> {
4242
const localVarPath = this.client.basePath + '/account/detail';
43-
const localVarQueryParameters: any = {};
44-
const localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders);
43+
let localVarQueryParameters: any = {};
44+
let localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders);
4545
const produces = ['application/json'];
4646
// give precedence to 'application/json'
4747
if (produces.indexOf('application/json') >= 0) {
@@ -67,8 +67,8 @@ export class AccountApi {
6767
*/
6868
public async getAccountRateLimit(): Promise<{ response: AxiosResponse; body: Array<AccountRateLimit> }> {
6969
const localVarPath = this.client.basePath + '/account/rate_limit';
70-
const localVarQueryParameters: any = {};
71-
const localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders);
70+
let localVarQueryParameters: any = {};
71+
let localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders);
7272
const produces = ['application/json'];
7373
// give precedence to 'application/json'
7474
if (produces.indexOf('application/json') >= 0) {
@@ -96,8 +96,8 @@ export class AccountApi {
9696
*/
9797
public async listSTPGroups(opts: { name?: string }): Promise<{ response: AxiosResponse; body: Array<StpGroup> }> {
9898
const localVarPath = this.client.basePath + '/account/stp_groups';
99-
const localVarQueryParameters: any = {};
100-
const localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders);
99+
let localVarQueryParameters: any = {};
100+
let localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders);
101101
const produces = ['application/json'];
102102
// give precedence to 'application/json'
103103
if (produces.indexOf('application/json') >= 0) {
@@ -129,8 +129,8 @@ export class AccountApi {
129129
*/
130130
public async createSTPGroup(stpGroup: StpGroup): Promise<{ response: AxiosResponse; body: StpGroup }> {
131131
const localVarPath = this.client.basePath + '/account/stp_groups';
132-
const localVarQueryParameters: any = {};
133-
const localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders);
132+
let localVarQueryParameters: any = {};
133+
let localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders);
134134
const produces = ['application/json'];
135135
// give precedence to 'application/json'
136136
if (produces.indexOf('application/json') >= 0) {
@@ -165,8 +165,8 @@ export class AccountApi {
165165
const localVarPath =
166166
this.client.basePath +
167167
'/account/stp_groups/{stp_id}/users'.replace('{' + 'stp_id' + '}', encodeURIComponent(String(stpId)));
168-
const localVarQueryParameters: any = {};
169-
const localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders);
168+
let localVarQueryParameters: any = {};
169+
let localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders);
170170
const produces = ['application/json'];
171171
// give precedence to 'application/json'
172172
if (produces.indexOf('application/json') >= 0) {
@@ -204,8 +204,8 @@ export class AccountApi {
204204
const localVarPath =
205205
this.client.basePath +
206206
'/account/stp_groups/{stp_id}/users'.replace('{' + 'stp_id' + '}', encodeURIComponent(String(stpId)));
207-
const localVarQueryParameters: any = {};
208-
const localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders);
207+
let localVarQueryParameters: any = {};
208+
let localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders);
209209
const produces = ['application/json'];
210210
// give precedence to 'application/json'
211211
if (produces.indexOf('application/json') >= 0) {
@@ -249,8 +249,8 @@ export class AccountApi {
249249
const localVarPath =
250250
this.client.basePath +
251251
'/account/stp_groups/{stp_id}/users'.replace('{' + 'stp_id' + '}', encodeURIComponent(String(stpId)));
252-
const localVarQueryParameters: any = {};
253-
const localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders);
252+
let localVarQueryParameters: any = {};
253+
let localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders);
254254
const produces = ['application/json'];
255255
// give precedence to 'application/json'
256256
if (produces.indexOf('application/json') >= 0) {
@@ -288,8 +288,8 @@ export class AccountApi {
288288
*/
289289
public async getDebitFee(): Promise<{ response: AxiosResponse; body: DebitFee }> {
290290
const localVarPath = this.client.basePath + '/account/debit_fee';
291-
const localVarQueryParameters: any = {};
292-
const localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders);
291+
let localVarQueryParameters: any = {};
292+
let localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders);
293293
const produces = ['application/json'];
294294
// give precedence to 'application/json'
295295
if (produces.indexOf('application/json') >= 0) {
@@ -316,8 +316,8 @@ export class AccountApi {
316316
*/
317317
public async setDebitFee(debitFee: DebitFee): Promise<{ response: AxiosResponse; body?: any }> {
318318
const localVarPath = this.client.basePath + '/account/debit_fee';
319-
const localVarQueryParameters: any = {};
320-
const localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders);
319+
let localVarQueryParameters: any = {};
320+
let localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders);
321321

322322
// verify required parameter 'debitFee' is not null or undefined
323323
if (debitFee === null || debitFee === undefined) {

api/apiClient.ts

+8-5
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,17 @@ import JSONBig from 'json-bigint';
1717
import globalAxios, { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
1818

1919
export class ApiClient {
20-
protected _basePath = 'https://api.gateio.ws/api/v4';
20+
protected _basePath: string = 'https://api.gateio.ws/api/v4';
2121
protected _defaultHeaders: any = {};
2222

2323
protected authentications: { [key: string]: Authentication } = {
2424
apiv4: new GateApiV4Auth(),
2525
};
2626

27-
constructor(basePath?: string, protected axiosInstance: AxiosInstance = globalAxios) {
27+
constructor(
28+
basePath?: string,
29+
protected axiosInstance: AxiosInstance = globalAxios,
30+
) {
2831
this._basePath = basePath || this._basePath;
2932

3033
this.axiosInstance.defaults.transformResponse = [
@@ -56,14 +59,14 @@ export class ApiClient {
5659
}
5760

5861
public setApiKeySecret(key: string, secret: string) {
59-
const auth = this.authentications['apiv4'] as GateApiV4Auth;
62+
let auth = this.authentications['apiv4'] as GateApiV4Auth;
6063
auth.key = key;
6164
auth.secret = secret;
6265
}
6366

6467
public applyToRequest(config: AxiosRequestConfig, authSettings: Array<string>): AxiosRequestConfig {
65-
for (const auth of authSettings) {
66-
const authenticator = this.authentications[auth];
68+
for (let auth of authSettings) {
69+
let authenticator = this.authentications[auth];
6770
if (authenticator) {
6871
config = authenticator.applyToRequest(config);
6972
}

0 commit comments

Comments
 (0)