All URIs are relative to https://api.gateio.ws/api/v4
Method | HTTP request | Description |
---|---|---|
getAccountDetail | GET /account/detail | Get account detail |
listSTPGroups | GET /account/stp_groups | List STP Groups |
createSTPGroup | POST /account/stp_groups | Create STP Group |
listSTPGroupsUsers | GET /account/stp_groups/{stp_id}/users | List users of the STP group |
addSTPGroupUsers | POST /account/stp_groups/{stp_id}/users | Add users to the STP group |
deleteSTPGroupUsers | DELETE /account/stp_groups/{stp_id}/users | Delete the user in the STP group |
Promise<{ response: http.IncomingMessage; body: AccountDetail; }> getAccountDetail()
Get account 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.AccountApi(client);
api.getAccountDetail()
.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: AccountDetail; }> AccountDetail
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: Array; }> listSTPGroups(opts)
List STP Groups
Retrieve the list of STP groups created by the main account user only
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.AccountApi(client);
const opts = {
'name': "group" // string | Perform a fuzzy search based on the name
};
api.listSTPGroups(opts)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
name | string | Perform a fuzzy search based on the name | [optional] [default to undefined] |
Promise<{ response: AxiosResponse; body: Array; }> StpGroup
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: StpGroup; }> createSTPGroup(stpGroup)
Create STP Group
Only the main account is allowed to create a new STP user group
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.AccountApi(client);
const stpGroup = new StpGroup(); // StpGroup |
api.createSTPGroup(stpGroup)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
stpGroup | StpGroup |
Promise<{ response: AxiosResponse; body: StpGroup; }> StpGroup
- Content-Type: application/json
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: Array; }> listSTPGroupsUsers(stpId)
List users of the STP group
Only the main account that created this STP group is allowed to list the user ID of the STP group
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.AccountApi(client);
const stpId = 1; // number | STP Group ID
api.listSTPGroupsUsers(stpId)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
stpId | number | STP Group ID | [default to undefined] |
Promise<{ response: AxiosResponse; body: Array; }> StpGroupUser
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: Array; }> addSTPGroupUsers(stpId, requestBody)
Add users to the STP group
- Only the master account that created the STP user group is allowed to add users to the STP user group.- Only accounts under the main account are allowed to be added. Cross-account is not permitted
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.AccountApi(client);
const stpId = 1; // number | STP Group ID
const requestBody = [[1,2,3]]; // Array<number> | User ID
api.addSTPGroupUsers(stpId, requestBody)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
stpId | number | STP Group ID | [default to undefined] |
requestBody | Array<number> | User ID |
Promise<{ response: AxiosResponse; body: Array; }> StpGroupUser
- Content-Type: application/json
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: Array; }> deleteSTPGroupUsers(stpId, requestBody)
Delete the user in the STP group
- Only the main account that created this STP group is allowed to delete users from the STP user group - Deletion is limited to accounts under the current main account; cross-account deletion is not permitted
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.AccountApi(client);
const stpId = 1; // number | STP Group ID
const requestBody = [[1,2,3]]; // Array<number> | User ID
api.deleteSTPGroupUsers(stpId, requestBody)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
stpId | number | STP Group ID | [default to undefined] |
requestBody | Array<number> | User ID |
Promise<{ response: AxiosResponse; body: Array; }> StpGroupUser
- Content-Type: application/json
- Accept: application/json