Skip to content

Latest commit

 

History

History
1019 lines (694 loc) · 35.6 KB

WalletApi.md

File metadata and controls

1019 lines (694 loc) · 35.6 KB

WalletApi

All URIs are relative to https://api.gateio.ws/api/v4

Method HTTP request Description
listCurrencyChains GET /wallet/currency_chains List chains supported for specified currency
getDepositAddress GET /wallet/deposit_address Generate currency deposit address
listWithdrawals GET /wallet/withdrawals Retrieve withdrawal records
listDeposits GET /wallet/deposits Retrieve deposit records
transfer POST /wallet/transfers Transfer between trading accounts
listSubAccountTransfers GET /wallet/sub_account_transfers Retrieve 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 Sub-account transfers to sub-account
getTransferOrderStatus GET /wallet/order_status 划转状态查询
listWithdrawStatus GET /wallet/withdraw_status Retrieve withdrawal status
listSubAccountBalances GET /wallet/sub_account_balances Retrieve sub account balances
listSubAccountMarginBalances GET /wallet/sub_account_margin_balances Query sub accounts' margin balances
listSubAccountFuturesBalances GET /wallet/sub_account_futures_balances Query sub accounts' futures account balances
listSubAccountCrossMarginBalances GET /wallet/sub_account_cross_margin_balances Query subaccount's cross_margin account info
listSavedAddress GET /wallet/saved_address Query saved address
getTradeFee GET /wallet/fee Retrieve personal trading fee
getTotalBalance GET /wallet/total_balance Retrieve user's total balances
listSmallBalance GET /wallet/small_balance List small balance
convertSmallBalance POST /wallet/small_balance Convert small balance
listSmallBalanceHistory GET /wallet/small_balance_history List small balance history
listPushOrders GET /wallet/push 获取UID转帐历史纪录

listCurrencyChains

Promise<{ response: http.IncomingMessage; body: Array; }> listCurrencyChains(currency)

List chains supported for specified currency

Example

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));

Parameters

Name Type Description Notes
currency string Currency name [default to undefined]

Return type

Promise<{ response: AxiosResponse; body: Array; }> CurrencyChain

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getDepositAddress

Promise<{ response: http.IncomingMessage; body: DepositAddress; }> getDepositAddress(currency)

Generate currency deposit address

Example

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));

Parameters

Name Type Description Notes
currency string Currency name [default to undefined]

Return type

Promise<{ response: AxiosResponse; body: DepositAddress; }> DepositAddress

Authorization

apiv4

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listWithdrawals

Promise<{ response: http.IncomingMessage; body: Array; }> listWithdrawals(opts)

Retrieve withdrawal records

Record time range cannot exceed 30 days

Example

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 | Filter by currency. Return all currency records if not specified
  'from': 1602120000, // number | Time range beginning, default to 7 days before current time
  'to': 1602123600, // number | Time range ending, default to current time
  'limit': 100, // number | Maximum number of records to be 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));

Parameters

Name Type Description Notes
currency string Filter by currency. Return all currency records if not specified [optional] [default to undefined]
from number Time range beginning, default to 7 days before current time [optional] [default to undefined]
to number Time range ending, default to current time [optional] [default to undefined]
limit number Maximum number of records to be returned in a single list [optional] [default to 100]
offset number List offset, starting from 0 [optional] [default to 0]

Return type

Promise<{ response: AxiosResponse; body: Array; }> WithdrawalRecord

Authorization

apiv4

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listDeposits

Promise<{ response: http.IncomingMessage; body: Array; }> listDeposits(opts)

Retrieve deposit records

Record time range cannot exceed 30 days

Example

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 | Filter by currency. Return all currency records if not specified
  'from': 1602120000, // number | Time range beginning, default to 7 days before current time
  'to': 1602123600, // number | Time range ending, default to current time
  'limit': 100, // number | The maximum number of entries returned in the list is 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));

Parameters

Name Type Description Notes
currency string Filter by currency. Return all currency records if not specified [optional] [default to undefined]
from number Time range beginning, default to 7 days before current time [optional] [default to undefined]
to number Time range ending, default to current time [optional] [default to undefined]
limit number The maximum number of entries returned in the list is limited to 500 transactions. [optional] [default to 100]
offset number List offset, starting from 0 [optional] [default to 0]

