All URIs are relative to https://api.gateio.ws/api/v4
| Method | HTTP request | Description |
|---|---|---|
| listUniCurrencies | GET /earn/uni/currencies | Query lending currency list |
| getUniCurrency | GET /earn/uni/currencies/{currency} | Query single lending currency details |
| listUserUniLends | GET /earn/uni/lends | Query user's lending order list |
| createUniLend | POST /earn/uni/lends | Create lending or redemption |
| changeUniLend | PATCH /earn/uni/lends | Amend user lending information |
| listUniLendRecords | GET /earn/uni/lend_records | Query lending transaction records |
| getUniInterest | GET /earn/uni/interests/{currency} | Query user's total interest income for specified currency |
| listUniInterestRecords | GET /earn/uni/interest_records | Query user dividend records |
| getUniInterestStatus | GET /earn/uni/interest_status/{currency} | Query currency interest compounding status |
| listUniChart | GET /earn/uni/chart | UniLoan currency annualized trend chart |
| listUniRate | GET /earn/uni/rate | Currency estimated annualized interest rate |
Promise<{ response: http.IncomingMessage; body: Array; }> listUniCurrencies()
Query lending currency list
const GateApi = require('gate-api');
const client = new GateApi.ApiClient();
// uncomment the next line to change base path
// client.basePath = "https://some-other-host"
const api = new GateApi.EarnUniApi(client);
api.listUniCurrencies()
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));This endpoint does not need any parameter.
Promise<{ response: AxiosResponse; body: Array; }> UniCurrency
No authorization required
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: UniCurrency; }> getUniCurrency(currency)
Query single lending currency details
const GateApi = require('gate-api');
const client = new GateApi.ApiClient();
// uncomment the next line to change base path
// client.basePath = "https://some-other-host"
const api = new GateApi.EarnUniApi(client);
const currency = "btc"; // string | Currency
api.getUniCurrency(currency)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| currency | string | Currency | [default to undefined] |
Promise<{ response: AxiosResponse; body: UniCurrency; }> UniCurrency
No authorization required
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: Array; }> listUserUniLends(opts)
Query user's lending order list
const GateApi = require('gate-api');
const client = new GateApi.ApiClient();
// uncomment the next line to change base path
// client.basePath = "https://some-other-host"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
const api = new GateApi.EarnUniApi(client);
const opts = {
'currency': "BTC", // string | Query by specified currency name
'page': 1, // number | Page number
'limit': 100 // number | Maximum number of items returned. Default: 100, minimum: 1, maximum: 100
};
api.listUserUniLends(opts)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| currency | string | Query by specified currency name | [optional] [default to undefined] |
| page | number | Page number | [optional] [default to 1] |
| limit | number | Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 | [optional] [default to 100] |
Promise<{ response: AxiosResponse; body: Array; }> UniLend
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body?: any; }> createUniLend(createUniLend)
Create lending or redemption
Lending: When lending, a minimum lending rate must be set. After successful lending is determined on an hourly basis, earnings will be calculated based on the determined rate. Earnings for each hour will be settled at the top of the hour. If lending fails due to an excessively high interest rate, no interest will be earned for that hour. If funds are redeemed before the hourly for that hour. Priority: Under the same interest rate, wealth management products created or modified earlier will be prioritized for lending. Redemption: For funds that failed to be lent, redemption will be credited immediately. For funds successfully lent, they are entitled to the earnings for that hour, and redemption will be credited in the next hourly interval. Note: The two minutes before and after the hourly mark are the settlement period, during which lending and redemption are prohibited.
const GateApi = require('gate-api');
const client = new GateApi.ApiClient();
// uncomment the next line to change base path
// client.basePath = "https://some-other-host"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
const api = new GateApi.EarnUniApi(client);
const createUniLend = new CreateUniLend(); // CreateUniLend |
api.createUniLend(createUniLend)
.then(value => console.log('API called successfully.'),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| createUniLend | CreateUniLend |
Promise<{ response: AxiosResponse; body?: any; }>
- Content-Type: application/json
- Accept: Not defined
Promise<{ response: http.IncomingMessage; body?: any; }> changeUniLend(patchUniLend)
Amend user lending information
Currently only supports amending minimum interest rate (hourly)
const GateApi = require('gate-api');
const client = new GateApi.ApiClient();
// uncomment the next line to change base path
// client.basePath = "https://some-other-host"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
const api = new GateApi.EarnUniApi(client);
const patchUniLend = new PatchUniLend(); // PatchUniLend |
api.changeUniLend(patchUniLend)
.then(value => console.log('API called successfully.'),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| patchUniLend | PatchUniLend |
Promise<{ response: AxiosResponse; body?: any; }>
- Content-Type: application/json
- Accept: Not defined
Promise<{ response: http.IncomingMessage; body: Array; }> listUniLendRecords(opts)
Query lending transaction records
const GateApi = require('gate-api');
const client = new GateApi.ApiClient();
// uncomment the next line to change base path
// client.basePath = "https://some-other-host"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
const api = new GateApi.EarnUniApi(client);
const opts = {
'currency': "BTC", // string | Query by specified currency name
'page': 1, // number | Page number
'limit': 100, // number | Maximum number of items returned. Default: 100, minimum: 1, maximum: 100
'from': 1547706332, // number | 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)
'to': 1547706332, // number | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
'type': "lend" // 'lend' | 'redeem' | Operation type: lend - Lend, redeem - Redeem
};
api.listUniLendRecords(opts)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| currency | string | Query by specified currency name | [optional] [default to undefined] |
| page | number | Page number | [optional] [default to 1] |
| limit | number | Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 | [optional] [default to 100] |
| from | number | 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) | [optional] [default to undefined] |
| to | number | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] [default to undefined] |
| type | Type | Operation type: lend - Lend, redeem - Redeem | [optional] [default to undefined] |
Promise<{ response: AxiosResponse; body: Array; }> UniLendRecord
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: UniLendInterest; }> getUniInterest(currency)
Query user's total interest income for specified currency
const GateApi = require('gate-api');
const client = new GateApi.ApiClient();
// uncomment the next line to change base path
// client.basePath = "https://some-other-host"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
const api = new GateApi.EarnUniApi(client);
const currency = "btc"; // string | Currency
api.getUniInterest(currency)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| currency | string | Currency | [default to undefined] |
Promise<{ response: AxiosResponse; body: UniLendInterest; }> UniLendInterest
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: Array; }> listUniInterestRecords(opts)
Query user dividend records
const GateApi = require('gate-api');
const client = new GateApi.ApiClient();
// uncomment the next line to change base path
// client.basePath = "https://some-other-host"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
const api = new GateApi.EarnUniApi(client);
const opts = {
'currency': "BTC", // string | Query by specified currency name
'page': 1, // number | Page number
'limit': 100, // number | Maximum number of items returned. Default: 100, minimum: 1, maximum: 100
'from': 1547706332, // number | 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)
'to': 1547706332 // number | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp
};
api.listUniInterestRecords(opts)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| currency | string | Query by specified currency name | [optional] [default to undefined] |
| page | number | Page number | [optional] [default to 1] |
| limit | number | Maximum number of items returned. Default: 100, minimum: 1, maximum: 100 | [optional] [default to 100] |
| from | number | 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) | [optional] [default to undefined] |
| to | number | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] [default to undefined] |
Promise<{ response: AxiosResponse; body: Array; }> UniInterestRecord
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: UniCurrencyInterest; }> getUniInterestStatus(currency)
Query currency interest compounding status
const GateApi = require('gate-api');
const client = new GateApi.ApiClient();
// uncomment the next line to change base path
// client.basePath = "https://some-other-host"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
const api = new GateApi.EarnUniApi(client);
const currency = "btc"; // string | Currency
api.getUniInterestStatus(currency)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| currency | string | Currency | [default to undefined] |
Promise<{ response: AxiosResponse; body: UniCurrencyInterest; }> UniCurrencyInterest
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: Array; }> listUniChart(from, to, asset)
UniLoan currency annualized trend chart
Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-17 21:35+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <L@li.org> Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0
const GateApi = require('gate-api');
const client = new GateApi.ApiClient();
// uncomment the next line to change base path
// client.basePath = "https://some-other-host"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
const api = new GateApi.EarnUniApi(client);
const from = 1719763200; // number | Start timestamp in seconds, maximum span 30 days
const to = 1722441600; // number | End timestamp in seconds, maximum span 30 days
const asset = "BTC"; // string | Currency name
api.listUniChart(from, to, asset)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| from | number | Start timestamp in seconds, maximum span 30 days | [default to undefined] |
| to | number | End timestamp in seconds, maximum span 30 days | [default to undefined] |
| asset | string | Currency name | [default to undefined] |
Promise<{ response: AxiosResponse; body: Array; }> InlineResponse200
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: Array; }> listUniRate()
Currency estimated annualized interest rate
Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-07-17 21:35+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <L@li.org> Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0
const GateApi = require('gate-api');
const client = new GateApi.ApiClient();
// uncomment the next line to change base path
// client.basePath = "https://some-other-host"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
const api = new GateApi.EarnUniApi(client);
api.listUniRate()
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));This endpoint does not need any parameter.
Promise<{ response: AxiosResponse; body: Array; }> InlineResponse2001
- Content-Type: Not defined
- Accept: application/json