Skip to content

Commit c518fdd

Browse files
author
gateio
committed
update to v6.93.0
1 parent 5137d54 commit c518fdd

20 files changed

+233
-121
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.92.5
1+
## gate-api@6.93.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.92.5
11+
- API version: 4.93.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)
@@ -128,6 +128,7 @@ Class | Method | HTTP request | Description
128128
*DeliveryApi* | [**getPriceTriggeredDeliveryOrder**](docs/DeliveryApi.md#getPriceTriggeredDeliveryOrder) | **GET** /delivery/{settle}/price_orders/{order_id} | Get a price-triggered order
129129
*DeliveryApi* | [**cancelPriceTriggeredDeliveryOrder**](docs/DeliveryApi.md#cancelPriceTriggeredDeliveryOrder) | **DELETE** /delivery/{settle}/price_orders/{order_id} | cancel a price-triggered order
130130
*EarnApi* | [**swapETH2**](docs/EarnApi.md#swapETH2) | **POST** /earn/staking/eth2/swap | ETH2 swap
131+
*EarnApi* | [**rateListETH2**](docs/EarnApi.md#rateListETH2) | **GET** /earn/staking/eth2/rate_records | ETH2 historical rate of return query
131132
*EarnApi* | [**listDualInvestmentPlans**](docs/EarnApi.md#listDualInvestmentPlans) | **GET** /earn/dual/investment_plan | Dual Investment product list
132133
*EarnApi* | [**listDualOrders**](docs/EarnApi.md#listDualOrders) | **GET** /earn/dual/orders | Dual Investment order list
133134
*EarnApi* | [**placeDualOrder**](docs/EarnApi.md#placeDualOrder) | **POST** /earn/dual/orders | Place Dual Investment order
@@ -423,6 +424,7 @@ Class | Method | HTTP request | Description
423424
- [DepositAddress](docs/DepositAddress.md)
424425
- [DualGetOrders](docs/DualGetOrders.md)
425426
- [DualGetPlans](docs/DualGetPlans.md)
427+
- [Eth2RateList](docs/Eth2RateList.md)
426428
- [Eth2Swap](docs/Eth2Swap.md)
427429
- [FlashSwapCurrencyPair](docs/FlashSwapCurrencyPair.md)
428430
- [FlashSwapOrder](docs/FlashSwapOrder.md)

api/earnApi.ts

Lines changed: 66 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
/* tslint:disable:no-unused-locals */
1313
import { DualGetOrders } from '../model/dualGetOrders';
1414
import { DualGetPlans } from '../model/dualGetPlans';
15+
import { Eth2RateList } from '../model/eth2RateList';
1516
import { Eth2Swap } from '../model/eth2Swap';
1617
import { PlaceDualInvestmentOrder } from '../model/placeDualInvestmentOrder';
1718
import { StructuredBuy } from '../model/structuredBuy';
@@ -63,11 +64,42 @@ export class EarnApi {
6364
return this.client.request<any>(config, '', authSettings);
6465
}
6566

67+
/**
68+
* Check the ETH earnings rate record for the last 31 days
69+
* @summary ETH2 historical rate of return query
70+
*/
71+
public async rateListETH2(): Promise<{ response: AxiosResponse; body: Array<Eth2RateList> }> {
72+
const localVarPath = this.client.basePath + '/earn/staking/eth2/rate_records';
73+
const localVarQueryParameters: any = {};
74+
const localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders);
75+
const produces = ['application/json'];
76+
// give precedence to 'application/json'
77+
if (produces.indexOf('application/json') >= 0) {
78+
localVarHeaderParams.Accept = 'application/json';
79+
} else {
80+
localVarHeaderParams.Accept = produces.join(',');
81+
}
82+
83+
const config: AxiosRequestConfig = {
84+
method: 'GET',
85+
params: localVarQueryParameters,
86+
headers: localVarHeaderParams,
87+
url: localVarPath,
88+
};
89+
90+
const authSettings = ['apiv4'];
91+
return this.client.request<Array<Eth2RateList>>(config, 'Array<Eth2RateList>', authSettings);
92+
}
93+
6694
/**
6795
*
6896
* @summary Dual Investment product list
97+
* @param opts Optional parameters
98+
* @param opts.planId Financial project id
6999
*/
70-
public async listDualInvestmentPlans(): Promise<{ response: AxiosResponse; body: Array<DualGetPlans> }> {
100+
public async listDualInvestmentPlans(opts: {
101+
planId?: number;
102+
}): Promise<{ response: AxiosResponse; body: Array<DualGetPlans> }> {
71103
const localVarPath = this.client.basePath + '/earn/dual/investment_plan';
72104
const localVarQueryParameters: any = {};
73105
const localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders);
@@ -79,6 +111,11 @@ export class EarnApi {
79111
localVarHeaderParams.Accept = produces.join(',');
80112
}
81113

114+
opts = opts || {};
115+
if (opts.planId !== undefined) {
116+
localVarQueryParameters['plan_id'] = ObjectSerializer.serialize(opts.planId, 'number');
117+
}
118+
82119
const config: AxiosRequestConfig = {
83120
method: 'GET',
84121
params: localVarQueryParameters,
@@ -93,8 +130,18 @@ export class EarnApi {
93130
/**
94131
*
95132
* @summary Dual Investment order list
133+
* @param opts Optional parameters
134+
* @param opts.from Start checkout time
135+
* @param opts.to End settlement time
136+
* @param opts.page Page number
137+
* @param opts.limit Maximum number of records to be returned in a single list
96138
*/
97-
public async listDualOrders(): Promise<{ response: AxiosResponse; body: Array<DualGetOrders> }> {
139+
public async listDualOrders(opts: {
140+
from?: number;
141+
to?: number;
142+
page?: number;
143+
limit?: number;
144+
}): Promise<{ response: AxiosResponse; body: Array<DualGetOrders> }> {
98145
const localVarPath = this.client.basePath + '/earn/dual/orders';
99146
const localVarQueryParameters: any = {};
100147
const localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders);
@@ -106,6 +153,23 @@ export class EarnApi {
106153
localVarHeaderParams.Accept = produces.join(',');
107154
}
108155

156+
opts = opts || {};
157+
if (opts.from !== undefined) {
158+
localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number');
159+
}
160+
161+
if (opts.to !== undefined) {
162+
localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number');
163+
}
164+
165+
if (opts.page !== undefined) {
166+
localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number');
167+
}
168+
169+
if (opts.limit !== undefined) {
170+
localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number');
171+
}
172+
109173
const config: AxiosRequestConfig = {
110174
method: 'GET',
111175
params: localVarQueryParameters,

api/spotApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export class SpotApi {
5353
}
5454

5555
/**
56-
* Currency has two forms: 1. Only currency name, e.g., BTC, USDT 2. `<currency>_<chain>`, e.g., `HT_ETH` The latter one occurs when one currency has multiple chains. Currency detail contains a `chain` field whatever the form is. To retrieve all chains of one currency, you can use use all the details which has the name of the currency or name starting with `<currency>_`.
56+
* When a currency corresponds to multiple chains, you can query the information of multiple chains through the `chains` field, such as the charging and recharge status, identification, etc. of the chain.
5757
* @summary List all currencies\' details
5858
*/
5959
public async listCurrencies(): Promise<{ response: AxiosResponse; body: Array<Currency> }> {

docs/DualGetOrders.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ Name | Type | Description | Notes
2020
**apyDisplay** | **string** | APY | [optional] [default to undefined]
2121
**apySettlement** | **string** | Settlement APY | [optional] [default to undefined]
2222
**deliveryTime** | **number** | Settlement time | [optional] [default to undefined]
23+
**text** | **string** | Custom order information | [optional] [default to undefined]
2324

docs/EarnApi.md

Lines changed: 66 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ All URIs are relative to *https://api.gateio.ws/api/v4*
55
Method | HTTP request | Description
66
------------- | ------------- | -------------
77
[**swapETH2**](EarnApi.md#swapETH2) | **POST** /earn/staking/eth2/swap | ETH2 swap
8+
[**rateListETH2**](EarnApi.md#rateListETH2) | **GET** /earn/staking/eth2/rate_records | ETH2 historical rate of return query
89
[**listDualInvestmentPlans**](EarnApi.md#listDualInvestmentPlans) | **GET** /earn/dual/investment_plan | Dual Investment product list
910
[**listDualOrders**](EarnApi.md#listDualOrders) | **GET** /earn/dual/orders | Dual Investment order list
1011
[**placeDualOrder**](EarnApi.md#placeDualOrder) | **POST** /earn/dual/orders | Place Dual Investment order
@@ -56,9 +57,50 @@ Promise<{ response: AxiosResponse; body?: any; }>
5657
- **Content-Type**: application/json
5758
- **Accept**: Not defined
5859

60+
## rateListETH2
61+
62+
> Promise<{ response: http.IncomingMessage; body: Array<Eth2RateList>; }> rateListETH2()
63+
64+
ETH2 historical rate of return query
65+
66+
Check the ETH earnings rate record for the last 31 days
67+
68+
### Example
69+
70+
```typescript
71+
const GateApi = require('gate-api');
72+
const client = new GateApi.ApiClient();
73+
// uncomment the next line to change base path
74+
// client.basePath = "https://some-other-host"
75+
// Configure Gate APIv4 key authentication:
76+
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
77+
78+
const api = new GateApi.EarnApi(client);
79+
api.rateListETH2()
80+
.then(value => console.log('API called successfully. Returned data: ', value.body),
81+
error => console.error(error));
82+
```
83+
84+
### Parameters
85+
86+
This endpoint does not need any parameter.
87+
88+
### Return type
89+
90+
Promise<{ response: AxiosResponse; body: Array<Eth2RateList>; }> [Eth2RateList](Eth2RateList.md)
91+
92+
### Authorization
93+
94+
[apiv4](../README.md#apiv4)
95+
96+
### HTTP request headers
97+
98+
- **Content-Type**: Not defined
99+
- **Accept**: application/json
100+
59101
## listDualInvestmentPlans
60102

61-
> Promise<{ response: http.IncomingMessage; body: Array<DualGetPlans>; }> listDualInvestmentPlans()
103+
> Promise<{ response: http.IncomingMessage; body: Array<DualGetPlans>; }> listDualInvestmentPlans(opts)
62104
63105
Dual Investment product list
64106

@@ -71,14 +113,20 @@ const client = new GateApi.ApiClient();
71113
// client.basePath = "https://some-other-host"
72114

73115
const api = new GateApi.EarnApi(client);
74-
api.listDualInvestmentPlans()
116+
const opts = {
117+
'planId': 1 // number | Financial project id
118+
};
119+
api.listDualInvestmentPlans(opts)
75120
.then(value => console.log('API called successfully. Returned data: ', value.body),
76121
error => console.error(error));
77122
```
78123

79124
### Parameters
80125

81-
This endpoint does not need any parameter.
126+
127+
Name | Type | Description | Notes
128+
------------- | ------------- | ------------- | -------------
129+
**planId** | **number**| Financial project id | [optional] [default to undefined]
82130

83131
### Return type
84132

@@ -95,7 +143,7 @@ No authorization required
95143

96144
## listDualOrders
97145

98-
> Promise<{ response: http.IncomingMessage; body: Array<DualGetOrders>; }> listDualOrders()
146+
> Promise<{ response: http.IncomingMessage; body: Array<DualGetOrders>; }> listDualOrders(opts)
99147
100148
Dual Investment order list
101149

@@ -110,14 +158,26 @@ const client = new GateApi.ApiClient();
110158
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
111159

112160
const api = new GateApi.EarnApi(client);
113-
api.listDualOrders()
161+
const opts = {
162+
'from': 1740727000, // number | Start checkout time
163+
'to': 1740729000, // number | End settlement time
164+
'page': 1, // number | Page number
165+
'limit': 100 // number | Maximum number of records to be returned in a single list
166+
};
167+
api.listDualOrders(opts)
114168
.then(value => console.log('API called successfully. Returned data: ', value.body),
115169
error => console.error(error));
116170
```
117171

118172
### Parameters
119173

120-
This endpoint does not need any parameter.
174+
175+
Name | Type | Description | Notes
176+
------------- | ------------- | ------------- | -------------
177+
**from** | **number**| Start checkout time | [optional] [default to undefined]
178+
**to** | **number**| End settlement time | [optional] [default to undefined]
179+
**page** | **number**| Page number | [optional] [default to 1]
180+
**limit** | **number**| Maximum number of records to be returned in a single list | [optional] [default to 100]
121181

122182
### Return type
123183

docs/Eth2RateList.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Eth2RateList
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**dateTime** | **number** | Date and Time Stamp | [optional] [default to undefined]
8+
**date** | **string** | Date | [optional] [default to undefined]
9+
**rate** | **string** | percentage | [optional] [default to undefined]
10+

docs/LedgerRecord.md

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -12,35 +12,6 @@ Name | Type | Description | Notes
1212
**currency** | **string** | Currency name | [default to undefined]
1313
**address** | **string** | Withdrawal address. Required for withdrawals | [optional] [default to undefined]
1414
**memo** | **string** | Additional remarks with regards to the withdrawal | [optional] [default to undefined]
15-
**status** | **string** | Record status. - DONE: done - CANCEL: cancelled - REQUEST: requesting - MANUAL: pending manual approval - BCODE: GateCode operation - EXTPEND: pending confirm after sending - FAIL: pending confirm when fail - INVALID: invalid order - VERIFY: verifying - PROCES: processing - PEND: pending - DMOVE: required manual approval - SPLITPEND: the order is automatically split due to large amount | [optional] [readonly] [default to undefined]
15+
**status** | **string** | Record status. - DONE: done - CANCEL: cancelled - REQUEST: requesting - MANUAL: pending manual approval - BCODE: GateCode operation - EXTPEND: pending confirm after sending - FAIL: pending confirm when fail - INVALID: invalid order - VERIFY: verifying - PROCES: processing - PEND: pending - DMOVE: required manual approval | [optional] [readonly] [default to undefined]
1616
**chain** | **string** | Name of the chain used in withdrawals | [default to undefined]
1717

18-
## Enum: LedgerRecord.Status
19-
20-
* `DONE` (value: `'DONE'`)
21-
22-
* `CANCEL` (value: `'CANCEL'`)
23-
24-
* `REQUEST` (value: `'REQUEST'`)
25-
26-
* `MANUAL` (value: `'MANUAL'`)
27-
28-
* `BCODE` (value: `'BCODE'`)
29-
30-
* `EXTPEND` (value: `'EXTPEND'`)
31-
32-
* `FAIL` (value: `'FAIL'`)
33-
34-
* `INVALID` (value: `'INVALID'`)
35-
36-
* `VERIFY` (value: `'VERIFY'`)
37-
38-
* `PROCES` (value: `'PROCES'`)
39-
40-
* `PEND` (value: `'PEND'`)
41-
42-
* `DMOVE` (value: `'DMOVE'`)
43-
44-
* `SPLITPEND` (value: `'SPLITPEND'`)
45-
46-

docs/PlaceDualInvestmentOrder.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ Name | Type | Description | Notes
88
**copies** | **string** | The number of copies is mutually exclusive with the amount field and will be deprecated soon. It is recommended to use the amount parameter. | [optional] [default to undefined]
99
**isMax** | **number** | Whether to purchase at the maximum. Mutually exclusive with the amount field. Will be deprecated soon. It is recommended to use the amount parameter. | [optional] [default to undefined]
1010
**amount** | **string** | Subscription amount, mutually exclusive with the copies field | [default to undefined]
11+
**text** | **string** | User defined information. If not empty, must follow the rules below: 1. prefixed with &#x60;t-&#x60; 2. no longer than 28 bytes without &#x60;t-&#x60; prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional] [default to undefined]
1112

docs/SpotApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Method | HTTP request | Description
4444
4545
List all currencies\&#39; details
4646

47-
Currency has two forms: 1. Only currency name, e.g., BTC, USDT 2. &#x60;&lt;currency&gt;_&lt;chain&gt;&#x60;, e.g., &#x60;HT_ETH&#x60; The latter one occurs when one currency has multiple chains. Currency detail contains a &#x60;chain&#x60; field whatever the form is. To retrieve all chains of one currency, you can use use all the details which has the name of the currency or name starting with &#x60;&lt;currency&gt;_&#x60;.
47+
When a currency corresponds to multiple chains, you can query the information of multiple chains through the &#x60;chains&#x60; field, such as the charging and recharge status, identification, etc. of the chain.
4848

4949
### Example
5050

docs/UnifiedBalance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Name | Type | Description | Notes
1818
**crossBalance** | **string** | Full margin balance is valid in single currency margin mode, and is 0 in other modes such as cross currency margin/combined margin mode | [optional] [default to undefined]
1919
**isoBalance** | **string** | Isolated margin balance is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode | [optional] [default to undefined]
2020
**im** | **string** | Full-position initial margin is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode | [optional] [default to undefined]
21-
**mm** | **string** | Full-position maintenance margin rate is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode | [optional] [default to undefined]
21+
**mm** | **string** | The full position maintains margin, which is valid in the single currency margin mode, and other cross-currency margin combination margin mode is 0. | [optional] [default to undefined]
2222
**imr** | **string** | Full-position initial margin rate is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode | [optional] [default to undefined]
2323
**mmr** | **string** | Full-position maintenance margin rate is valid in single-currency margin mode and is 0 in other modes such as cross-currency margin/combined margin mode | [optional] [default to undefined]
2424
**marginBalance** | **string** | Full margin balance is valid in single currency margin mode and is 0 in other modes such as cross currency margin/combined margin mode | [optional] [default to undefined]

0 commit comments

Comments
 (0)