Return type

Promise<{ response: AxiosResponse; body: Array; }> LedgerRecord

Authorization

apiv4

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

transfer

Promise<{ response: http.IncomingMessage; body: TransactionID; }> transfer(transfer)

Transfer between trading accounts

个人交易账户之间的余额互转,目前支持以下互转操作: 1. 现货账户 - 杠杆账户 2. 现货账户 - 永续合约账户 3. 现货账户 - 交割合约账户 4. 现货账户 - 期权账户

Example

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));

Parameters

Name Type Description Notes
transfer Transfer

Return type

Promise<{ response: AxiosResponse; body: TransactionID; }> TransactionID

Authorization

apiv4

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

listSubAccountTransfers

Promise<{ response: http.IncomingMessage; body: Array; }> listSubAccountTransfers(opts)

Retrieve transfer records between main and sub accounts

Record time range cannot exceed 30 days > Note: only records after 2020-04-10 can be retrieved

Example

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 | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts
  'from': 1602120000, // number | Time range beginning, default to 7 days before current time
  'to': 1602123600, // number | Time range ending, default to current time
  'limit': 100, // number | Maximum number of records to be 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));

Parameters

Name Type Description Notes
subUid string User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts [optional] [default to undefined]
from number Time range beginning, default to 7 days before current time [optional] [default to undefined]
to number Time range ending, default to current time [optional] [default to undefined]
limit number Maximum number of records to be returned in a single list [optional] [default to 100]
offset number List offset, starting from 0 [optional] [default to 0]

Return type

Promise<{ response: AxiosResponse; body: Array; }> SubAccountTransfer

Authorization

apiv4

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

transferWithSubAccount

Promise<{ response: http.IncomingMessage; body: TransactionID; }> transferWithSubAccount(subAccountTransfer)

Transfer between main and sub accounts

Support transferring with sub user&#39;s spot or futures account. Note that only main user&#39;s spot account is used no matter which sub user&#39;s account is operated.

Example

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));

Parameters

Name Type Description Notes
subAccountTransfer SubAccountTransfer

Return type

Promise<{ response: AxiosResponse; body: TransactionID; }> TransactionID

Authorization

apiv4

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

subAccountToSubAccount

Promise<{ response: http.IncomingMessage; body: TransactionID; }> subAccountToSubAccount(subAccountToSubAccount)

Sub-account transfers to sub-account

It is possible to perform balance transfers between two sub-accounts under the same main account. You can use either the API Key of the main account or the API Key of the sub-account to initiate the transfer.

Example

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));

Parameters

Name Type Description Notes
subAccountToSubAccount SubAccountToSubAccount

Return type

Promise<{ response: AxiosResponse; body: TransactionID; }> TransactionID

Authorization

apiv4

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getTransferOrderStatus

Promise<{ response: http.IncomingMessage; body: InlineResponse200; }> getTransferOrderStatus(opts)

划转状态查询

支持根据用户自定义client_order_id或者划转接口返回的tx_id查询划转状态

Example

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 | The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens \'-\', and underscores \'_\', with a length ranging from 1 to 64 characters.
  'txId': "59636381286" // string | 划转操作单号,和client_order_id不能同时为空
};
api.getTransferOrderStatus(opts)
   .then(value => console.log('API called successfully. Returned data: ', value.body),
         error => console.error(error));

Parameters

Name Type Description Notes
clientOrderId string The custom ID provided by the customer serves as a safeguard against duplicate transfers. It can be a combination of letters (case-sensitive), numbers, hyphens &#39;-&#39;, and underscores &#39;_&#39;, with a length ranging from 1 to 64 characters. [optional] [default to undefined]
txId string 划转操作单号,和client_order_id不能同时为空 [optional] [default to undefined]

Return type

Promise<{ response: AxiosResponse; body: InlineResponse200; }> InlineResponse200

Authorization

apiv4

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listWithdrawStatus

Promise<{ response: http.IncomingMessage; body: Array; }> listWithdrawStatus(opts)

Retrieve withdrawal status

Example

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 | Retrieve data of the specified currency
};
api.listWithdrawStatus(opts)
   .then(value => console.log('API called successfully. Returned data: ', value.body),
         error => console.error(error));

