TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/tiagosiebler/gateio-api/llms.txt
Use this file to discover all available pages before exploring further.
RestClient class is the primary entry point for all REST API interactions with Gate.io. It covers every product area the exchange offers — from spot and margin trading to futures, delivery, options, wallet management, sub-accounts, and beyond. Every method returns a Promise, making it fully compatible with async/await patterns in both Node.js and browser environments.
Installation and Import
Constructor
Configuration object for the REST client. All fields are optional.
Low-level Axios request configuration passed directly to the HTTP client. Use this for proxy settings, custom headers, or timeout overrides.
Instantiation Examples
Public endpoints only (no authentication):Authentication
Authentication is handled automatically for any method that requires it. WhenapiKey and apiSecret are present in the constructor options, the client signs every request that touches a private endpoint. You do not need to call any separate login method.
Methods that require authentication are marked with a lock icon (🔒) in the endpoint function list on GitHub.
Method Groups by Product Area
All methods return aPromise. Use await or .then() to handle the response. The complete list of all methods — including the exact HTTP method and Gate.io endpoint path each one maps to — is maintained in docs/endpointFunctionList.md on GitHub.
Withdrawal
Withdrawal
| Method | Auth | Description |
|---|---|---|
submitWithdrawal(params) | 🔒 | Submit a withdrawal request |
submitSpotMainAccountTransfer(params) | 🔒 | Transfer from spot main account |
cancelWithdrawal(params) | 🔒 | Cancel a pending withdrawal by ID |
Wallet
Wallet
| Method | Auth | Description |
|---|---|---|
getCurrencyChains(params) | — | Get supported chains for a currency |
createDepositAddress(params) | 🔒 | Generate or retrieve deposit address |
getWithdrawalRecords(params) | 🔒 | List withdrawal history |
getDepositRecords(params) | 🔒 | List deposit history |
submitTransfer(params) | 🔒 | Transfer between accounts |
submitMainSubTransfer(params) | 🔒 | Transfer between main and sub accounts |
getMainSubTransfers(params) | 🔒 | Get main/sub transfer records |
getTransferStatus(params) | 🔒 | Check status of a transfer |
getWithdrawalStatus(params) | 🔒 | Get withdrawal status for a currency |
getSubBalance(params) | 🔒 | Get sub-account balances |
getTradingFees(params) | 🔒 | Get trading fee schedule |
getBalances(params) | 🔒 | Get total wallet balance |
getSmallBalances() | 🔒 | Get small (dust) balances |
convertSmallBalance(params) | 🔒 | Convert small balances to GT |
getSmallBalanceHistory(params) | 🔒 | Get conversion history |
getSavedAddresses(params) | 🔒 | Get saved withdrawal addresses |
Sub-accounts
Sub-accounts
| Method | Auth | Description |
|---|---|---|
createSubAccount(params) | 🔒 | Create a new sub-account |
getSubAccounts(params) | 🔒 | List all sub-accounts |
getSubAccount(params) | 🔒 | Get a single sub-account by user ID |
createSubAccountApiKey(params) | 🔒 | Create an API key for a sub-account |
getSubAccountApiKeys(params) | 🔒 | List API keys for a sub-account |
updateSubAccountApiKey(params) | 🔒 | Update sub-account API key permissions |
deleteSubAccountApiKey(params) | 🔒 | Delete a sub-account API key |
getSubAccountApiKey(params) | 🔒 | Get details for a specific API key |
lockSubAccount(params) | 🔒 | Lock a sub-account |
unlockSubAccount(params) | 🔒 | Unlock a sub-account |
getSubAccountMode() | 🔒 | Get sub-account unified mode setting |
Unified Account
Unified Account
| Method | Auth | Description |
|---|---|---|
getUnifiedAccountInfo(params) | 🔒 | Get unified account details |
setUnifiedAccountMode(params) | 🔒 | Switch unified account mode |
getUnifiedAccountMode() | 🔒 | Get current unified account mode |
getUnifiedMaxBorrow(params) | 🔒 | Get max borrowable amount |
getUnifiedMaxTransferable(params) | 🔒 | Get max transferable amount |
getUnifiedBatchMaxBorrowable(params) | 🔒 | Batch query max borrowable amounts |
submitUnifiedBorrowOrRepay(params) | 🔒 | Submit borrow or repay request |
getUnifiedLoans(params) | 🔒 | List unified account loans |
getUnifiedLoanRecords(params) | 🔒 | Get loan records |
getUnifiedInterestRecords(params) | 🔒 | Get interest records |
getUnifiedRiskUnitDetails() | 🔒 | Get portfolio risk unit details |
Spot Trading
Spot Trading
| Method | Auth | Description |
|---|---|---|
getSpotCurrencies() | — | List all supported currencies |
getSpotCurrencyPairs() | — | List all currency pairs |
getSpotTicker(params) | — | Get ticker for one or all pairs |
getSpotOrderBook(params) | — | Get order book depth |
getSpotTrades(params) | — | Get recent trades |
getSpotCandles(params) | — | Get OHLCV candlestick data |
getSpotFeeRates(params) | — | Get fee rates |
getSpotAccounts(params) | 🔒 | Get spot account balances |
submitSpotOrder(params) | 🔒 | Place a new spot order |
submitSpotBatchOrders(params) | 🔒 | Place multiple orders in one request |
getSpotOrders(params) | 🔒 | List open or closed orders |
getSpotOrder(params) | 🔒 | Get a single order by ID |
cancelSpotOrder(params) | 🔒 | Cancel a single spot order |
cancelSpotOpenOrders(params) | 🔒 | Cancel all open orders for a pair |
batchCancelSpotOrders(params) | 🔒 | Cancel multiple orders by ID list |
updateSpotOrder(params) | 🔒 | Amend a pending order |
getSpotTradingHistory(params) | 🔒 | Get personal trade history |
submitSpotPriceTriggerOrder(params) | 🔒 | Place a price-triggered (stop) order |
getSpotAutoOrders(params) | 🔒 | List price-triggered orders |
cancelAllOpenSpotOrders(params) | 🔒 | Cancel all open spot orders |
Margin Trading
Margin Trading
| Method | Auth | Description |
|---|---|---|
getMarginAccounts(params) | 🔒 | Get isolated margin account balances |
getMarginBalanceHistory(params) | 🔒 | Get margin balance history |
getFundingAccounts(params) | 🔒 | Get funding account balances |
getCrossMarginCurrencies() | — | List cross margin supported currencies |
getCrossMarginAccount() | 🔒 | Get cross margin account details |
getCrossMarginAccountHistory(params) | 🔒 | Get cross margin account history |
submitCrossMarginBorrowLoan(params) | 🔒 | Create a cross margin borrow loan |
getCrossMarginBorrowHistory(params) | 🔒 | Get borrow history |
submitCrossMarginRepayment(params) | 🔒 | Submit a repayment |
getCrossMarginRepayments(params) | 🔒 | Get repayment records |
getCrossMarginInterestRecords(params) | 🔒 | Get interest records |
getEstimatedInterestRates(params) | 🔒 | Get estimated interest rates |
Perpetual Futures
Perpetual Futures
| Method | Auth | Description |
|---|---|---|
getFuturesContracts(params) | — | List all futures contracts |
getFuturesContract(params) | — | Get details for a single contract |
getFuturesOrderBook(params) | — | Get futures order book |
getFuturesTickers(params) | — | Get futures ticker data |
getFuturesCandles(params) | — | Get futures candlestick data |
getFundingRates(params) | — | Get funding rate history |
getFuturesInsuranceBalanceHistory(params) | — | Get insurance fund history |
getFuturesStats(params) | — | Get trading statistics |
getFuturesAccount(params) | 🔒 | Get futures account details |
getFuturesAccountBook(params) | 🔒 | Get futures account ledger |
getFuturesPositions(params) | 🔒 | List open positions |
getFuturesPosition(params) | 🔒 | Get a single position |
updateFuturesMargin(params) | 🔒 | Update position margin |
updateFuturesLeverage(params) | 🔒 | Set leverage for a contract |
submitFuturesOrder(params) | 🔒 | Place a futures order |
getFuturesOrders(params) | 🔒 | List futures orders |
cancelAllFuturesOrders(params) | 🔒 | Cancel all open orders |
getFuturesOrder(params) | 🔒 | Get a single futures order |
cancelFuturesOrder(params) | 🔒 | Cancel a single futures order |
updateFuturesOrder(params) | 🔒 | Amend a futures order |
getFuturesTradingHistory(params) | 🔒 | Get personal trade history |
submitFuturesPriceTriggeredOrder(params) | 🔒 | Place a price-triggered order |
batchCancelFuturesOrders(params) | 🔒 | Cancel multiple futures orders |
batchUpdateFuturesOrders(params) | 🔒 | Amend multiple futures orders |
createTrailOrder(params) | 🔒 | Create a trailing order |
createChaseOrder(params) | 🔒 | Create a price-chasing order |
Delivery Futures
Delivery Futures
| Method | Auth | Description |
|---|---|---|
getAllDeliveryContracts(params) | — | List all delivery contracts |
getDeliveryContract(params) | — | Get a single delivery contract |
getDeliveryOrderBook(params) | — | Get delivery order book |
getDeliveryTrades(params) | — | Get delivery trades |
getDeliveryCandles(params) | — | Get delivery candlestick data |
getDeliveryTickers(params) | — | Get delivery ticker data |
getDeliveryAccount(params) | 🔒 | Get delivery account balance |
getDeliveryBook(params) | 🔒 | Get delivery account ledger |
getDeliveryPositions(params) | 🔒 | List delivery positions |
submitDeliveryOrder(params) | 🔒 | Place a delivery futures order |
getDeliveryOrders(params) | 🔒 | List delivery orders |
cancelAllDeliveryOrders(params) | 🔒 | Cancel all open delivery orders |
getDeliveryOrder(params) | 🔒 | Get a delivery order by ID |
cancelDeliveryOrder(params) | 🔒 | Cancel a delivery order |
getDeliveryTradingHistory(params) | 🔒 | Get personal delivery trade history |
getDeliveryClosedPositions(params) | 🔒 | Get closed delivery positions |
getDeliveryLiquidationHistory(params) | 🔒 | Get liquidation records |
getDeliverySettlementHistory(params) | 🔒 | Get settlement history |
submitDeliveryTriggeredOrder(params) | 🔒 | Place a triggered delivery order |
Options
Options
| Method | Auth | Description |
|---|---|---|
getOptionsUnderlyings() | — | List all options underlyings |
getOptionsExpirationTimes(params) | — | Get expiration times |
getOptionsContracts(params) | — | List options contracts |
getOptionsContract(params) | — | Get a single options contract |
getOptionsSettlementHistory(params) | — | Get settlement history |
getOptionsOrderBook(params) | — | Get options order book |
getOptionsTickers(params) | — | Get options tickers |
getOptionsCandles(params) | — | Get options candlestick data |
getOptionsTrades(params) | — | Get options trades |
getOptionsAccount() | 🔒 | Get options account details |
getOptionsPositionsUnderlying(params) | 🔒 | Get positions by underlying |
submitOptionsOrder(params) | 🔒 | Place an options order |
getOptionsOrders(params) | 🔒 | List options orders |
cancelAllOpenOptionsOrders(params) | 🔒 | Cancel all open options orders |
getOptionsOrder(params) | 🔒 | Get a single options order |
amendOptionsOrder(params) | 🔒 | Amend an options order |
cancelOptionsOrder(params) | 🔒 | Cancel an options order |
getOptionsPersonalHistory(params) | 🔒 | Get personal options trade history |
setOptionsMMPSettings(params) | 🔒 | Configure Market Maker Protection |
Cross Exchange (CrossEx)
Cross Exchange (CrossEx)
| Method | Auth | Description |
|---|---|---|
getCrossExSymbols(params) | — | List CrossEx trading symbols |
getCrossExRiskLimits(params) | — | Get risk limit configuration |
getCrossExTransferCoins(params) | — | Get transferable coins |
createCrossExTransfer(params) | 🔒 | Create a CrossEx transfer |
getCrossExTransferHistory(params) | 🔒 | Get transfer history |
createCrossExOrder(params) | 🔒 | Place a CrossEx order |
cancelCrossExOrder(order_id) | 🔒 | Cancel a CrossEx order |
modifyCrossExOrder(params) | 🔒 | Modify a CrossEx order |
getCrossExOrder(order_id) | 🔒 | Get a CrossEx order |
updateCrossExAccount(params) | 🔒 | Update account settings |
getCrossExAccounts(params) | 🔒 | Get CrossEx account balances |
getCrossExPositions(params) | 🔒 | List CrossEx positions |
getCrossExOpenOrders(params) | 🔒 | List open CrossEx orders |
getCrossExHistoryOrders(params) | 🔒 | Get CrossEx order history |
getCrossExHistoryTrades(params) | 🔒 | Get CrossEx trade history |
Alpha
Alpha
| Method | Auth | Description |
|---|---|---|
getAlphaCurrencies(params) | — | List Alpha market currencies |
getAlphaTickers(params) | — | Get Alpha market tickers |
getAlphaAccounts() | 🔒 | Get Alpha account balances |
getAlphaAccountBook(params) | 🔒 | Get Alpha account history |
createAlphaQuote(params) | 🔒 | Get a quote for an Alpha trade |
createAlphaOrder(params) | 🔒 | Place an Alpha market order |
getAlphaOrders(params) | 🔒 | List Alpha orders |
getAlphaOrder(params) | 🔒 | Get a single Alpha order |
OTC
OTC
| Method | Auth | Description |
|---|---|---|
createOTCQuote(params) | 🔒 | Request an OTC quote |
createOTCFiatOrder(params) | 🔒 | Place a fiat OTC order |
createOTCStablecoinOrder(params) | 🔒 | Place a stablecoin OTC order |
getOTCBankList() | 🔒 | Get registered bank accounts |
createOTCBank(params) | 🔒 | Register a new bank account |
cancelOTCOrder(params) | 🔒 | Cancel an OTC order |
getOTCFiatOrderList(params) | 🔒 | List fiat OTC orders |
getOTCStablecoinOrderList(params) | 🔒 | List stablecoin OTC orders |
getOTCFiatOrderDetail(params) | 🔒 | Get OTC order details |
markOTCOrderAsPaid(params) | 🔒 | Mark a fiat order as paid |
Flash Swap
Flash Swap
| Method | Auth | Description |
|---|---|---|
getFlashSwapCurrencyPairs(params) | — | List supported flash swap pairs |
submitFlashSwapOrder(params) | 🔒 | Execute a flash swap |
getFlashSwapOrders(params) | 🔒 | List flash swap orders |
getFlashSwapOrder(params) | 🔒 | Get a single flash swap order |
submitFlashSwapOrderPreview(params) | 🔒 | Preview a flash swap (get quote) |
Earn, Auto-Invest, and Lending
Earn, Auto-Invest, and Lending
The SDK includes a comprehensive set of earn and yield product endpoints:Simple Earn / Lending (Uni)
getLendingCurrencies()— list lendable currenciessubmitLendOrRedeemOrder(params)— lend or redeem assetsgetLendingOrders(params)— list lending ordersgetLendingRecords(params)— get lending historygetLendingInterestRecords(params)— get interest records
submitMultiLoanOrder(params)— create a multi-collateral loangetMultiLoanOrders(params)— list multi-loan ordersrepayMultiLoan(params)— repay a multi-collateral loangetMultiLoanRepayRecords(params)— get repayment recordsupdateMultiLoan(params)— update collateralgetMultiLoanSupportedCurrencies()— list supported currencies
getDualInvestmentProducts(params)— browse dual investment productsgetDualInvestmentOrders(params)— list orderssubmitDualInvestmentOrder(params)— place an ordergetDualOrderRefundPreview(params)— preview a refundsubmitDualOrderRefund(params)— request a refund
getEarnFixedTermProducts(params)— list fixed-term productscreateEarnFixedTermLend(params)— subscribe to a fixed-term productgetEarnFixedTermLends(params)— list your fixed-term positionscreateEarnFixedTermPreRedeem(params)— pre-redeem a fixed-term positiongetEarnFixedTermHistory(params)— get earn history
createAutoInvestPlan(params)— create a DCA planupdateAutoInvestPlan(params)— update a DCA planstopAutoInvestPlan(params)— stop a DCA plangetAutoInvestPlans(params)— list DCA plansgetAutoInvestPlanDetail(params)— get plan detailsgetAutoInvestOrders(params)— list DCA order executions
Complete Endpoint List
For the authoritative, always-up-to-date list of every method, its authentication requirement, HTTP method, and exact API endpoint path, refer to:docs/endpointFunctionList.md on GitHub