All URIs are relative to https://api.gateio.ws/api/v4
Method | HTTP request | Description |
---|---|---|
listMultiCollateralOrders | GET /loan/multi_collateral/orders | List Multi-Collateral Orders |
createMultiCollateral | POST /loan/multi_collateral/orders | Create Multi-Collateral Order |
getMultiCollateralOrderDetail | GET /loan/multi_collateral/orders/{order_id} | Get Multi-Collateral Order Detail |
listMultiRepayRecords | GET /loan/multi_collateral/repay | List Multi-Collateral Repay Records |
repayMultiCollateralLoan | POST /loan/multi_collateral/repay | Repay Multi-Collateral Loan |
listMultiCollateralRecords | GET /loan/multi_collateral/mortgage | Query collateral adjustment records |
operateMultiCollateral | POST /loan/multi_collateral/mortgage | Operate Multi-Collateral |
listUserCurrencyQuota | GET /loan/multi_collateral/currency_quota | List User Currency Quota |
listMultiCollateralCurrencies | GET /loan/multi_collateral/currencies | Query supported borrowing and collateral currencies in Multi-Collateral |
getMultiCollateralLtv | GET /loan/multi_collateral/ltv | Get Multi-Collateral ratio |
getMultiCollateralFixRate | GET /loan/multi_collateral/fixed_rate | Query fixed interest rates for the currency for 7 days and 30 days |
getMultiCollateralCurrentRate | GET /loan/multi_collateral/current_rate | 查询币种活期利率 |
Promise<{ response: http.IncomingMessage; body: Array; }> listMultiCollateralOrders(opts)
List Multi-Collateral Orders
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 to be returned in a single list
'sort': "ltv_asc", // string | Sort types: time_desc - default sorting by creation time in descending order, ltv_asc - ascending order of ltv, ltv_desc - descending order of ltv.
'orderType': "current" // string | Order type, current - query current orders, fixed - query fixed orders. If not specified, default to querying current orders
};
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 to be returned in a single list | [optional] [default to 10] |
sort | string | Sort types: time_desc - default sorting by creation time in descending order, ltv_asc - ascending order of ltv, ltv_desc - descending order of ltv. | [optional] [default to undefined] |
orderType | string | Order type, current - query current orders, fixed - query fixed orders. If not specified, default to querying current orders | [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)
Create Multi-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)
Get Multi-Collateral Order Detail
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 on successful order creation
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 on successful order creation | [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)
List Multi-Collateral Repay 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 to be returned in a single list
'from': 1609459200, // number | Start timestamp of the query
'to': 1609459200 // number | Time range ending, default to current time
};
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 to be returned in a single list | [optional] [default to 10] |
from | number | Start timestamp of the query | [optional] [default to undefined] |
to | number | Time range ending, default to current time | [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)
Repay Multi-Collateral Loan
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 to be returned in a single list
'from': 1609459200, // number | Start timestamp of the query
'to': 1609459200, // number | Time range ending, default to current time
'collateralCurrency': "BTC" // string | Collateral
};
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 to be returned in a single list | [optional] [default to 10] |
from | number | Start timestamp of the query | [optional] [default to undefined] |
to | number | Time range ending, default to current time | [optional] [default to undefined] |
collateralCurrency | string | Collateral | [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)
Operate Multi-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)
List User Currency Quota
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 types: collateral - collateral currency, borrow - borrowing currency.
const currency = "BTC"; // string | When specifying collateral currencies, you can use commas to separate multiple currencies; for borrowing currencies, 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 types: collateral - collateral currency, borrow - borrowing currency. | [default to undefined] |
currency | string | When specifying collateral currencies, you can use commas to separate multiple currencies; for borrowing currencies, 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 in Multi-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()
Get Multi-Collateral ratio
The Multi-Collateral ratio is fixed, irrespective of the 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 fixed interest rates for the currency for 7 days and 30 days
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)
查询币种活期利率
查询币种上一小时活期利率,活期利率每小时更新一次
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> | 指定币种名称查询数组,数组用逗号分割,最大100个
const opts = {
'vipLevel': '0' // string | vip等级,不传默认为0
};
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> | 指定币种名称查询数组,数组用逗号分割,最大100个 | [default to undefined] |
vipLevel | string | vip等级,不传默认为0 | [optional] [default to '0'] |
Promise<{ response: AxiosResponse; body: Array; }> CollateralCurrentRate
No authorization required
- Content-Type: Not defined
- Accept: application/json