Parameters

Name Type Description Notes
currency string Retrieve data of the specified currency [optional] [default to undefined]

Return type

Promise<{ response: AxiosResponse; body: Array; }> WithdrawStatus

Authorization

apiv4

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listSubAccountBalances

Promise<{ response: http.IncomingMessage; body: Array; }> listSubAccountBalances(opts)

Retrieve sub account balances

Example

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 | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts
};
api.listSubAccountBalances(opts)
   .then(value => console.log('API called successfully. Returned data: ', value.body),
         error => console.error(error));

Parameters

Name Type Description Notes
subUid string User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts [optional] [default to undefined]

Return type

Promise<{ response: AxiosResponse; body: Array; }> SubAccountBalance

Authorization

apiv4

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listSubAccountMarginBalances

Promise<{ response: http.IncomingMessage; body: Array; }> listSubAccountMarginBalances(opts)

Query sub accounts&#39; margin balances

Example

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 | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts
};
api.listSubAccountMarginBalances(opts)
   .then(value => console.log('API called successfully. Returned data: ', value.body),
         error => console.error(error));

Parameters

Name Type Description Notes
subUid string User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts [optional] [default to undefined]

Return type

Promise<{ response: AxiosResponse; body: Array; }> SubAccountMarginBalance

Authorization

apiv4

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listSubAccountFuturesBalances

Promise<{ response: http.IncomingMessage; body: Array; }> listSubAccountFuturesBalances(opts)

Query sub accounts&#39; futures account balances

Example

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 | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts
  'settle': "usdt" // string | Query only balances of specified settle currency
};
api.listSubAccountFuturesBalances(opts)
   .then(value => console.log('API called successfully. Returned data: ', value.body),
         error => console.error(error));

Parameters

Name Type Description Notes
subUid string User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts [optional] [default to undefined]
settle string Query only balances of specified settle currency [optional] [default to undefined]

Return type

Promise<{ response: AxiosResponse; body: Array; }> SubAccountFuturesBalance

Authorization

apiv4

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listSubAccountCrossMarginBalances

Promise<{ response: http.IncomingMessage; body: Array; }> listSubAccountCrossMarginBalances(opts)

Query subaccount&#39;s cross_margin account info

Example

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 | User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts
};
api.listSubAccountCrossMarginBalances(opts)
   .then(value => console.log('API called successfully. Returned data: ', value.body),
         error => console.error(error));

Parameters

Name Type Description Notes
subUid string User ID of sub-account, you can query multiple records separated by `,`. If not specified, it will return the records of all sub accounts [optional] [default to undefined]

Return type

Promise<{ response: AxiosResponse; body: Array; }> SubAccountCrossMarginBalance

Authorization

apiv4

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listSavedAddress

Promise<{ response: http.IncomingMessage; body: Array; }> listSavedAddress(currency, opts)

Query saved address

Example

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, 100 at most
  'page': 1 // number | Page number
};
api.listSavedAddress(currency, opts)
   .then(value => console.log('API called successfully. Returned data: ', value.body),
         error => console.error(error));

Parameters

Name Type Description Notes
currency string Currency [default to undefined]
chain string Chain name [optional] [default to '']
limit string Maximum number returned, 100 at most [optional] [default to '50']
page number Page number [optional] [default to 1]

Return type

Promise<{ response: AxiosResponse; body: Array; }> SavedAddress

Authorization

apiv4

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getTradeFee

Promise<{ response: http.IncomingMessage; body: TradeFee; }> getTradeFee(opts)

Retrieve personal trading fee

Example

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 a currency pair to retrieve precise fee rate  This field is optional. In most cases, the fee rate is identical among all currency pairs
  'settle': "BTC" // 'BTC' | 'USDT' | 'USD' | Specify the settlement currency of the contract to get more accurate rate settings  This field is optional. Generally, the rate 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));

Parameters

Name Type Description Notes
currencyPair string Specify a currency pair to retrieve precise fee rate This field is optional. In most cases, the fee rate is identical among all currency pairs [optional] [default to undefined]
settle Settle Specify the settlement currency of the contract to get more accurate rate settings This field is optional. Generally, the rate settings for all settlement currencies are the same. [optional] [default to undefined]

