All URIs are relative to https://api.gateio.ws/api/v4
Method | HTTP request | Description |
---|---|---|
swapETH2 | POST /earn/staking/eth2/swap | ETH2 swap |
listDualInvestmentPlans | GET /earn/dual/investment_plan | Dual Investment product list |
listDualOrders | GET /earn/dual/orders | Dual Investment order list |
placeDualOrder | POST /earn/dual/orders | Place Dual Investment order |
listStructuredProducts | GET /earn/structured/products | Structured Product List |
listStructuredOrders | GET /earn/structured/orders | Structured Product Order List |
placeStructuredOrder | POST /earn/structured/orders | Place Structured Product Order |
Promise<{ response: http.IncomingMessage; body?: any; }> swapETH2(eth2Swap)
ETH2 swap
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.EarnApi(client);
const eth2Swap = new Eth2Swap(); // Eth2Swap |
api.swapETH2(eth2Swap)
.then(value => console.log('API called successfully.'),
error => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
eth2Swap | Eth2Swap |
Promise<{ response: AxiosResponse; body?: any; }>
- Content-Type: application/json
- Accept: Not defined
Promise<{ response: http.IncomingMessage; body: Array; }> listDualInvestmentPlans()
Dual Investment product 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.EarnApi(client);
api.listDualInvestmentPlans()
.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; }> DualGetPlans
No authorization required
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: Array; }> listDualOrders()
Dual Investment 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.EarnApi(client);
api.listDualOrders()
.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; }> DualGetOrders
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body?: any; }> placeDualOrder(placeDualInvestmentOrder)
Place Dual Investment 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.EarnApi(client);
const placeDualInvestmentOrder = new PlaceDualInvestmentOrder(); // PlaceDualInvestmentOrder |
api.placeDualOrder(placeDualInvestmentOrder)
.then(value => console.log('API called successfully.'),
error => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
placeDualInvestmentOrder | PlaceDualInvestmentOrder |
Promise<{ response: AxiosResponse; body?: any; }>
- Content-Type: application/json
- Accept: Not defined
Promise<{ response: http.IncomingMessage; body: Array; }> listStructuredProducts(status, opts)
Structured Product 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.EarnApi(client);
const status = "in_process"; // string | Status (default: all) `in_process`-processing `will_begin`-unstarted `wait_settlement`-unsettled `done`-finish
const opts = {
'type': "BullishSharkFin", // string | Product Type (default all) `SharkFin2.0`-SharkFin `BullishSharkFin`-BullishSharkFin `BearishSharkFin`-BearishSharkFin `DoubleNoTouch`-DoubleNoTouch `RangeAccrual`-RangeAccrual `SnowBall`-SnowBall
'page': 1, // number | Page number
'limit': 100 // number | Maximum number of records to be returned in a single list
};
api.listStructuredProducts(status, opts)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
status | string | Status (default: all) `in_process`-processing `will_begin`-unstarted `wait_settlement`-unsettled `done`-finish | [default to undefined] |
type | string | Product Type (default all) `SharkFin2.0`-SharkFin `BullishSharkFin`-BullishSharkFin `BearishSharkFin`-BearishSharkFin `DoubleNoTouch`-DoubleNoTouch `RangeAccrual`-RangeAccrual `SnowBall`-SnowBall | [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 100] |
Promise<{ response: AxiosResponse; body: Array; }> StructuredGetProjectList
No authorization required
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: Array; }> listStructuredOrders(opts)
Structured Product 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.EarnApi(client);
const opts = {
'from': 1547706332, // number | Start timestamp
'to': 1547706332, // number | End timestamp
'page': 1, // number | Page number
'limit': 100 // number | Maximum number of records to be returned in a single list
};
api.listStructuredOrders(opts)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
from | number | Start timestamp | [optional] [default to undefined] |
to | number | End timestamp | [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 100] |
Promise<{ response: AxiosResponse; body: Array; }> StructuredOrderList
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body?: any; }> placeStructuredOrder(structuredBuy)
Place Structured Product 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.EarnApi(client);
const structuredBuy = new StructuredBuy(); // StructuredBuy |
api.placeStructuredOrder(structuredBuy)
.then(value => console.log('API called successfully.'),
error => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
structuredBuy | StructuredBuy |
Promise<{ response: AxiosResponse; body?: any; }>
- Content-Type: application/json
- Accept: Not defined