All URIs are relative to https://api.gateio.ws/api/v4
| Method | HTTP request | Description |
|---|---|---|
| listMultiCollateralOrders | GET /loan/multi_collateral/orders | Query multi-currency collateral order list |
| createMultiCollateral | POST /loan/multi_collateral/orders | Place multi-currency collateral order |
| getMultiCollateralOrderDetail | GET /loan/multi_collateral/orders/{order_id} | Query order details |
| listMultiRepayRecords | GET /loan/multi_collateral/repay | Query multi-currency collateral repayment records |
| repayMultiCollateralLoan | POST /loan/multi_collateral/repay | Multi-currency collateral repayment |
| listMultiCollateralRecords | GET /loan/multi_collateral/mortgage | Query collateral adjustment records |
| operateMultiCollateral | POST /loan/multi_collateral/mortgage | Add or withdraw collateral |
| listUserCurrencyQuota | GET /loan/multi_collateral/currency_quota | Query user's collateral and borrowing currency quota information |
| listMultiCollateralCurrencies | GET /loan/multi_collateral/currencies | Query supported borrowing and collateral currencies for multi-currency collateral |
| getMultiCollateralLtv | GET /loan/multi_collateral/ltv | Query collateralization ratio information |
| getMultiCollateralFixRate | GET /loan/multi_collateral/fixed_rate | Query currency's 7-day and 30-day fixed interest rates |
| getMultiCollateralCurrentRate | GET /loan/multi_collateral/current_rate | Query currency's current interest rate |
Promise<{ response: http.IncomingMessage; body: Array; }> listMultiCollateralOrders(opts)
Query multi-currency collateral 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.MultiCollateralLoanApi(client);
const opts = {
'page': 1, // number | Page number
'limit': 10, // number | Maximum number of records returned in a single list
'sort': "ltv_asc", // string | Sort type: `time_desc` - Created time descending (default), `ltv_asc` - Collateral ratio ascending, `ltv_desc` - Collateral ratio descending.
'orderType': "current" // string | Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified
};
api.listMultiCollateralOrders(opts)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| page | number | Page number | [optional] [default to 1] |
| limit | number | Maximum number of records returned in a single list | [optional] [default to 10] |
| sort | string | Sort type: `time_desc` - Created time descending (default), `ltv_asc` - Collateral ratio ascending, `ltv_desc` - Collateral ratio descending. | [optional] [default to undefined] |
| orderType | string | Order type: current - Query current orders, fixed - Query fixed orders, defaults to current orders if not specified | [optional] [default to undefined] |
Promise<{ response: AxiosResponse; body: Array; }> MultiCollateralOrder
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: OrderResp; }> createMultiCollateral(createMultiCollateralOrder)
Place multi-currency collateral order
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.MultiCollateralLoanApi(client);
const createMultiCollateralOrder = new CreateMultiCollateralOrder(); // CreateMultiCollateralOrder |
api.createMultiCollateral(createMultiCollateralOrder)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| createMultiCollateralOrder | CreateMultiCollateralOrder |
Promise<{ response: AxiosResponse; body: OrderResp; }> OrderResp
- Content-Type: application/json
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: MultiCollateralOrder; }> getMultiCollateralOrderDetail(orderId)
Query order 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"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
const api = new GateApi.MultiCollateralLoanApi(client);
const orderId = "12345"; // string | Order ID returned when order is successfully created
api.getMultiCollateralOrderDetail(orderId)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| orderId | string | Order ID returned when order is successfully created | [default to undefined] |
Promise<{ response: AxiosResponse; body: MultiCollateralOrder; }> MultiCollateralOrder
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: Array; }> listMultiRepayRecords(type, opts)
Query multi-currency collateral repayment 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.MultiCollateralLoanApi(client);
const type = "repay"; // string | Operation type: repay - Regular repayment, liquidate - Liquidation
const opts = {
'borrowCurrency': "USDT", // string | Borrowed currency
'page': 1, // number | Page number
'limit': 10, // number | Maximum number of records returned in a single list
'from': 1609459200, // number | Start timestamp for the query
'to': 1609459200 // number | End timestamp for the query, defaults to current time if not specified
};
api.listMultiRepayRecords(type, opts)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| type | string | Operation type: repay - Regular repayment, liquidate - Liquidation | [default to undefined] |
| borrowCurrency | string | Borrowed currency | [optional] [default to undefined] |
| page | number | Page number | [optional] [default to 1] |
| limit | number | Maximum number of records returned in a single list | [optional] [default to 10] |
| from | number | Start timestamp for the query | [optional] [default to undefined] |
| to | number | End timestamp for the query, defaults to current time if not specified | [optional] [default to undefined] |
Promise<{ response: AxiosResponse; body: Array; }> MultiRepayRecord
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: MultiRepayResp; }> repayMultiCollateralLoan(repayMultiLoan)
Multi-currency collateral repayment
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.MultiCollateralLoanApi(client);
const repayMultiLoan = new RepayMultiLoan(); // RepayMultiLoan |
api.repayMultiCollateralLoan(repayMultiLoan)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| repayMultiLoan | RepayMultiLoan |
Promise<{ response: AxiosResponse; body: MultiRepayResp; }> MultiRepayResp
- Content-Type: application/json
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: Array; }> listMultiCollateralRecords(opts)
Query collateral adjustment 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.MultiCollateralLoanApi(client);
const opts = {
'page': 1, // number | Page number
'limit': 10, // number | Maximum number of records returned in a single list
'from': 1609459200, // number | Start timestamp for the query
'to': 1609459200, // number | End timestamp for the query, defaults to current time if not specified
'collateralCurrency': "BTC" // string | Collateral currency
};
api.listMultiCollateralRecords(opts)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| page | number | Page number | [optional] [default to 1] |
| limit | number | Maximum number of records returned in a single list | [optional] [default to 10] |
| from | number | Start timestamp for the query | [optional] [default to undefined] |
| to | number | End timestamp for the query, defaults to current time if not specified | [optional] [default to undefined] |
| collateralCurrency | string | Collateral currency | [optional] [default to undefined] |
Promise<{ response: AxiosResponse; body: Array; }> MultiCollateralRecord
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: CollateralAdjustRes; }> operateMultiCollateral(collateralAdjust)
Add or withdraw collateral
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.MultiCollateralLoanApi(client);
const collateralAdjust = new CollateralAdjust(); // CollateralAdjust |
api.operateMultiCollateral(collateralAdjust)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| collateralAdjust | CollateralAdjust |
Promise<{ response: AxiosResponse; body: CollateralAdjustRes; }> CollateralAdjustRes
- Content-Type: application/json
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: Array; }> listUserCurrencyQuota(type, currency)
Query user's collateral and borrowing currency quota information
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.MultiCollateralLoanApi(client);
const type = "collateral"; // string | Currency type: collateral - Collateral currency, borrow - Borrowing currency
const currency = "BTC"; // string | When it is a collateral currency, multiple currencies can be provided separated by commas; when it is a borrowing currency, only one currency can be provided.
api.listUserCurrencyQuota(type, currency)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| type | string | Currency type: collateral - Collateral currency, borrow - Borrowing currency | [default to undefined] |
| currency | string | When it is a collateral currency, multiple currencies can be provided separated by commas; when it is a borrowing currency, only one currency can be provided. | [default to undefined] |
Promise<{ response: AxiosResponse; body: Array; }> CurrencyQuota
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: MultiCollateralCurrency; }> listMultiCollateralCurrencies()
Query supported borrowing and collateral currencies for multi-currency collateral
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.MultiCollateralLoanApi(client);
api.listMultiCollateralCurrencies()
.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: MultiCollateralCurrency; }> MultiCollateralCurrency
No authorization required
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: CollateralLtv; }> getMultiCollateralLtv()
Query collateralization ratio information
Multi-currency collateral ratio is fixed, independent of 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"
const api = new GateApi.MultiCollateralLoanApi(client);
api.getMultiCollateralLtv()
.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: CollateralLtv; }> CollateralLtv
No authorization required
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: Array; }> getMultiCollateralFixRate()
Query currency's 7-day and 30-day fixed interest rates
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.MultiCollateralLoanApi(client);
api.getMultiCollateralFixRate()
.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; }> CollateralFixRate
No authorization required
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: Array; }> getMultiCollateralCurrentRate(currencies, opts)
Query currency's current interest rate
Query currency's current interest rate for the previous hour, current interest rate updates 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"
const api = new GateApi.MultiCollateralLoanApi(client);
const currencies = [["BTC","GT"]]; // Array<string> | Specify currency name query array, separated by commas, maximum 100 items
const opts = {
'vipLevel': '0' // string | VIP level, defaults to 0 if not specified
};
api.getMultiCollateralCurrentRate(currencies, opts)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| currencies | Array<string> | Specify currency name query array, separated by commas, maximum 100 items | [default to undefined] |
| vipLevel | string | VIP level, defaults to 0 if not specified | [optional] [default to '0'] |
Promise<{ response: AxiosResponse; body: Array; }> CollateralCurrentRate
No authorization required
- Content-Type: Not defined
- Accept: application/json