Return type

Promise<{ response: AxiosResponse; body: TradeFee; }> TradeFee

Authorization

apiv4

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getTotalBalance

Promise<{ response: http.IncomingMessage; body: TotalBalance; }> getTotalBalance(opts)

Retrieve user&#39;s total balances

This endpoint returns an approximate sum of exchanged amount from all currencies to input currency for each account.The exchange rate and account balance could have been cached for at most 1 minute. It is not recommended to use its result for any trading calculation. For trading calculation, use the corresponding account query endpoint for each account type. For example: - `GET /spot/accounts` to query spot account balance - `GET /margin/accounts` to query margin account balance - `GET /futures/{settle}/accounts` to query futures account balance

Example

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 | Currency unit used to calculate the balance amount. BTC, CNY, USD and USDT are allowed. USDT is the default.
};
api.getTotalBalance(opts)
   .then(value => console.log('API called successfully. Returned data: ', value.body),
         error => console.error(error));

Parameters

Name Type Description Notes
currency string Currency unit used to calculate the balance amount. BTC, CNY, USD and USDT are allowed. USDT is the default. [optional] [default to 'USDT']

Return type

Promise<{ response: AxiosResponse; body: TotalBalance; }> TotalBalance

Authorization

apiv4

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listSmallBalance

Promise<{ response: http.IncomingMessage; body: Array; }> listSmallBalance()

List small balance

Example

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));

Parameters

This endpoint does not need any parameter.

Return type

Promise<{ response: AxiosResponse; body: Array; }> SmallBalance

Authorization

apiv4

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

convertSmallBalance

Promise<{ response: http.IncomingMessage; body?: any; }> convertSmallBalance(convertSmallBalance)

Convert small balance

Example

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));

Parameters

Name Type Description Notes
convertSmallBalance ConvertSmallBalance

Return type

Promise<{ response: AxiosResponse; body?: any; }>

Authorization

apiv4

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

listSmallBalanceHistory

Promise<{ response: http.IncomingMessage; body: Array; }> listSmallBalanceHistory(opts)

List small balance history

Example

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
  'page': 1, // number | Page number
  'limit': 100 // number | Maximum response items.  Default: 100, minimum: 1, Maximum: 100
};
api.listSmallBalanceHistory(opts)
   .then(value => console.log('API called successfully. Returned data: ', value.body),
         error => console.error(error));

Parameters

Name Type Description Notes
currency string Currency [optional] [default to undefined]
page number Page number [optional] [default to 1]
limit number Maximum response items. Default: 100, minimum: 1, Maximum: 100 [optional] [default to 100]

Return type

Promise<{ response: AxiosResponse; body: Array; }> SmallBalanceHistory

Authorization

apiv4

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listPushOrders

Promise<{ response: http.IncomingMessage; body: Array; }> listPushOrders(opts)

获取UID转帐历史纪录

Example

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 | 查询记录的起始时间,不指定则默认从当前时间开始向前推7天,秒级Unix的时间戳
  'to': 56, // number | 查询记录的结束时间,不指定则默认为当前时间,秒级Unix的时间戳
  'limit': 100, // number | 列表返回的最大数量,默认值是 100
  'offset': 0, // number | List offset, starting from 0
  'transactionType': 'withdraw' // string | 列表返回订单类型 `withdraw`,  `deposit`,默认为`withdraw`.
};
api.listPushOrders(opts)
   .then(value => console.log('API called successfully. Returned data: ', value.body),
         error => console.error(error));

Parameters

Name Type Description Notes
id number Order ID [optional] [default to undefined]
from number 查询记录的起始时间,不指定则默认从当前时间开始向前推7天,秒级Unix的时间戳 [optional] [default to undefined]
to number 查询记录的结束时间,不指定则默认为当前时间,秒级Unix的时间戳 [optional] [default to undefined]
limit number 列表返回的最大数量,默认值是 100 [optional] [default to 100]
offset number List offset, starting from 0 [optional] [default to 0]
transactionType string 列表返回订单类型 `withdraw`, `deposit`,默认为`withdraw`. [optional] [default to 'withdraw']

Return type

Promise<{ response: AxiosResponse; body: Array; }> UidPushOrder

Authorization

apiv4

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json