All URIs are relative to https://api.gateio.ws/api/v4
| Method | HTTP request | Description |
|---|---|---|
| listCurrencyChains | GET /wallet/currency_chains | Query chains supported for specified currency |
| getDepositAddress | GET /wallet/deposit_address | Generate currency deposit address |
| listWithdrawals | GET /wallet/withdrawals | Get withdrawal records |
| listDeposits | GET /wallet/deposits | Get deposit records |
| transfer | POST /wallet/transfers | Transfer between trading accounts |
| listSubAccountTransfers | GET /wallet/sub_account_transfers | Get transfer records between main and sub accounts |
| transferWithSubAccount | POST /wallet/sub_account_transfers | Transfer between main and sub accounts |
| subAccountToSubAccount | POST /wallet/sub_account_to_sub_account | Transfer between sub-accounts |
| getTransferOrderStatus | GET /wallet/order_status | Transfer status query |
| listWithdrawStatus | GET /wallet/withdraw_status | Query withdrawal status |
| listSubAccountBalances | GET /wallet/sub_account_balances | Query sub-account balance information |
| listSubAccountMarginBalances | GET /wallet/sub_account_margin_balances | Query sub-account isolated margin account balance information |
| listSubAccountFuturesBalances | GET /wallet/sub_account_futures_balances | Query sub-account perpetual futures account balance information |
| listSubAccountCrossMarginBalances | GET /wallet/sub_account_cross_margin_balances | Query sub-account cross margin account balance information |
| listSavedAddress | GET /wallet/saved_address | Query withdrawal address whitelist |
| getTradeFee | GET /wallet/fee | Query personal trading fees |
| getTotalBalance | GET /wallet/total_balance | Query personal account totals |
| listSmallBalance | GET /wallet/small_balance | Get list of convertible small balance currencies |
| convertSmallBalance | POST /wallet/small_balance | Convert small balance currency |
| listSmallBalanceHistory | GET /wallet/small_balance_history | Get convertible small balance currency history |
| listPushOrders | GET /wallet/push | Get UID transfer history |
Promise<{ response: http.IncomingMessage; body: Array; }> listCurrencyChains(currency)
Query chains supported 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"
const api = new GateApi.WalletApi(client);
const currency = "GT"; // string | Currency name
api.listCurrencyChains(currency)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| currency | string | Currency name | [default to undefined] |
Promise<{ response: AxiosResponse; body: Array; }> CurrencyChain
No authorization required
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: DepositAddress; }> getDepositAddress(currency)
Generate currency deposit address
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.WalletApi(client);
const currency = "USDT"; // string | Currency name
api.getDepositAddress(currency)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| currency | string | Currency name | [default to undefined] |
Promise<{ response: AxiosResponse; body: DepositAddress; }> DepositAddress
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: Array; }> listWithdrawals(opts)
Get withdrawal records
Record query time range cannot exceed 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"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
const api = new GateApi.WalletApi(client);
const opts = {
'currency': "BTC", // string | Specify the currency. If not specified, returns all currencies
'withdrawId': "withdrawId_example", // string | Withdrawal record ID starts with \'w\', such as: w1879219868. When withdraw_id is not empty, only this specific withdrawal record will be queried, and time-based querying will be disabled
'assetClass': "assetClass_example", // string | Currency type of withdrawal record, empty by default. Supports querying withdrawal records in main zone and innovation zone on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone
'withdrawOrderId': "withdrawOrderId_example", // string | User-defined order number for withdrawal. Default is empty. When not empty, the specified user-defined order number record will be queried
'from': 1602120000, // number | Start time for querying records, defaults to 7 days before current time if not specified
'to': 1602123600, // number | End timestamp for the query, defaults to current time if not specified
'limit': 100, // number | Maximum number of records returned in a single list
'offset': 0 // number | List offset, starting from 0
};
api.listWithdrawals(opts)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| currency | string | Specify the currency. If not specified, returns all currencies | [optional] [default to undefined] |
| withdrawId | string | Withdrawal record ID starts with 'w', such as: w1879219868. When withdraw_id is not empty, only this specific withdrawal record will be queried, and time-based querying will be disabled | [optional] [default to undefined] |
| assetClass | string | Currency type of withdrawal record, empty by default. Supports querying withdrawal records in main zone and innovation zone on demand. Value range: SPOT, PILOT SPOT: Main Zone PILOT: Innovation Zone | [optional] [default to undefined] |
| withdrawOrderId | string | User-defined order number for withdrawal. Default is empty. When not empty, the specified user-defined order number record will be queried | [optional] [default to undefined] |
| from | number | Start time for querying records, defaults to 7 days before current time if not specified | [optional] [default to undefined] |
| to | number | End timestamp for the query, defaults to current time if not specified | [optional] [default to undefined] |
| limit | number | Maximum number of records returned in a single list | [optional] [default to 100] |
| offset | number | List offset, starting from 0 | [optional] [default to 0] |
Promise<{ response: AxiosResponse; body: Array; }> WithdrawalRecord
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: Array; }> listDeposits(opts)
Get deposit records
Record query time range cannot exceed 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"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
const api = new GateApi.WalletApi(client);
const opts = {
'currency': "BTC", // string | Specify the currency. If not specified, returns all currencies
'from': 1602120000, // number | Start time for querying records, defaults to 7 days before current time if not specified
'to': 1602123600, // number | End timestamp for the query, defaults to current time if not specified
'limit': 100, // number | Maximum number of entries returned in the list, limited to 500 transactions
'offset': 0 // number | List offset, starting from 0
};
api.listDeposits(opts)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| currency | string | Specify the currency. If not specified, returns all currencies | [optional] [default to undefined] |
| from | number | Start time for querying records, defaults to 7 days before current time if not specified | [optional] [default to undefined] |
| to | number | End timestamp for the query, defaults to current time if not specified | [optional] [default to undefined] |
| limit | number | Maximum number of entries returned in the list, limited to 500 transactions | [optional] [default to 100] |
| offset | number | List offset, starting from 0 | [optional] [default to 0] |
Promise<{ response: AxiosResponse; body: Array; }> DepositRecord
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: TransactionID; }> transfer(transfer)
Transfer between trading accounts
Balance transfers between personal trading accounts. Currently supports the following transfer operations: 1. Spot account - Margin account 2. Spot account - Perpetual futures account 3. Spot account - Delivery futures account 4. Spot account - Options account
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.WalletApi(client);
const transfer = new Transfer(); // Transfer |
api.transfer(transfer)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| transfer | Transfer |
Promise<{ response: AxiosResponse; body: TransactionID; }> TransactionID
- Content-Type: application/json
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: Array; }> listSubAccountTransfers(opts)
Get transfer records between main and sub accounts
Record query time range cannot exceed 30 days > Note: Only records after 2020-04-10 can be retrieved
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.WalletApi(client);
const opts = {
'subUid': "10003", // string | Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts
'from': 1602120000, // number | Start time for querying records, defaults to 7 days before current time if not specified
'to': 1602123600, // number | End timestamp for the query, defaults to current time if not specified
'limit': 100, // number | Maximum number of records returned in a single list
'offset': 0 // number | List offset, starting from 0
};
api.listSubAccountTransfers(opts)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| subUid | string | Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts | [optional] [default to undefined] |
| from | number | Start time for querying records, defaults to 7 days before current time if not specified | [optional] [default to undefined] |
| to | number | End timestamp for the query, defaults to current time if not specified | [optional] [default to undefined] |
| limit | number | Maximum number of records returned in a single list | [optional] [default to 100] |
| offset | number | List offset, starting from 0 | [optional] [default to 0] |
Promise<{ response: AxiosResponse; body: Array; }> SubAccountTransferRecordItem
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: TransactionID; }> transferWithSubAccount(subAccountTransfer)
Transfer between main and sub accounts
Supports transfers to/from sub-account's spot or futures accounts. Note that regardless of which sub-account is operated, only the main account's spot account is used
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.WalletApi(client);
const subAccountTransfer = new SubAccountTransfer(); // SubAccountTransfer |
api.transferWithSubAccount(subAccountTransfer)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| subAccountTransfer | SubAccountTransfer |
Promise<{ response: AxiosResponse; body: TransactionID; }> TransactionID
- Content-Type: application/json
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: TransactionID; }> subAccountToSubAccount(subAccountToSubAccount)
Transfer between sub-accounts
Supports balance transfers between two sub-accounts under the same main account. You can use either the main account's API Key or the source sub-account's API Key to perform the operation
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.WalletApi(client);
const subAccountToSubAccount = new SubAccountToSubAccount(); // SubAccountToSubAccount |
api.subAccountToSubAccount(subAccountToSubAccount)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| subAccountToSubAccount | SubAccountToSubAccount |
Promise<{ response: AxiosResponse; body: TransactionID; }> TransactionID
- Content-Type: application/json
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: TransferOrderStatus; }> getTransferOrderStatus(opts)
Transfer status query
Supports querying transfer status based on user-defined client_order_id or tx_id returned by the transfer interface
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.WalletApi(client);
const opts = {
'clientOrderId': "da3ce7a088c8b0372b741419c7829033", // string | Customer-defined ID to prevent duplicate transfers. Can be a combination of letters (case-sensitive), numbers, hyphens \'-\', and underscores \'_\'. Can be pure letters or pure numbers with length between 1-64 characters
'txId': "59636381286" // string | Transfer operation number, cannot be empty at the same time as client_order_id
};
api.getTransferOrderStatus(opts)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| clientOrderId | string | Customer-defined ID to prevent duplicate transfers. Can be a combination of letters (case-sensitive), numbers, hyphens '-', and underscores '_'. Can be pure letters or pure numbers with length between 1-64 characters | [optional] [default to undefined] |
| txId | string | Transfer operation number, cannot be empty at the same time as client_order_id | [optional] [default to undefined] |
Promise<{ response: AxiosResponse; body: TransferOrderStatus; }> TransferOrderStatus
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: Array; }> listWithdrawStatus(opts)
Query withdrawal 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.WalletApi(client);
const opts = {
'currency': "BTC" // string | Query by specified currency name
};
api.listWithdrawStatus(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] |
Promise<{ response: AxiosResponse; body: Array; }> WithdrawStatus
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: Array; }> listSubAccountBalances(opts)
Query sub-account balance 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.WalletApi(client);
const opts = {
'subUid': "10003" // string | Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts
};
api.listSubAccountBalances(opts)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| subUid | string | Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts | [optional] [default to undefined] |
Promise<{ response: AxiosResponse; body: Array; }> SubAccountBalance
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: Array; }> listSubAccountMarginBalances(opts)
Query sub-account isolated margin account balance 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.WalletApi(client);
const opts = {
'subUid': "10003" // string | Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts
};
api.listSubAccountMarginBalances(opts)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| subUid | string | Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts | [optional] [default to undefined] |
Promise<{ response: AxiosResponse; body: Array; }> SubAccountMarginBalance
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: Array; }> listSubAccountFuturesBalances(opts)
Query sub-account perpetual futures account balance 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.WalletApi(client);
const opts = {
'subUid': "10003", // string | Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts
'settle': "usdt" // string | Query balance of specified settlement currency
};
api.listSubAccountFuturesBalances(opts)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| subUid | string | Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts | [optional] [default to undefined] |
| settle | string | Query balance of specified settlement currency | [optional] [default to undefined] |
Promise<{ response: AxiosResponse; body: Array; }> SubAccountFuturesBalance
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: Array; }> listSubAccountCrossMarginBalances(opts)
Query sub-account cross margin account balance 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.WalletApi(client);
const opts = {
'subUid': "10003" // string | Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts
};
api.listSubAccountCrossMarginBalances(opts)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| subUid | string | Sub-account user ID, you can query multiple records separated by `,`. If not specified, it will return records of all sub-accounts | [optional] [default to undefined] |
Promise<{ response: AxiosResponse; body: Array; }> SubAccountCrossMarginBalance
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: Array; }> listSavedAddress(currency, opts)
Query withdrawal address whitelist
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.WalletApi(client);
const currency = "USDT"; // string | Currency
const opts = {
'chain': '', // string | Chain name
'limit': '50', // string | Maximum number returned, up to 100
'page': 1 // number | Page number
};
api.listSavedAddress(currency, opts)
.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] |
| chain | string | Chain name | [optional] [default to ''] |
| limit | string | Maximum number returned, up to 100 | [optional] [default to '50'] |
| page | number | Page number | [optional] [default to 1] |
Promise<{ response: AxiosResponse; body: Array; }> SavedAddress
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: TradeFee; }> getTradeFee(opts)
Query personal trading fees
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.WalletApi(client);
const opts = {
'currencyPair': "BTC_USDT", // string | Specify currency pair to get more accurate fee settings. This field is optional. Usually fee settings are the same for all currency pairs.
'settle': "BTC" // 'BTC' | 'USDT' | 'USD' | Specify the settlement currency of the contract to get more accurate fee settings. This field is optional. Generally, the fee settings for all settlement currencies are the same.
};
api.getTradeFee(opts)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| currencyPair | string | Specify currency pair to get more accurate fee settings. This field is optional. Usually fee settings are the same for all currency pairs. | [optional] [default to undefined] |
| settle | Settle | Specify the settlement currency of the contract to get more accurate fee settings. This field is optional. Generally, the fee settings for all settlement currencies are the same. | [optional] [default to undefined] |
Promise<{ response: AxiosResponse; body: TradeFee; }> TradeFee
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: TotalBalance; }> getTotalBalance(opts)
Query personal account totals
This query endpoint returns the total estimated value of all currencies in each account converted to the input currency. Exchange rates and related account balance information may be cached for up to 1 minute. It is not recommended to use this interface data for real-time calculations. For real-time calculations, query the corresponding balance interface based on account type, such as: - `GET /spot/accounts` to query spot account - `GET /margin/accounts` to query margin account - `GET /futures/{settle}/accounts` to query futures account
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.WalletApi(client);
const opts = {
'currency': 'USDT' // string | Target currency type for statistical conversion. Accepts BTC, CNY, USD, and USDT. USDT is the default value
};
api.getTotalBalance(opts)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| currency | string | Target currency type for statistical conversion. Accepts BTC, CNY, USD, and USDT. USDT is the default value | [optional] [default to 'USDT'] |
Promise<{ response: AxiosResponse; body: TotalBalance; }> TotalBalance
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: Array; }> listSmallBalance()
Get list of convertible small balance currencies
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.WalletApi(client);
api.listSmallBalance()
.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; }> SmallBalance
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body?: any; }> convertSmallBalance(convertSmallBalance)
Convert small balance 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.WalletApi(client);
const convertSmallBalance = new ConvertSmallBalance(); // ConvertSmallBalance |
api.convertSmallBalance(convertSmallBalance)
.then(value => console.log('API called successfully.'),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| convertSmallBalance | ConvertSmallBalance |
Promise<{ response: AxiosResponse; body?: any; }>
- Content-Type: application/json
- Accept: Not defined
Promise<{ response: http.IncomingMessage; body: Array; }> listSmallBalanceHistory(opts)
Get convertible small balance currency history
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.WalletApi(client);
const opts = {
'currency': "currency_example", // string | Currency to convert
'page': 1, // number | Page number
'limit': 100 // number | Maximum number of items returned. Default: 100, minimum: 1, maximum: 100
};
api.listSmallBalanceHistory(opts)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| currency | string | Currency to convert | [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; }> SmallBalanceHistory
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: Array; }> listPushOrders(opts)
Get UID transfer history
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.WalletApi(client);
const opts = {
'id': 56, // number | Order ID
'from': 56, // number | Start time for querying records. If not specified, defaults to 7 days before the current time. Unix timestamp in seconds
'to': 56, // number | End time for querying records. If not specified, defaults to the current time. Unix timestamp in seconds
'limit': 100, // number | Maximum number of items returned in the list, default value is 100
'offset': 0, // number | List offset, starting from 0
'transactionType': 'withdraw' // string | Order type returned in the list: `withdraw`, `deposit`. Default is `withdraw`.
};
api.listPushOrders(opts)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| id | number | Order ID | [optional] [default to undefined] |
| from | number | Start time for querying records. If not specified, defaults to 7 days before the current time. Unix timestamp in seconds | [optional] [default to undefined] |
| to | number | End time for querying records. If not specified, defaults to the current time. Unix timestamp in seconds | [optional] [default to undefined] |
| limit | number | Maximum number of items returned in the list, default value is 100 | [optional] [default to 100] |
| offset | number | List offset, starting from 0 | [optional] [default to 0] |
| transactionType | string | Order type returned in the list: `withdraw`, `deposit`. Default is `withdraw`. | [optional] [default to 'withdraw'] |
Promise<{ response: AxiosResponse; body: Array; }> UidPushOrder
- Content-Type: Not defined
- Accept: application/json