Skip to content

Commit af572f0

Browse files
author
gateio
committed
update to v6.94.0
1 parent c518fdd commit af572f0

File tree

8 files changed

+180
-5
lines changed

8 files changed

+180
-5
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## gate-api@6.93.0
1+
## gate-api@6.94.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.93.0
11+
- API version: 4.94.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)
@@ -333,6 +333,7 @@ Class | Method | HTTP request | Description
333333
*UnifiedApi* | [**getUserLeverageCurrencyConfig**](docs/UnifiedApi.md#getUserLeverageCurrencyConfig) | **GET** /unified/leverage/user_currency_config | Minimum currency leverage that can be set
334334
*UnifiedApi* | [**getUserLeverageCurrencySetting**](docs/UnifiedApi.md#getUserLeverageCurrencySetting) | **GET** /unified/leverage/user_currency_setting | Get the leverage multiple of the user currency
335335
*UnifiedApi* | [**setUserLeverageCurrencySetting**](docs/UnifiedApi.md#setUserLeverageCurrencySetting) | **POST** /unified/leverage/user_currency_setting | Set the loan currency leverage
336+
*UnifiedApi* | [**listUnifiedCurrencies**](docs/UnifiedApi.md#listUnifiedCurrencies) | **GET** /unified/currencies | List of loan currencies supported by unified account
336337
*UnifiedApi* | [**getHistoryLoanRate**](docs/UnifiedApi.md#getHistoryLoanRate) | **GET** /unified/history_loan_rate | get historical lending rates
337338
*WalletApi* | [**listCurrencyChains**](docs/WalletApi.md#listCurrencyChains) | **GET** /wallet/currency_chains | List chains supported for specified currency
338339
*WalletApi* | [**getDepositAddress**](docs/WalletApi.md#getDepositAddress) | **GET** /wallet/deposit_address | Generate currency deposit address
@@ -582,6 +583,7 @@ Class | Method | HTTP request | Description
582583
- [UnifiedAccount](docs/UnifiedAccount.md)
583584
- [UnifiedBalance](docs/UnifiedBalance.md)
584585
- [UnifiedBorrowable](docs/UnifiedBorrowable.md)
586+
- [UnifiedCurrency](docs/UnifiedCurrency.md)
585587
- [UnifiedDiscount](docs/UnifiedDiscount.md)
586588
- [UnifiedDiscountTiers](docs/UnifiedDiscountTiers.md)
587589
- [UnifiedHistoryLoanRate](docs/UnifiedHistoryLoanRate.md)

api/unifiedApi.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { UniLoan } from '../model/uniLoan';
1414
import { UniLoanInterestRecord } from '../model/uniLoanInterestRecord';
1515
import { UnifiedAccount } from '../model/unifiedAccount';
1616
import { UnifiedBorrowable } from '../model/unifiedBorrowable';
17+
import { UnifiedCurrency } from '../model/unifiedCurrency';
1718
import { UnifiedDiscount } from '../model/unifiedDiscount';
1819
import { UnifiedHistoryLoanRate } from '../model/unifiedHistoryLoanRate';
1920
import { UnifiedLeverageConfig } from '../model/unifiedLeverageConfig';
@@ -676,6 +677,42 @@ export class UnifiedApi {
676677
return this.client.request<any>(config, '', authSettings);
677678
}
678679

680+
/**
681+
*
682+
* @summary List of loan currencies supported by unified account
683+
* @param opts Optional parameters
684+
* @param opts.currency Currency
685+
*/
686+
public async listUnifiedCurrencies(opts: {
687+
currency?: string;
688+
}): Promise<{ response: AxiosResponse; body: Array<UnifiedCurrency> }> {
689+
const localVarPath = this.client.basePath + '/unified/currencies';
690+
const localVarQueryParameters: any = {};
691+
const localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders);
692+
const produces = ['application/json'];
693+
// give precedence to 'application/json'
694+
if (produces.indexOf('application/json') >= 0) {
695+
localVarHeaderParams.Accept = 'application/json';
696+
} else {
697+
localVarHeaderParams.Accept = produces.join(',');
698+
}
699+
700+
opts = opts || {};
701+
if (opts.currency !== undefined) {
702+
localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string');
703+
}
704+
705+
const config: AxiosRequestConfig = {
706+
method: 'GET',
707+
params: localVarQueryParameters,
708+
headers: localVarHeaderParams,
709+
url: localVarPath,
710+
};
711+
712+
const authSettings = [];
713+
return this.client.request<Array<UnifiedCurrency>>(config, 'Array<UnifiedCurrency>', authSettings);
714+
}
715+
679716
/**
680717
*
681718
* @summary get historical lending rates

docs/UnifiedApi.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Method | HTTP request | Description
2121
[**getUserLeverageCurrencyConfig**](UnifiedApi.md#getUserLeverageCurrencyConfig) | **GET** /unified/leverage/user_currency_config | Minimum currency leverage that can be set
2222
[**getUserLeverageCurrencySetting**](UnifiedApi.md#getUserLeverageCurrencySetting) | **GET** /unified/leverage/user_currency_setting | Get the leverage multiple of the user currency
2323
[**setUserLeverageCurrencySetting**](UnifiedApi.md#setUserLeverageCurrencySetting) | **POST** /unified/leverage/user_currency_setting | Set the loan currency leverage
24+
[**listUnifiedCurrencies**](UnifiedApi.md#listUnifiedCurrencies) | **GET** /unified/currencies | List of loan currencies supported by unified account
2425
[**getHistoryLoanRate**](UnifiedApi.md#getHistoryLoanRate) | **GET** /unified/history_loan_rate | get historical lending rates
2526

2627

@@ -783,6 +784,49 @@ Promise<{ response: AxiosResponse; body?: any; }>
783784
- **Content-Type**: application/json
784785
- **Accept**: Not defined
785786

787+
## listUnifiedCurrencies
788+
789+
> Promise<{ response: http.IncomingMessage; body: Array<UnifiedCurrency>; }> listUnifiedCurrencies(opts)
790+
791+
List of loan currencies supported by unified account
792+
793+
### Example
794+
795+
```typescript
796+
const GateApi = require('gate-api');
797+
const client = new GateApi.ApiClient();
798+
// uncomment the next line to change base path
799+
// client.basePath = "https://some-other-host"
800+
801+
const api = new GateApi.UnifiedApi(client);
802+
const opts = {
803+
'currency': "BTC" // string | Currency
804+
};
805+
api.listUnifiedCurrencies(opts)
806+
.then(value => console.log('API called successfully. Returned data: ', value.body),
807+
error => console.error(error));
808+
```
809+
810+
### Parameters
811+
812+
813+
Name | Type | Description | Notes
814+
------------- | ------------- | ------------- | -------------
815+
**currency** | **string**| Currency | [optional] [default to undefined]
816+
817+
### Return type
818+
819+
Promise<{ response: AxiosResponse; body: Array<UnifiedCurrency>; }> [UnifiedCurrency](UnifiedCurrency.md)
820+
821+
### Authorization
822+
823+
No authorization required
824+
825+
### HTTP request headers
826+
827+
- **Content-Type**: Not defined
828+
- **Accept**: application/json
829+
786830
## getHistoryLoanRate
787831

788832
> Promise<{ response: http.IncomingMessage; body: UnifiedHistoryLoanRate; }> getHistoryLoanRate(currency, opts)

docs/UnifiedCurrency.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# UnifiedCurrency
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**name** | **string** | Currency name | [optional] [default to undefined]
8+
**prec** | **string** | Currency precision | [optional] [default to undefined]
9+
**minBorrowAmount** | **string** | The minimum debit limit is the unit of currency | [optional] [default to undefined]
10+
**userMaxBorrowAmount** | **string** | The minimum debit limit is the unit of currency | [optional] [default to undefined]
11+
**totalMaxBorrowAmount** | **string** | The maximum debit limit for the platform is USDT | [optional] [default to undefined]
12+
**loanStatus** | **string** | Does the lending status - &#x60;disable&#x60; : Loans are prohibited - &#x60;enable&#x60;: Support lending | [optional] [default to undefined]
13+

model/models.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ export * from './uniLoanRecord';
218218
export * from './unifiedAccount';
219219
export * from './unifiedBalance';
220220
export * from './unifiedBorrowable';
221+
export * from './unifiedCurrency';
221222
export * from './unifiedDiscount';
222223
export * from './unifiedDiscountTiers';
223224
export * from './unifiedHistoryLoanRate';
@@ -465,6 +466,7 @@ import { UniLoanRecord } from './uniLoanRecord';
465466
import { UnifiedAccount } from './unifiedAccount';
466467
import { UnifiedBalance } from './unifiedBalance';
467468
import { UnifiedBorrowable } from './unifiedBorrowable';
469+
import { UnifiedCurrency } from './unifiedCurrency';
468470
import { UnifiedDiscount } from './unifiedDiscount';
469471
import { UnifiedDiscountTiers } from './unifiedDiscountTiers';
470472
import { UnifiedHistoryLoanRate } from './unifiedHistoryLoanRate';
@@ -781,6 +783,7 @@ const typeMap: { [index: string]: any } = {
781783
UnifiedAccount: UnifiedAccount,
782784
UnifiedBalance: UnifiedBalance,
783785
UnifiedBorrowable: UnifiedBorrowable,
786+
UnifiedCurrency: UnifiedCurrency,
784787
UnifiedDiscount: UnifiedDiscount,
785788
UnifiedDiscountTiers: UnifiedDiscountTiers,
786789
UnifiedHistoryLoanRate: UnifiedHistoryLoanRate,

model/unifiedCurrency.ts

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
/**
2+
* Gate API v4
3+
* Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf.
4+
*
5+
* Contact: [email protected]
6+
*
7+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
8+
* https://openapi-generator.tech
9+
* Do not edit the class manually.
10+
*/
11+
12+
export class UnifiedCurrency {
13+
/**
14+
* Currency name
15+
*/
16+
'name'?: string;
17+
/**
18+
* Currency precision
19+
*/
20+
'prec'?: string;
21+
/**
22+
* The minimum debit limit is the unit of currency
23+
*/
24+
'minBorrowAmount'?: string;
25+
/**
26+
* The minimum debit limit is the unit of currency
27+
*/
28+
'userMaxBorrowAmount'?: string;
29+
/**
30+
* The maximum debit limit for the platform is USDT
31+
*/
32+
'totalMaxBorrowAmount'?: string;
33+
/**
34+
* Does the lending status - `disable` : Loans are prohibited - `enable`: Support lending
35+
*/
36+
'loanStatus'?: string;
37+
38+
static discriminator: string | undefined = undefined;
39+
40+
static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [
41+
{
42+
name: 'name',
43+
baseName: 'name',
44+
type: 'string',
45+
},
46+
{
47+
name: 'prec',
48+
baseName: 'prec',
49+
type: 'string',
50+
},
51+
{
52+
name: 'minBorrowAmount',
53+
baseName: 'min_borrow_amount',
54+
type: 'string',
55+
},
56+
{
57+
name: 'userMaxBorrowAmount',
58+
baseName: 'user_max_borrow_amount',
59+
type: 'string',
60+
},
61+
{
62+
name: 'totalMaxBorrowAmount',
63+
baseName: 'total_max_borrow_amount',
64+
type: 'string',
65+
},
66+
{
67+
name: 'loanStatus',
68+
baseName: 'loan_status',
69+
type: 'string',
70+
},
71+
];
72+
73+
static getAttributeTypeMap() {
74+
return UnifiedCurrency.attributeTypeMap;
75+
}
76+
}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gate-api",
3-
"version": "6.93.0",
3+
"version": "6.94.0",
44
"description": "NodeJS client for gate-api",
55
"repository": "gateio/gateapi-nodejs",
66
"main": "dist/api.js",

0 commit comments

Comments
 (0)