gate-api
v7.2.0
Published
NodeJS client for gate-api
Readme
[email protected]
TypeScript NodeJS client for gate-api.
Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading.
This SDK is automatically generated by the OpenAPI Generator project:
- API version: v4.106.0
- Package version:
- Build package: org.openapitools.codegen.languages.TypeScriptNodeClientCodegen For more information, please visit https://www.gate.com/page/contacts
Environment
- Node.js
Language level
- ES2017
It can be used in both TypeScript and JavaScript. In TypeScript, the definition should be automatically resolved via package.json. (Reference)
This package is targeting Node.js applications only, because it's not safe to store API secret in browser.
gateapi-js can be used in browser but with public endpoints only.
Versioning
Trying our best to follow the semantic versioning, while enjoying recent features provided by programming language and libraries, from 4.15.2, one major versioning difference will be introduced:
If extra code rewrite is required when you upgrade the SDK, such as:
- some outdated programming language version support is dropped
- API method signature has breaking changes.
the MAJOR version will be incremented, but the MINOR and PATCH version are still following REST API's instead of resetting to 0, so that you can recognize it has some breaking changes, but still getting the idea of from which REST API version the change is introduced.
For example, the previous REST API and SDK version are both 4.14.0. But if we decide to introduce some breaking changes in SDK along with REST API 4.15.2 upgrade, then the version of next SDK release will be 5.15.2(the MAJOR version is incremented to denote breaking changes, but the MINOR and PATCH version are identical to REST API's instead of resetting them to 0)
If MAJOR version is incremented, make sure you read the release note on Releases page
Installation
npm install gate-apiGetting Started
Please follow the installation instruction and execute the following TypeScript code:
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));Documentation for API Endpoints
All URIs are relative to https://api.gateio.ws/api/v4
Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- AccountApi | getAccountDetail | GET /account/detail | Retrieve user account information AccountApi | getAccountMainKeys | GET /account/main_keys | Query All Main Account Key Information AccountApi | getAccountRateLimit | GET /account/rate_limit | Get user transaction rate limit information AccountApi | listSTPGroups | GET /account/stp_groups | Query STP user groups created by the user AccountApi | createSTPGroup | POST /account/stp_groups | Create STP user group AccountApi | listSTPGroupsUsers | GET /account/stp_groups/{stp_id}/users | Query users in the STP user group AccountApi | addSTPGroupUsers | POST /account/stp_groups/{stp_id}/users | Add users to the STP user group AccountApi | deleteSTPGroupUsers | DELETE /account/stp_groups/{stp_id}/users | Delete users from the STP user group AccountApi | getDebitFee | GET /account/debit_fee | Query GT fee deduction configuration AccountApi | setDebitFee | POST /account/debit_fee | Configure GT fee deduction CollateralLoanApi | listCollateralLoanOrders | GET /loan/collateral/orders | Query collateral loan order list CollateralLoanApi | createCollateralLoan | POST /loan/collateral/orders | Place collateral loan order CollateralLoanApi | getCollateralLoanOrderDetail | GET /loan/collateral/orders/{order_id} | Query single order details CollateralLoanApi | repayCollateralLoan | POST /loan/collateral/repay | Collateral loan repayment CollateralLoanApi | listRepayRecords | GET /loan/collateral/repay_records | Query collateral loan repayment records CollateralLoanApi | listCollateralRecords | GET /loan/collateral/collaterals | Query collateral adjustment records CollateralLoanApi | operateCollateral | POST /loan/collateral/collaterals | Increase or redeem collateral CollateralLoanApi | getUserTotalAmount | GET /loan/collateral/total_amount | Query user's total borrowing and collateral amount CollateralLoanApi | getUserLtvInfo | GET /loan/collateral/ltv | Query user's collateralization ratio and remaining borrowable currencies CollateralLoanApi | listCollateralCurrencies | GET /loan/collateral/currencies | Query supported borrowing and collateral currencies DeliveryApi | listDeliveryContracts | GET /delivery/{settle}/contracts | Query all futures contracts DeliveryApi | getDeliveryContract | GET /delivery/{settle}/contracts/{contract} | Query single contract information DeliveryApi | listDeliveryOrderBook | GET /delivery/{settle}/order_book | Query futures market depth information DeliveryApi | listDeliveryTrades | GET /delivery/{settle}/trades | Futures market transaction records DeliveryApi | listDeliveryCandlesticks | GET /delivery/{settle}/candlesticks | Futures market K-line chart DeliveryApi | listDeliveryTickers | GET /delivery/{settle}/tickers | Get all futures trading statistics DeliveryApi | listDeliveryInsuranceLedger | GET /delivery/{settle}/insurance | Futures market insurance fund history DeliveryApi | listDeliveryAccounts | GET /delivery/{settle}/accounts | Get futures account DeliveryApi | listDeliveryAccountBook | GET /delivery/{settle}/account_book | Query futures account change history DeliveryApi | listDeliveryPositions | GET /delivery/{settle}/positions | Get user position list DeliveryApi | getDeliveryPosition | GET /delivery/{settle}/positions/{contract} | Get single position information DeliveryApi | updateDeliveryPositionMargin | POST /delivery/{settle}/positions/{contract}/margin | Update position margin DeliveryApi | updateDeliveryPositionLeverage | POST /delivery/{settle}/positions/{contract}/leverage | Update position leverage DeliveryApi | updateDeliveryPositionRiskLimit | POST /delivery/{settle}/positions/{contract}/risk_limit | Update position risk limit DeliveryApi | listDeliveryOrders | GET /delivery/{settle}/orders | Query futures order list DeliveryApi | createDeliveryOrder | POST /delivery/{settle}/orders | Place futures order DeliveryApi | cancelDeliveryOrders | DELETE /delivery/{settle}/orders | Cancel all orders with 'open' status DeliveryApi | getDeliveryOrder | GET /delivery/{settle}/orders/{order_id} | Query single order details DeliveryApi | cancelDeliveryOrder | DELETE /delivery/{settle}/orders/{order_id} | Cancel single order DeliveryApi | getMyDeliveryTrades | GET /delivery/{settle}/my_trades | Query personal trading records DeliveryApi | listDeliveryPositionClose | GET /delivery/{settle}/position_close | Query position close history DeliveryApi | listDeliveryLiquidates | GET /delivery/{settle}/liquidates | Query liquidation history DeliveryApi | listDeliverySettlements | GET /delivery/{settle}/settlements | Query settlement records DeliveryApi | listDeliveryRiskLimitTiers | GET /delivery/{settle}/risk_limit_tiers | Query risk limit tiers DeliveryApi | listPriceTriggeredDeliveryOrders | GET /delivery/{settle}/price_orders | Query auto order list DeliveryApi | createPriceTriggeredDeliveryOrder | POST /delivery/{settle}/price_orders | Create price-triggered order DeliveryApi | cancelPriceTriggeredDeliveryOrderList | DELETE /delivery/{settle}/price_orders | Cancel all auto orders DeliveryApi | getPriceTriggeredDeliveryOrder | GET /delivery/{settle}/price_orders/{order_id} | Query single auto order details DeliveryApi | cancelPriceTriggeredDeliveryOrder | DELETE /delivery/{settle}/price_orders/{order_id} | Cancel single auto order EarnApi | swapETH2 | POST /earn/staking/eth2/swap | ETH swap EarnApi | rateListETH2 | GET /earn/staking/eth2/rate_records | GTETH historical return rate query EarnApi | listDualInvestmentPlans | GET /earn/dual/investment_plan | Dual Investment product list EarnApi | listDualOrders | GET /earn/dual/orders | Dual Investment order list EarnApi | placeDualOrder | POST /earn/dual/orders | Place Dual Investment order EarnApi | listStructuredProducts | GET /earn/structured/products | Structured Product List EarnApi | listStructuredOrders | GET /earn/structured/orders | Structured Product Order List EarnApi | placeStructuredOrder | POST /earn/structured/orders | Place Structured Product Order EarnApi | findCoin | GET /earn/staking/coins | Staking coins EarnApi | swapStakingCoin | POST /earn/staking/swap | On-chain token swap for earned coins EarnApi | orderList | GET /earn/staking/order_list | List of on-chain coin-earning orders EarnApi | awardList | GET /earn/staking/award_list | On-chain coin-earning dividend records EarnApi | assetList | GET /earn/staking/assets | On-chain coin-earning assets EarnUniApi | listUniCurrencies | GET /earn/uni/currencies | Query lending currency list EarnUniApi | getUniCurrency | GET /earn/uni/currencies/{currency} | Query single lending currency details EarnUniApi | listUserUniLends | GET /earn/uni/lends | Query user's lending order list EarnUniApi | createUniLend | POST /earn/uni/lends | Create lending or redemption EarnUniApi | changeUniLend | PATCH /earn/uni/lends | Amend user lending information EarnUniApi | listUniLendRecords | GET /earn/uni/lend_records | Query lending transaction records EarnUniApi | getUniInterest | GET /earn/uni/interests/{currency} | Query user's total interest income for specified currency EarnUniApi | listUniInterestRecords | GET /earn/uni/interest_records | Query user dividend records EarnUniApi | getUniInterestStatus | GET /earn/uni/interest_status/{currency} | Query currency interest compounding status EarnUniApi | listUniChart | GET /earn/uni/chart | UniLoan currency annualized trend chart EarnUniApi | listUniRate | GET /earn/uni/rate | Currency estimated annualized interest rate FlashSwapApi | listFlashSwapCurrencyPair | GET /flash_swap/currency_pairs | List All Supported Currency Pairs In Flash Swap FlashSwapApi | listFlashSwapOrders | GET /flash_swap/orders | Query flash swap order list FlashSwapApi | createFlashSwapOrder | POST /flash_swap/orders | Create a flash swap order FlashSwapApi | getFlashSwapOrder | GET /flash_swap/orders/{order_id} | Query single flash swap order FlashSwapApi | previewFlashSwapOrder | POST /flash_swap/orders/preview | Flash swap order preview FuturesApi | listFuturesContracts | GET /futures/{settle}/contracts | Query all futures contracts FuturesApi | getFuturesContract | GET /futures/{settle}/contracts/{contract} | Query single contract information FuturesApi | listFuturesOrderBook | GET /futures/{settle}/order_book | Query futures market depth information FuturesApi | listFuturesTrades | GET /futures/{settle}/trades | Futures market transaction records FuturesApi | listFuturesCandlesticks | GET /futures/{settle}/candlesticks | Futures market K-line chart FuturesApi | listFuturesPremiumIndex | GET /futures/{settle}/premium_index | Premium Index K-line chart FuturesApi | listFuturesTickers | GET /futures/{settle}/tickers | Get all futures trading statistics FuturesApi | listFuturesFundingRateHistory | GET /futures/{settle}/funding_rate | Futures market historical funding rate FuturesApi | listFuturesInsuranceLedger | GET /futures/{settle}/insurance | Futures market insurance fund history FuturesApi | listContractStats | GET /futures/{settle}/contract_stats | Futures statistics FuturesApi | getIndexConstituents | GET /futures/{settle}/index_constituents/{index} | Query index constituents FuturesApi | listLiquidatedOrders | GET /futures/{settle}/liq_orders | Query liquidation order history FuturesApi | listFuturesRiskLimitTiers | GET /futures/{settle}/risk_limit_tiers | Query risk limit tiers FuturesApi | listFuturesAccounts | GET /futures/{settle}/accounts | Get futures account FuturesApi | listFuturesAccountBook | GET /futures/{settle}/account_book | Query futures account change history FuturesApi | listPositions | GET /futures/{settle}/positions | Get user position list FuturesApi | getPosition | GET /futures/{settle}/positions/{contract} | Get single position information FuturesApi | updatePositionMargin | POST /futures/{settle}/positions/{contract}/margin | Update position margin FuturesApi | updatePositionLeverage | POST /futures/{settle}/positions/{contract}/leverage | Update position leverage FuturesApi | updatePositionCrossMode | POST /futures/{settle}/positions/cross_mode | Switch Position Margin Mode FuturesApi | updateDualCompPositionCrossMode | POST /futures/{settle}/dual_comp/positions/cross_mode | Switch Between Cross and Isolated Margin Modes Under Hedge Mode FuturesApi | updatePositionRiskLimit | POST /futures/{settle}/positions/{contract}/risk_limit | Update position risk limit FuturesApi | setDualMode | POST /futures/{settle}/dual_mode | Set position mode FuturesApi | getDualModePosition | GET /futures/{settle}/dual_comp/positions/{contract} | Get position information in Hedge Mode FuturesApi | updateDualModePositionMargin | POST /futures/{settle}/dual_comp/positions/{contract}/margin | Update position margin in Hedge Mode FuturesApi | updateDualModePositionLeverage | POST /futures/{settle}/dual_comp/positions/{contract}/leverage | Update position leverage in Hedge Mode FuturesApi | updateDualModePositionRiskLimit | POST /futures/{settle}/dual_comp/positions/{contract}/risk_limit | Update position risk limit in Hedge Mode FuturesApi | listFuturesOrders | GET /futures/{settle}/orders | Query futures order list FuturesApi | createFuturesOrder | POST /futures/{settle}/orders | Place futures order FuturesApi | cancelFuturesOrders | DELETE /futures/{settle}/orders | Cancel all orders with 'open' status FuturesApi | getOrdersWithTimeRange | GET /futures/{settle}/orders_timerange | Query futures order list by time range FuturesApi | createBatchFuturesOrder | POST /futures/{settle}/batch_orders | Place batch futures orders FuturesApi | getFuturesOrder | GET /futures/{settle}/orders/{order_id} | Query single order details FuturesApi | amendFuturesOrder | PUT /futures/{settle}/orders/{order_id} | Amend single order FuturesApi | cancelFuturesOrder | DELETE /futures/{settle}/orders/{order_id} | Cancel single order FuturesApi | getMyTrades | GET /futures/{settle}/my_trades | Query personal trading records FuturesApi | getMyTradesWithTimeRange | GET /futures/{settle}/my_trades_timerange | Query personal trading records by time range FuturesApi | listPositionClose | GET /futures/{settle}/position_close | Query position close history FuturesApi | listLiquidates | GET /futures/{settle}/liquidates | Query liquidation history FuturesApi | listAutoDeleverages | GET /futures/{settle}/auto_deleverages | Query ADL auto-deleveraging order information FuturesApi | countdownCancelAllFutures | POST /futures/{settle}/countdown_cancel_all | Countdown cancel orders FuturesApi | getFuturesFee | GET /futures/{settle}/fee | Query futures market trading fee rates FuturesApi | cancelBatchFutureOrders | POST /futures/{settle}/batch_cancel_orders | Cancel batch orders by specified ID list FuturesApi | amendBatchFutureOrders | POST /futures/{settle}/batch_amend_orders | Batch modify orders by specified IDs FuturesApi | getFuturesRiskLimitTable | GET /futures/{settle}/risk_limit_table | Query risk limit table by table_id FuturesApi | createFuturesBBOOrder | POST /futures/{settle}/bbo_orders | Level-based BBO Contract Order Placement FuturesApi | listPriceTriggeredOrders | GET /futures/{settle}/price_orders | Query auto order list FuturesApi | createPriceTriggeredOrder | POST /futures/{settle}/price_orders | Create price-triggered order FuturesApi | cancelPriceTriggeredOrderList | DELETE /futures/{settle}/price_orders | Cancel all auto orders FuturesApi | getPriceTriggeredOrder | GET /futures/{settle}/price_orders/{order_id} | Query single auto order details FuturesApi | updatePriceTriggeredOrder | PUT /futures/{settle}/price_orders/{order_id} | Modify a Single Auto Order FuturesApi | cancelPriceTriggeredOrder | DELETE /futures/{settle}/price_orders/{order_id} | Cancel single auto order MarginApi | listMarginAccounts | GET /margin/accounts | Margin account list MarginApi | listMarginAccountBook | GET /margin/account_book | Query margin account balance change history MarginApi | listFundingAccounts | GET /margin/funding_accounts | Funding account list MarginApi | getAutoRepayStatus | GET /margin/auto_repay | Query user auto repayment settings MarginApi | setAutoRepay | POST /margin/auto_repay | Update user auto repayment settings MarginApi | getMarginTransferable | GET /margin/transferable | Get maximum transferable amount for isolated margin MarginApi | getUserMarginTier | GET /margin/user/loan_margin_tiers | Query user's own leverage lending tiers in current market MarginApi | getMarketMarginTier | GET /margin/loan_margin_tiers | Query current market leverage lending tiers MarginApi | setUserMarketLeverage | POST /margin/leverage/user_market_setting | Set user market leverage multiplier MarginApi | listMarginUserAccount | GET /margin/user/account | Query user's isolated margin account list MarginApi | listCrossMarginLoans | GET /margin/cross/loans | Query cross margin borrow history (deprecated) MarginApi | listCrossMarginRepayments | GET /margin/cross/repayments | Retrieve cross margin repayments. (deprecated) MarginUniApi | listUniCurrencyPairs | GET /margin/uni/currency_pairs | List lending markets MarginUniApi | getUniCurrencyPair | GET /margin/uni/currency_pairs/{currency_pair} | Get lending market details MarginUniApi | getMarginUniEstimateRate | GET /margin/uni/estimate_rate | Estimate interest rate for isolated margin currencies MarginUniApi | listUniLoans | GET /margin/uni/loans | Query loans MarginUniApi | createUniLoan | POST /margin/uni/loans | Borrow or repay MarginUniApi | listUniLoanRecords | GET /margin/uni/loan_records | Query loan records MarginUniApi | listUniLoanInterestRecords | GET /margin/uni/interest_records | Query interest deduction records MarginUniApi | getUniBorrowable | GET /margin/uni/borrowable | Query maximum borrowable amount by currency MultiCollateralLoanApi | listMultiCollateralOrders | GET /loan/multi_collateral/orders | Query multi-currency collateral order list MultiCollateralLoanApi | createMultiCollateral | POST /loan/multi_collateral/orders | Place multi-currency collateral order MultiCollateralLoanApi | getMultiCollateralOrderDetail | GET /loan/multi_collateral/orders/{order_id} | Query order details MultiCollateralLoanApi | listMultiRepayRecords | GET /loan/multi_collateral/repay | Query multi-currency collateral repayment records MultiCollateralLoanApi | repayMultiCollateralLoan | POST /loan/multi_collateral/repay | Multi-currency collateral repayment MultiCollateralLoanApi | listMultiCollateralRecords | GET /loan/multi_collateral/mortgage | Query collateral adjustment records MultiCollateralLoanApi | operateMultiCollateral | POST /loan/multi_collateral/mortgage | Add or withdraw collateral MultiCollateralLoanApi | listUserCurrencyQuota | GET /loan/multi_collateral/currency_quota | Query user's collateral and borrowing currency quota information MultiCollateralLoanApi | listMultiCollateralCurrencies | GET /loan/multi_collateral/currencies | Query supported borrowing and collateral currencies for multi-currency collateral MultiCollateralLoanApi | getMultiCollateralLtv | GET /loan/multi_collateral/ltv | Query collateralization ratio information MultiCollateralLoanApi | getMultiCollateralFixRate | GET /loan/multi_collateral/fixed_rate | Query currency's 7-day and 30-day fixed interest rates MultiCollateralLoanApi | getMultiCollateralCurrentRate | GET /loan/multi_collateral/current_rate | Query currency's current interest rate OptionsApi | listOptionsUnderlyings | GET /options/underlyings | List all underlying assets OptionsApi | listOptionsExpirations | GET /options/expirations | List all expiration dates OptionsApi | listOptionsContracts | GET /options/contracts | List all contracts for specified underlying and expiration date OptionsApi | getOptionsContract | GET /options/contracts/{contract} | Query specified contract details OptionsApi | listOptionsSettlements | GET /options/settlements | List settlement history OptionsApi | getOptionsSettlement | GET /options/settlements/{contract} | Get specified contract settlement information OptionsApi | listMyOptionsSettlements | GET /options/my_settlements | Query personal settlement records OptionsApi | listOptionsOrderBook | GET /options/order_book | Query options contract order book OptionsApi | listOptionsTickers | GET /options/tickers | Query options market ticker information OptionsApi | listOptionsUnderlyingTickers | GET /options/underlying/tickers/{underlying} | Query underlying ticker information OptionsApi | listOptionsCandlesticks | GET /options/candlesticks | Options contract market candlestick chart OptionsApi | listOptionsUnderlyingCandlesticks | GET /options/underlying/candlesticks | Underlying index price candlestick chart OptionsApi | listOptionsTrades | GET /options/trades | Market trade records OptionsApi | listOptionsAccount | GET /options/accounts | Query account information OptionsApi | listOptionsAccountBook | GET /options/account_book | Query account change history OptionsApi | listOptionsPositions | GET /options/positions | List user's positions of specified underlying OptionsApi | getOptionsPosition | GET /options/positions/{contract} | Get specified contract position OptionsApi | listOptionsPositionClose | GET /options/position_close | List user's liquidation history of specified underlying OptionsApi | listOptionsOrders | GET /options/orders | List options orders OptionsApi | createOptionsOrder | POST /options/orders | Create an options order OptionsApi | cancelOptionsOrders | DELETE /options/orders | Cancel all orders with 'open' status OptionsApi | getOptionsOrder | GET /options/orders/{order_id} | Query single order details OptionsApi | cancelOptionsOrder | DELETE /options/orders/{order_id} | Cancel single order OptionsApi | countdownCancelAllOptions | POST /options/countdown_cancel_all | Countdown cancel orders OptionsApi | listMyOptionsTrades | GET /options/my_trades | Query personal trading records OptionsApi | getOptionsMMP | GET /options/mmp | MMP Query. OptionsApi | setOptionsMMP | POST /options/mmp | MMP Settings OptionsApi | resetOptionsMMP | POST /options/mmp/reset | MMP Reset RebateApi | agencyTransactionHistory | GET /rebate/agency/transaction_history | Broker obtains transaction history of recommended users RebateApi | agencyCommissionsHistory | GET /rebate/agency/commission_history | Broker obtains rebate history of recommended users RebateApi | partnerTransactionHistory | GET /rebate/partner/transaction_history | Partner obtains transaction history of recommended users RebateApi | partnerCommissionsHistory | GET /rebate/partner/commission_history | Partner obtains rebate records of recommended users RebateApi | partnerSubList | GET /rebate/partner/sub_list | Partner subordinate list RebateApi | rebateBrokerCommissionHistory | GET /rebate/broker/commission_history | Broker obtains user's rebate records RebateApi | rebateBrokerTransactionHistory | GET /rebate/broker/transaction_history | Broker obtains user's trading history RebateApi | rebateUserInfo | GET /rebate/user/info | User obtains rebate information RebateApi | userSubRelation | GET /rebate/user/sub_relation | User subordinate relationship SpotApi | listCurrencies | GET /spot/currencies | Query all currency information SpotApi | getCurrency | GET /spot/currencies/{currency} | Query single currency information SpotApi | listCurrencyPairs | GET /spot/currency_pairs | Query all supported currency pairs SpotApi | getCurrencyPair | GET /spot/currency_pairs/{currency_pair} | Query single currency pair details SpotApi | listTickers | GET /spot/tickers | Get currency pair ticker information SpotApi | listOrderBook | GET /spot/order_book | Get market depth information SpotApi | listTrades | GET /spot/trades | Query market transaction records SpotApi | listCandlesticks | GET /spot/candlesticks | Market K-line chart SpotApi | getFee | GET /spot/fee | Query account fee rates SpotApi | getBatchSpotFee | GET /spot/batch_fee | Batch query account fee rates SpotApi | listSpotAccounts | GET /spot/accounts | List spot trading accounts SpotApi | listSpotAccountBook | GET /spot/account_book | Query spot account transaction history SpotApi | createBatchOrders | POST /spot/batch_orders | Batch place orders SpotApi | listAllOpenOrders | GET /spot/open_orders | List all open orders SpotApi | createCrossLiquidateOrder | POST /spot/cross_liquidate_orders | Close position when cross-currency is disabled SpotApi | listOrders | GET /spot/orders | List orders SpotApi | createOrder | POST /spot/orders | Create an order SpotApi | cancelOrders | DELETE /spot/orders | Cancel all `open` orders in specified currency pair SpotApi | cancelBatchOrders | POST /spot/cancel_batch_orders | Cancel batch orders by specified ID list SpotApi | getOrder | GET /spot/orders/{order_id} | Query single order details SpotApi | cancelOrder | DELETE /spot/orders/{order_id} | Cancel single order SpotApi | amendOrder | PATCH /spot/orders/{order_id} | Amend single order SpotApi | listMyTrades | GET /spot/my_trades | Query personal trading records SpotApi | getSystemTime | GET /spot/time | Get server current time SpotApi | countdownCancelAllSpot | POST /spot/countdown_cancel_all | Countdown cancel orders SpotApi | amendBatchOrders | POST /spot/amend_batch_orders | Batch modification of orders SpotApi | getSpotInsuranceHistory | GET /spot/insurance_history | Query spot insurance fund historical data SpotApi | listSpotPriceTriggeredOrders | GET /spot/price_orders | Query running auto order list SpotApi | createSpotPriceTriggeredOrder | POST /spot/price_orders | Create price-triggered order SpotApi | cancelSpotPriceTriggeredOrderList | DELETE /spot/price_orders | Cancel all auto orders SpotApi | getSpotPriceTriggeredOrder | GET /spot/price_orders/{order_id} | Query single auto order details SpotApi | cancelSpotPriceTriggeredOrder | DELETE /spot/price_orders/{order_id} | Cancel single auto order SubAccountApi | listSubAccounts | GET /sub_accounts | List sub-accounts SubAccountApi | createSubAccounts | POST /sub_accounts | Create a new sub-account SubAccountApi | getSubAccount | GET /sub_accounts/{user_id} | Get sub-account SubAccountApi | listSubAccountKeys | GET /sub_accounts/{user_id}/keys | List all API key pairs of the sub-account SubAccountApi | createSubAccountKeys | POST /sub_accounts/{user_id}/keys | Create new sub-account API key pair SubAccountApi | getSubAccountKey | GET /sub_accounts/{user_id}/keys/{key} | Get specific API key pair of the sub-account SubAccountApi | updateSubAccountKeys | PUT /sub_accounts/{user_id}/keys/{key} | Update sub-account API key pair SubAccountApi | deleteSubAccountKeys | DELETE /sub_accounts/{user_id}/keys/{key} | Delete sub-account API key pair SubAccountApi | lockSubAccount | POST /sub_accounts/{user_id}/lock | Lock sub-account SubAccountApi | unlockSubAccount | POST /sub_accounts/{user_id}/unlock | Unlock sub-account SubAccountApi | listUnifiedMode | GET /sub_accounts/unified_mode | Get sub-account mode UnifiedApi | listUnifiedAccounts | GET /unified/accounts | Get unified account information UnifiedApi | getUnifiedBorrowable | GET /unified/borrowable | Query maximum borrowable amount for unified account UnifiedApi | getUnifiedTransferable | GET /unified/transferable | Query maximum transferable amount for unified account UnifiedApi | getUnifiedTransferables | GET /unified/transferables | Batch query maximum transferable amount for unified accounts. Each currency shows the maximum value. After user withdrawal, the transferable amount for all currencies will change UnifiedApi | getUnifiedBorrowableList | GET /unified/batch_borrowable | Batch query unified account maximum borrowable amount UnifiedApi | listUnifiedLoans | GET /unified/loans | Query loans UnifiedApi | createUnifiedLoan | POST /unified/loans | Borrow or repay UnifiedApi | listUnifiedLoanRecords | GET /unified/loan_records | Query loan records UnifiedApi | listUnifiedLoanInterestRecords | GET /unified/interest_records | Query interest deduction records UnifiedApi | getUnifiedRiskUnits | GET /unified/risk_units | Get user risk unit details UnifiedApi | getUnifiedMode | GET /unified/unified_mode | Query mode of the unified account UnifiedApi | setUnifiedMode | PUT /unified/unified_mode | Set unified account mode UnifiedApi | getUnifiedEstimateRate | GET /unified/estimate_rate | Query unified account estimated interest rate UnifiedApi | listCurrencyDiscountTiers | GET /unified/currency_discount_tiers | Query unified account tiered UnifiedApi | listLoanMarginTiers | GET /unified/loan_margin_tiers | Query unified account tiered loan margin UnifiedApi | calculatePortfolioMargin | POST /unified/portfolio_calculator | Portfolio margin calculator UnifiedApi | getUserLeverageCurrencyConfig | GET /unified/leverage/user_currency_config | Maximum and minimum currency leverage that can be set UnifiedApi | getUserLeverageCurrencySetting | GET /unified/leverage/user_currency_setting | Get user currency leverage UnifiedApi | setUserLeverageCurrencySetting | POST /unified/leverage/user_currency_setting | Set loan currency leverage UnifiedApi | listUnifiedCurrencies | GET /unified/currencies | List of loan currencies supported by unified account UnifiedApi | getHistoryLoanRate | GET /unified/history_loan_rate | Get historical lending rates UnifiedApi | setUnifiedCollateral | POST /unified/collateral_currencies | Set collateral currency WalletApi | listCurrencyChains | GET /wallet/currency_chains | Query chains supported for specified currency WalletApi | getDepositAddress | GET /wallet/deposit_address | Generate currency deposit address WalletApi | listWithdrawals | GET /wallet/withdrawals | Get withdrawal records WalletApi | listDeposits | GET /wallet/deposits | Get deposit records WalletApi | transfer | POST /wallet/transfers | Transfer between trading accounts WalletApi | listSubAccountTransfers | GET /wallet/sub_account_transfers | Get transfer records between main and sub accounts WalletApi | transferWithSubAccount | POST /wallet/sub_account_transfers | Transfer between main and sub accounts WalletApi | subAccountToSubAccount | POST /wallet/sub_account_to_sub_account | Transfer between sub-accounts WalletApi | getTransferOrderStatus | GET /wallet/order_status | Transfer status query WalletApi | listWithdrawStatus | GET /wallet/withdraw_status | Query withdrawal status WalletApi | listSubAccountBalances | GET /wallet/sub_account_balances | Query sub-account balance information WalletApi | listSubAccountMarginBalances | GET /wallet/sub_account_margin_balances | Query sub-account isolated margin account balance information WalletApi | listSubAccountFuturesBalances | GET /wallet/sub_account_futures_balances | Query sub-account perpetual futures account balance information WalletApi | listSubAccountCrossMarginBalances | GET /wallet/sub_account_cross_margin_balances | Query sub-account cross margin account balance information WalletApi | listSavedAddress | GET /wallet/saved_address | Query withdrawal address whitelist WalletApi | getTradeFee | GET /wallet/fee | Query personal trading fees WalletApi | getTotalBalance | GET /wallet/total_balance | Query personal account totals WalletApi | listSmallBalance | GET /wallet/small_balance | Get list of convertible small balance currencies WalletApi | convertSmallBalance | POST /wallet/small_balance | Convert small balance currency WalletApi | listSmallBalanceHistory | GET /wallet/small_balance_history | Get convertible small balance currency history WalletApi | listPushOrders | GET /wallet/push | Get UID transfer history WithdrawalApi | withdraw | POST /withdrawals | Withdraw WithdrawalApi | withdrawPushOrder | POST /withdrawals/push | UID transfer WithdrawalApi | cancelWithdrawal | DELETE /withdrawals/{withdrawal_id} | Cancel withdrawal with specified ID
Documentation for Models
- AccountBalance
- AccountDetail
- AccountDetailKey
- AccountKeyInfo
- AccountKeyInfoPerms
- AccountRateLimit
- AgencyCommission
- AgencyCommissionHistory
- AgencyTransaction
- AgencyTransactionHistory
- AutoRepaySetting
- AwardListStruct
- AwardListStructList
- BatchAmendItem
- BatchAmendOrderReq
- BatchFuturesOrder
- BatchOrder
- BorrowCurrencyInfo
- BrokerCommission
- BrokerCommission1
- BrokerCommissionSubBrokerInfo
- BrokerTransaction
- BrokerTransaction1
- CancelBatchOrder
- CancelOrderResult
- CollateralAdjust
- CollateralAdjustRes
- CollateralAlign
- CollateralCurrency
- CollateralCurrencyInfo
- CollateralCurrencyRes
- CollateralCurrentRate
- CollateralFixRate
- CollateralLoanCurrency
- CollateralLtv
- CollateralOrder
- CollateralRecord
- Contract
- ContractStat
- ConvertSmallBalance
- CountdownCancelAllFuturesTask
- CountdownCancelAllOptionsTask
- CountdownCancelAllSpotTask
- CreateCollateralOrder
- CreateMultiCollateralOrder
- CreateUniLend
- CreateUniLoan
- CrossMarginBalance
- CrossMarginLoan
- CrossMarginRepayment
- Currency
- CurrencyChain
- CurrencyPair
- CurrencyQuota
- DebitFee
- DeliveryAccount
- DeliveryAccountBook
- DeliveryCandlestick
- DeliveryContract
- DeliveryLimitRiskTiers
- DeliveryLiquidate
- DeliveryMyTrade
- DeliveryOrder
- DeliveryOrderBook
- DeliveryPosition
- DeliveryPositionClose
- DeliverySettlement
- DeliveryTicker
- DeliveryTrade
- DepositAddress
- DepositRecord
- DualGetOrders
- DualGetPlans
- Eth2RateList
- Eth2Swap
- FindCoin
- FlashSwapCurrencyPair
- FlashSwapOrder
- FlashSwapOrderPreview
- FlashSwapOrderRequest
- FlashSwapPreviewRequest
- FundingAccount
- FundingRateRecord
- FutureCancelOrderResult
- FuturesAccount
- FuturesAccountBook
- FuturesAccountHistory
- FuturesAutoDeleverage
- FuturesBBOOrder
- FuturesBatchAmendOrderRequest
- FuturesCandlestick
- FuturesFee
- FuturesIndexConstituents
- FuturesInitialOrder
- FuturesLimitRiskTiers
- FuturesLiqOrder
- FuturesLiquidate
- FuturesOrder
- FuturesOrderAmendment
- FuturesOrderBook
- FuturesOrderBookItem
- FuturesOrderBookItem1
- FuturesPositionCrossMode
- FuturesPremiumIndex
- FuturesPriceTrigger
- FuturesPriceTriggeredOrder
- FuturesRiskLimitTier
- FuturesTicker
- FuturesTrade
- FuturesUpdatePriceTriggeredOrder
- IndexConstituent
- InlineObject
- InlineResponse200
- InlineResponse2001
- InsuranceRecord
- LedgerRecord
- LiquidateOrder
- MarginAccount
- MarginAccountBook
- MarginAccountCurrency
- MarginLeverageTier
- MarginMarketLeverage
- MarginTiers
- MarginTransferable
- MaxUniBorrowable
- MockFuturesOrder
- MockFuturesPosition
- MockMarginResult
- MockOptionsOrder
- MockOptionsPosition
- MockRiskUnit
- MockSpotBalance
- MockSpotOrder
- MultiChainAddressItem
- MultiCollateralCurrency
- MultiCollateralItem
- MultiCollateralOrder
- MultiCollateralRecord
- MultiCollateralRecordCurrency
- MultiLoanItem
- MultiLoanRepayItem
- MultiRepayRecord
- MultiRepayResp
- MyFuturesTrade
- MyFuturesTradeTimeRange
- OpenOrders
- OptionsAccount
- OptionsAccountBook
- OptionsCandlestick
- OptionsContract
- OptionsMMP
- OptionsMMPReset
- OptionsMySettlements
- OptionsMyTrade
- OptionsOrder
- OptionsPosition
- OptionsPositionClose
- OptionsPositionCloseOrder
- OptionsSettlement
- OptionsTicker
- OptionsUnderlying
- OptionsUnderlyingTicker
- Order
- OrderBook
- OrderCancel
- OrderListStruct
- OrderListStructList
- OrderPatch
- OrderResp
- PartnerCommissionHistory
- PartnerSub
- PartnerSubList
- PartnerTransactionHistory
- PatchUniLend
- PlaceDualInvestmentOrder
- Position
- PositionClose
- PositionCloseOrder
- ProfitLossRange
- RebateUserInfo
- RepayCurrencyRes
- RepayLoan
- RepayMultiLoan
- RepayRecord
- RepayRecordCurrency
- RepayRecordLeftInterest
- RepayRecordRepaidCurrency
- RepayRecordTotalInterest
- RepayResp
- RiskUnits
- SavedAddress
- SmallBalance
- SmallBalanceHistory
- SpotAccount
- SpotAccountBook
- SpotCurrencyChain
- SpotFee
- SpotInsuranceHistory
- SpotPricePutOrder
- SpotPriceTrigger
- SpotPriceTriggeredOrder
- StpGroup
- StpGroupUser
- StructuredBuy
- StructuredGetProjectList
- StructuredOrderList
- SubAccount
- SubAccountBalance
- SubAccountCrossMarginBalance
- SubAccountFuturesBalance
- SubAccountKey
- SubAccountKeyPerms
- SubAccountMarginBalance
- SubAccountToSubAccount
- SubAccountTransfer
- SubAccountTransferRecordItem
- SubCrossMarginAccount
- SubUserMode
- SwapCoin
- SwapCoinStruct
- SystemTime
- Ticker
- TotalBalance
- Trade
- TradeFee
- TransactionID
- Transfer
- TransferOrderStatus
- TransferablesResult
- TriggerOrderResponse
- TriggerTime
- UidPushOrder
- UidPushWithdrawal
- UidPushWithdrawalResp
- UniCurrency
- UniCurrencyInterest
- UniCurrencyPair
- UniInterestRecord
- UniLend
- UniLendInterest
- UniLendRecord
- UniLoan
- UniLoanInterestRecord
- UniLoanRecord
- UnifiedAccount
- UnifiedBalance
- UnifiedBorrowable
- UnifiedBorrowable1
- UnifiedCollateralReq
- UnifiedCollateralRes
- UnifiedCurrency
- UnifiedDiscount
- UnifiedDiscountTiers
- UnifiedHistoryLoanRate
- UnifiedHistoryLoanRateRates
- UnifiedLeverageConfig
- UnifiedLeverageSetting
- UnifiedLoan
- UnifiedLoanRecord
- UnifiedLoanResult
- UnifiedMarginTiers
- UnifiedModeSet
- UnifiedPortfolioInput
- UnifiedPortfolioOutput
- UnifiedRiskUnits
- UnifiedSettings
- UnifiedTransferable
- UserLtvInfo
- UserSub
- UserSubRelation
- UserTotalAmount
- WithdrawStatus
- WithdrawalRecord
- WithdrawalsDel
Documentation for Authorization
Authentication schemes defined for the API:
apiv4
- Type: Gate APIv4
https://www.gate.com/docs/apiv4/en/index.html#apiv4-signed-request-requirements
