You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

gate-api

Package Overview
Dependencies
Maintainers
0
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gate-api

NodeJS client for gate-api

6.104.3
latest
Source
npmnpm
Version published
Weekly downloads
1.8K
3.67%
Maintainers
0
Weekly downloads
 
Created
Source

gate-api@6.104.3

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.104.3
  • 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-api

Getting 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

ClassMethodHTTP requestDescription
AccountApigetAccountDetailGET /account/detailRetrieve user account information
AccountApigetAccountRateLimitGET /account/rate_limitGet user transaction rate limit information
AccountApilistSTPGroupsGET /account/stp_groupsQuery STP user groups created by the user
AccountApicreateSTPGroupPOST /account/stp_groupsCreate STP user group
AccountApilistSTPGroupsUsersGET /account/stp_groups/{stp_id}/usersQuery users in the STP user group
AccountApiaddSTPGroupUsersPOST /account/stp_groups/{stp_id}/usersAdd users to the STP user group
AccountApideleteSTPGroupUsersDELETE /account/stp_groups/{stp_id}/usersDelete users from the STP user group
AccountApigetDebitFeeGET /account/debit_feeQuery GT fee deduction configuration
AccountApisetDebitFeePOST /account/debit_feeConfigure GT fee deduction
CollateralLoanApilistCollateralLoanOrdersGET /loan/collateral/ordersQuery collateral loan order list
CollateralLoanApicreateCollateralLoanPOST /loan/collateral/ordersPlace collateral loan order
CollateralLoanApigetCollateralLoanOrderDetailGET /loan/collateral/orders/{order_id}Query single order details
CollateralLoanApirepayCollateralLoanPOST /loan/collateral/repayCollateral loan repayment
CollateralLoanApilistRepayRecordsGET /loan/collateral/repay_recordsQuery collateral loan repayment records
CollateralLoanApilistCollateralRecordsGET /loan/collateral/collateralsQuery collateral adjustment records
CollateralLoanApioperateCollateralPOST /loan/collateral/collateralsIncrease or redeem collateral
CollateralLoanApigetUserTotalAmountGET /loan/collateral/total_amountQuery user's total borrowing and collateral amount
CollateralLoanApigetUserLtvInfoGET /loan/collateral/ltvQuery user's collateralization ratio and remaining borrowable currencies
CollateralLoanApilistCollateralCurrenciesGET /loan/collateral/currenciesQuery supported borrowing and collateral currencies
DeliveryApilistDeliveryContractsGET /delivery/{settle}/contractsQuery all futures contracts
DeliveryApigetDeliveryContractGET /delivery/{settle}/contracts/{contract}Query single contract information
DeliveryApilistDeliveryOrderBookGET /delivery/{settle}/order_bookQuery futures market depth information
DeliveryApilistDeliveryTradesGET /delivery/{settle}/tradesFutures market transaction records
DeliveryApilistDeliveryCandlesticksGET /delivery/{settle}/candlesticksFutures market K-line chart
DeliveryApilistDeliveryTickersGET /delivery/{settle}/tickersGet all futures trading statistics
DeliveryApilistDeliveryInsuranceLedgerGET /delivery/{settle}/insuranceFutures market insurance fund history
DeliveryApilistDeliveryAccountsGET /delivery/{settle}/accountsGet futures account
DeliveryApilistDeliveryAccountBookGET /delivery/{settle}/account_bookQuery futures account change history
DeliveryApilistDeliveryPositionsGET /delivery/{settle}/positionsGet user position list
DeliveryApigetDeliveryPositionGET /delivery/{settle}/positions/{contract}Get single position information
DeliveryApiupdateDeliveryPositionMarginPOST /delivery/{settle}/positions/{contract}/marginUpdate position margin
DeliveryApiupdateDeliveryPositionLeveragePOST /delivery/{settle}/positions/{contract}/leverageUpdate position leverage
DeliveryApiupdateDeliveryPositionRiskLimitPOST /delivery/{settle}/positions/{contract}/risk_limitUpdate position risk limit
DeliveryApilistDeliveryOrdersGET /delivery/{settle}/ordersQuery futures order list
DeliveryApicreateDeliveryOrderPOST /delivery/{settle}/ordersPlace futures order
DeliveryApicancelDeliveryOrdersDELETE /delivery/{settle}/ordersCancel all orders with 'open' status
DeliveryApigetDeliveryOrderGET /delivery/{settle}/orders/{order_id}Query single order details
DeliveryApicancelDeliveryOrderDELETE /delivery/{settle}/orders/{order_id}Cancel single order
DeliveryApigetMyDeliveryTradesGET /delivery/{settle}/my_tradesQuery personal trading records
DeliveryApilistDeliveryPositionCloseGET /delivery/{settle}/position_closeQuery position close history
DeliveryApilistDeliveryLiquidatesGET /delivery/{settle}/liquidatesQuery liquidation history
DeliveryApilistDeliverySettlementsGET /delivery/{settle}/settlementsQuery settlement records
DeliveryApilistDeliveryRiskLimitTiersGET /delivery/{settle}/risk_limit_tiersQuery risk limit tiers
DeliveryApilistPriceTriggeredDeliveryOrdersGET /delivery/{settle}/price_ordersQuery auto order list
DeliveryApicreatePriceTriggeredDeliveryOrderPOST /delivery/{settle}/price_ordersCreate price-triggered order
DeliveryApicancelPriceTriggeredDeliveryOrderListDELETE /delivery/{settle}/price_ordersCancel all auto orders
DeliveryApigetPriceTriggeredDeliveryOrderGET /delivery/{settle}/price_orders/{order_id}Query single auto order details
DeliveryApicancelPriceTriggeredDeliveryOrderDELETE /delivery/{settle}/price_orders/{order_id}Cancel single auto order
EarnApiswapETH2POST /earn/staking/eth2/swapETH2 swap
EarnApirateListETH2GET /earn/staking/eth2/rate_recordsETH2 historical return rate query
EarnApilistDualInvestmentPlansGET /earn/dual/investment_planDual Investment product list
EarnApilistDualOrdersGET /earn/dual/ordersDual Investment order list
EarnApiplaceDualOrderPOST /earn/dual/ordersPlace Dual Investment order
EarnApilistStructuredProductsGET /earn/structured/productsStructured Product List
EarnApilistStructuredOrdersGET /earn/structured/ordersStructured Product Order List
EarnApiplaceStructuredOrderPOST /earn/structured/ordersPlace Structured Product Order
EarnApifindCoinGET /earn/staking/coinsStaking coins
EarnApiswapStakingCoinPOST /earn/staking/swapOn-chain token swap for earned coins
EarnUniApilistUniCurrenciesGET /earn/uni/currenciesQuery lending currency list
EarnUniApigetUniCurrencyGET /earn/uni/currencies/{currency}Query single lending currency details
EarnUniApilistUserUniLendsGET /earn/uni/lendsQuery user's lending order list
EarnUniApicreateUniLendPOST /earn/uni/lendsCreate lending or redemption
EarnUniApichangeUniLendPATCH /earn/uni/lendsAmend user lending information
EarnUniApilistUniLendRecordsGET /earn/uni/lend_recordsQuery lending transaction records
EarnUniApigetUniInterestGET /earn/uni/interests/{currency}Query user's total interest income for specified currency
EarnUniApilistUniInterestRecordsGET /earn/uni/interest_recordsQuery user dividend records
EarnUniApigetUniInterestStatusGET /earn/uni/interest_status/{currency}Query currency interest compounding status
EarnUniApilistUniChartGET /earn/uni/chartUniLoan currency annualized trend chart
EarnUniApilistUniRateGET /earn/uni/rateCurrency estimated annualized interest rate
FlashSwapApilistFlashSwapCurrencyPairGET /flash_swap/currency_pairsList All Supported Currency Pairs In Flash Swap
FlashSwapApilistFlashSwapOrdersGET /flash_swap/ordersQuery flash swap order list
FlashSwapApicreateFlashSwapOrderPOST /flash_swap/ordersCreate a flash swap order
FlashSwapApigetFlashSwapOrderGET /flash_swap/orders/{order_id}Query single flash swap order
FlashSwapApipreviewFlashSwapOrderPOST /flash_swap/orders/previewFlash swap order preview
FuturesApilistFuturesContractsGET /futures/{settle}/contractsQuery all futures contracts
FuturesApigetFuturesContractGET /futures/{settle}/contracts/{contract}Query single contract information
FuturesApilistFuturesOrderBookGET /futures/{settle}/order_bookQuery futures market depth information
FuturesApilistFuturesTradesGET /futures/{settle}/tradesFutures market transaction records
FuturesApilistFuturesCandlesticksGET /futures/{settle}/candlesticksFutures market K-line chart
FuturesApilistFuturesPremiumIndexGET /futures/{settle}/premium_indexPremium Index K-line chart
FuturesApilistFuturesTickersGET /futures/{settle}/tickersGet all futures trading statistics
FuturesApilistFuturesFundingRateHistoryGET /futures/{settle}/funding_rateFutures market historical funding rate
FuturesApilistFuturesInsuranceLedgerGET /futures/{settle}/insuranceFutures market insurance fund history
FuturesApilistContractStatsGET /futures/{settle}/contract_statsFutures statistics
FuturesApigetIndexConstituentsGET /futures/{settle}/index_constituents/{index}Query index constituents
FuturesApilistLiquidatedOrdersGET /futures/{settle}/liq_ordersQuery liquidation order history
FuturesApilistFuturesRiskLimitTiersGET /futures/{settle}/risk_limit_tiersQuery risk limit tiers
FuturesApilistFuturesAccountsGET /futures/{settle}/accountsGet futures account
FuturesApilistFuturesAccountBookGET /futures/{settle}/account_bookQuery futures account change history
FuturesApilistPositionsGET /futures/{settle}/positionsGet user position list
FuturesApigetPositionGET /futures/{settle}/positions/{contract}Get single position information
FuturesApiupdatePositionMarginPOST /futures/{settle}/positions/{contract}/marginUpdate position margin
FuturesApiupdatePositionLeveragePOST /futures/{settle}/positions/{contract}/leverageUpdate position leverage
FuturesApiupdatePositionCrossModePOST /futures/{settle}/positions/cross_modeSwitch Position Margin Mode
FuturesApiupdateDualCompPositionCrossModePOST /futures/{settle}/dual_comp/positions/cross_modeSwitch Between Cross and Isolated Margin Modes Under Hedge Mode
FuturesApiupdatePositionRiskLimitPOST /futures/{settle}/positions/{contract}/risk_limitUpdate position risk limit
FuturesApisetDualModePOST /futures/{settle}/dual_modeSet position mode
FuturesApigetDualModePositionGET /futures/{settle}/dual_comp/positions/{contract}Get position information in dual mode
FuturesApiupdateDualModePositionMarginPOST /futures/{settle}/dual_comp/positions/{contract}/marginUpdate position margin in dual mode
FuturesApiupdateDualModePositionLeveragePOST /futures/{settle}/dual_comp/positions/{contract}/leverageUpdate position leverage in dual mode
FuturesApiupdateDualModePositionRiskLimitPOST /futures/{settle}/dual_comp/positions/{contract}/risk_limitUpdate position risk limit in dual mode
FuturesApilistFuturesOrdersGET /futures/{settle}/ordersQuery futures order list
FuturesApicreateFuturesOrderPOST /futures/{settle}/ordersPlace futures order
FuturesApicancelFuturesOrdersDELETE /futures/{settle}/ordersCancel all orders with 'open' status
FuturesApigetOrdersWithTimeRangeGET /futures/{settle}/orders_timerangeQuery futures order list by time range
FuturesApicreateBatchFuturesOrderPOST /futures/{settle}/batch_ordersPlace batch futures orders
FuturesApigetFuturesOrderGET /futures/{settle}/orders/{order_id}Query single order details
FuturesApiamendFuturesOrderPUT /futures/{settle}/orders/{order_id}Amend single order
FuturesApicancelFuturesOrderDELETE /futures/{settle}/orders/{order_id}Cancel single order
FuturesApigetMyTradesGET /futures/{settle}/my_tradesQuery personal trading records
FuturesApigetMyTradesWithTimeRangeGET /futures/{settle}/my_trades_timerangeQuery personal trading records by time range
FuturesApilistPositionCloseGET /futures/{settle}/position_closeQuery position close history
FuturesApilistLiquidatesGET /futures/{settle}/liquidatesQuery liquidation history
FuturesApilistAutoDeleveragesGET /futures/{settle}/auto_deleveragesQuery ADL auto-deleveraging order information
FuturesApicountdownCancelAllFuturesPOST /futures/{settle}/countdown_cancel_allCountdown cancel orders
FuturesApigetFuturesFeeGET /futures/{settle}/feeQuery futures market trading fee rates
FuturesApicancelBatchFutureOrdersPOST /futures/{settle}/batch_cancel_ordersCancel batch orders by specified ID list
FuturesApiamendBatchFutureOrdersPOST /futures/{settle}/batch_amend_ordersBatch modify orders by specified IDs
FuturesApigetFuturesRiskLimitTableGET /futures/{settle}/risk_limit_tableQuery risk limit table by table_id
FuturesApilistPriceTriggeredOrdersGET /futures/{settle}/price_ordersQuery auto order list
FuturesApicreatePriceTriggeredOrderPOST /futures/{settle}/price_ordersCreate price-triggered order
FuturesApicancelPriceTriggeredOrderListDELETE /futures/{settle}/price_ordersCancel all auto orders
FuturesApigetPriceTriggeredOrderGET /futures/{settle}/price_orders/{order_id}Query single auto order details
FuturesApicancelPriceTriggeredOrderDELETE /futures/{settle}/price_orders/{order_id}Cancel single auto order
MarginApilistMarginAccountsGET /margin/accountsMargin account list
MarginApilistMarginAccountBookGET /margin/account_bookQuery margin account balance change history
MarginApilistFundingAccountsGET /margin/funding_accountsFunding account list
MarginApigetAutoRepayStatusGET /margin/auto_repayQuery user auto repayment settings
MarginApisetAutoRepayPOST /margin/auto_repayUpdate user auto repayment settings
MarginApigetMarginTransferableGET /margin/transferableGet maximum transferable amount for isolated margin
MarginApigetUserMarginTierGET /margin/user/loan_margin_tiersQuery user's own leverage lending tiers in current market
MarginApigetMarketMarginTierGET /margin/loan_margin_tiersQuery current market leverage lending tiers
MarginApisetUserMarketLeveragePOST /margin/leverage/user_market_settingSet user market leverage multiplier
MarginApilistMarginUserAccountGET /margin/user/accountQuery user's isolated margin account list
MarginApilistCrossMarginLoansGET /margin/cross/loansQuery cross margin borrow history (deprecated)
MarginApilistCrossMarginRepaymentsGET /margin/cross/repaymentsRetrieve cross margin repayments. (deprecated)
MarginUniApilistUniCurrencyPairsGET /margin/uni/currency_pairsList lending markets
MarginUniApigetUniCurrencyPairGET /margin/uni/currency_pairs/{currency_pair}Get lending market details
MarginUniApigetMarginUniEstimateRateGET /margin/uni/estimate_rateEstimate interest rate for isolated margin currencies
MarginUniApilistUniLoansGET /margin/uni/loansQuery loans
MarginUniApicreateUniLoanPOST /margin/uni/loansBorrow or repay
MarginUniApilistUniLoanRecordsGET /margin/uni/loan_recordsQuery loan records
MarginUniApilistUniLoanInterestRecordsGET /margin/uni/interest_recordsQuery interest deduction records
MarginUniApigetUniBorrowableGET /margin/uni/borrowableQuery maximum borrowable amount by currency
MultiCollateralLoanApilistMultiCollateralOrdersGET /loan/multi_collateral/ordersQuery multi-currency collateral order list
MultiCollateralLoanApicreateMultiCollateralPOST /loan/multi_collateral/ordersPlace multi-currency collateral order
MultiCollateralLoanApigetMultiCollateralOrderDetailGET /loan/multi_collateral/orders/{order_id}Query order details
MultiCollateralLoanApilistMultiRepayRecordsGET /loan/multi_collateral/repayQuery multi-currency collateral repayment records
MultiCollateralLoanApirepayMultiCollateralLoanPOST /loan/multi_collateral/repayMulti-currency collateral repayment
MultiCollateralLoanApilistMultiCollateralRecordsGET /loan/multi_collateral/mortgageQuery collateral adjustment records
MultiCollateralLoanApioperateMultiCollateralPOST /loan/multi_collateral/mortgageAdd or withdraw collateral
MultiCollateralLoanApilistUserCurrencyQuotaGET /loan/multi_collateral/currency_quotaQuery user's collateral and borrowing currency quota information
MultiCollateralLoanApilistMultiCollateralCurrenciesGET /loan/multi_collateral/currenciesQuery supported borrowing and collateral currencies for multi-currency collateral
MultiCollateralLoanApigetMultiCollateralLtvGET /loan/multi_collateral/ltvQuery collateralization ratio information
MultiCollateralLoanApigetMultiCollateralFixRateGET /loan/multi_collateral/fixed_rateQuery currency's 7-day and 30-day fixed interest rates
MultiCollateralLoanApigetMultiCollateralCurrentRateGET /loan/multi_collateral/current_rateQuery currency's current interest rate
OptionsApilistOptionsUnderlyingsGET /options/underlyingsList all underlying assets
OptionsApilistOptionsExpirationsGET /options/expirationsList all expiration dates
OptionsApilistOptionsContractsGET /options/contractsList all contracts for specified underlying and expiration date
OptionsApigetOptionsContractGET /options/contracts/{contract}Query specified contract details
OptionsApilistOptionsSettlementsGET /options/settlementsList settlement history
OptionsApigetOptionsSettlementGET /options/settlements/{contract}Get specified contract settlement information
OptionsApilistMyOptionsSettlementsGET /options/my_settlementsQuery personal settlement records
OptionsApilistOptionsOrderBookGET /options/order_bookQuery options contract order book
OptionsApilistOptionsTickersGET /options/tickersQuery options market ticker information
OptionsApilistOptionsUnderlyingTickersGET /options/underlying/tickers/{underlying}Query underlying ticker information
OptionsApilistOptionsCandlesticksGET /options/candlesticksOptions contract market candlestick chart
OptionsApilistOptionsUnderlyingCandlesticksGET /options/underlying/candlesticksUnderlying index price candlestick chart
OptionsApilistOptionsTradesGET /options/tradesMarket trade records
OptionsApilistOptionsAccountGET /options/accountsQuery account information
OptionsApilistOptionsAccountBookGET /options/account_bookQuery account change history
OptionsApilistOptionsPositionsGET /options/positionsList user's positions of specified underlying
OptionsApigetOptionsPositionGET /options/positions/{contract}Get specified contract position
OptionsApilistOptionsPositionCloseGET /options/position_closeList user's liquidation history of specified underlying
OptionsApilistOptionsOrdersGET /options/ordersList options orders
OptionsApicreateOptionsOrderPOST /options/ordersCreate an options order
OptionsApicancelOptionsOrdersDELETE /options/ordersCancel all orders with 'open' status
OptionsApigetOptionsOrderGET /options/orders/{order_id}Query single order details
OptionsApicancelOptionsOrderDELETE /options/orders/{order_id}Cancel single order
OptionsApicountdownCancelAllOptionsPOST /options/countdown_cancel_allCountdown cancel orders
OptionsApilistMyOptionsTradesGET /options/my_tradesQuery personal trading records
OptionsApigetOptionsMMPGET /options/mmpMMP Query.
OptionsApisetOptionsMMPPOST /options/mmpMMP Settings
OptionsApiresetOptionsMMPPOST /options/mmp/resetMMP Reset
RebateApiagencyTransactionHistoryGET /rebate/agency/transaction_historyBroker obtains transaction history of recommended users
RebateApiagencyCommissionsHistoryGET /rebate/agency/commission_historyBroker obtains rebate history of recommended users
RebateApipartnerTransactionHistoryGET /rebate/partner/transaction_historyPartner obtains transaction history of recommended users
RebateApipartnerCommissionsHistoryGET /rebate/partner/commission_historyPartner obtains rebate records of recommended users
RebateApipartnerSubListGET /rebate/partner/sub_listPartner subordinate list
RebateApirebateBrokerCommissionHistoryGET /rebate/broker/commission_historyBroker obtains user's rebate records
RebateApirebateBrokerTransactionHistoryGET /rebate/broker/transaction_historyBroker obtains user's trading history
RebateApirebateUserInfoGET /rebate/user/infoUser obtains rebate information
RebateApiuserSubRelationGET /rebate/user/sub_relationUser subordinate relationship
SpotApilistCurrenciesGET /spot/currenciesQuery all currency information
SpotApigetCurrencyGET /spot/currencies/{currency}Query single currency information
SpotApilistCurrencyPairsGET /spot/currency_pairsQuery all supported currency pairs
SpotApigetCurrencyPairGET /spot/currency_pairs/{currency_pair}Query single currency pair details
SpotApilistTickersGET /spot/tickersGet currency pair ticker information
SpotApilistOrderBookGET /spot/order_bookGet market depth information
SpotApilistTradesGET /spot/tradesQuery market transaction records
SpotApilistCandlesticksGET /spot/candlesticksMarket K-line chart
SpotApigetFeeGET /spot/feeQuery account fee rates
SpotApigetBatchSpotFeeGET /spot/batch_feeBatch query account fee rates
SpotApilistSpotAccountsGET /spot/accountsList spot trading accounts
SpotApilistSpotAccountBookGET /spot/account_bookQuery spot account transaction history
SpotApicreateBatchOrdersPOST /spot/batch_ordersBatch place orders
SpotApilistAllOpenOrdersGET /spot/open_ordersList all open orders
SpotApicreateCrossLiquidateOrderPOST /spot/cross_liquidate_ordersClose position when cross-currency is disabled
SpotApilistOrdersGET /spot/ordersList orders
SpotApicreateOrderPOST /spot/ordersCreate an order
SpotApicancelOrdersDELETE /spot/ordersCancel all `open` orders in specified currency pair
SpotApicancelBatchOrdersPOST /spot/cancel_batch_ordersCancel batch orders by specified ID list
SpotApigetOrderGET /spot/orders/{order_id}Query single order details
SpotApicancelOrderDELETE /spot/orders/{order_id}Cancel single order
SpotApiamendOrderPATCH /spot/orders/{order_id}Amend single order
SpotApilistMyTradesGET /spot/my_tradesQuery personal trading records
SpotApigetSystemTimeGET /spot/timeGet server current time
SpotApicountdownCancelAllSpotPOST /spot/countdown_cancel_allCountdown cancel orders
SpotApiamendBatchOrdersPOST /spot/amend_batch_ordersBatch modification of orders
SpotApigetSpotInsuranceHistoryGET /spot/insurance_historyQuery spot insurance fund historical data
SpotApilistSpotPriceTriggeredOrdersGET /spot/price_ordersQuery running auto order list
SpotApicreateSpotPriceTriggeredOrderPOST /spot/price_ordersCreate price-triggered order
SpotApicancelSpotPriceTriggeredOrderListDELETE /spot/price_ordersCancel all auto orders
SpotApigetSpotPriceTriggeredOrderGET /spot/price_orders/{order_id}Query single auto order details
SpotApicancelSpotPriceTriggeredOrderDELETE /spot/price_orders/{order_id}Cancel single auto order
SubAccountApilistSubAccountsGET /sub_accountsList sub-accounts
SubAccountApicreateSubAccountsPOST /sub_accountsCreate a new sub-account
SubAccountApigetSubAccountGET /sub_accounts/{user_id}Get sub-account
SubAccountApilistSubAccountKeysGET /sub_accounts/{user_id}/keysList all API key pairs of the sub-account
SubAccountApicreateSubAccountKeysPOST /sub_accounts/{user_id}/keysCreate new sub-account API key pair
SubAccountApigetSubAccountKeyGET /sub_accounts/{user_id}/keys/{key}Get specific API key pair of the sub-account
SubAccountApiupdateSubAccountKeysPUT /sub_accounts/{user_id}/keys/{key}Update sub-account API key pair
SubAccountApideleteSubAccountKeysDELETE /sub_accounts/{user_id}/keys/{key}Delete sub-account API key pair
SubAccountApilockSubAccountPOST /sub_accounts/{user_id}/lockLock sub-account
SubAccountApiunlockSubAccountPOST /sub_accounts/{user_id}/unlockUnlock sub-account
SubAccountApilistUnifiedModeGET /sub_accounts/unified_modeGet sub-account mode
UnifiedApilistUnifiedAccountsGET /unified/accountsGet unified account information
UnifiedApigetUnifiedBorrowableGET /unified/borrowableQuery maximum borrowable amount for unified account
UnifiedApigetUnifiedTransferableGET /unified/transferableQuery maximum transferable amount for unified account
UnifiedApigetUnifiedTransferablesGET /unified/transferablesBatch query maximum transferable amount for unified accounts. Each currency shows the maximum value. After user withdrawal, the transferable amount for all currencies will change
UnifiedApigetUnifiedBorrowableListGET /unified/batch_borrowableBatch query unified account maximum borrowable amount
UnifiedApilistUnifiedLoansGET /unified/loansQuery loans
UnifiedApicreateUnifiedLoanPOST /unified/loansBorrow or repay
UnifiedApilistUnifiedLoanRecordsGET /unified/loan_recordsQuery loan records
UnifiedApilistUnifiedLoanInterestRecordsGET /unified/interest_recordsQuery interest deduction records
UnifiedApigetUnifiedRiskUnitsGET /unified/risk_unitsGet user risk unit details
UnifiedApigetUnifiedModeGET /unified/unified_modeQuery mode of the unified account
UnifiedApisetUnifiedModePUT /unified/unified_modeSet unified account mode
UnifiedApigetUnifiedEstimateRateGET /unified/estimate_rateQuery unified account estimated interest rate
UnifiedApilistCurrencyDiscountTiersGET /unified/currency_discount_tiersQuery unified account tiered discount
UnifiedApilistLoanMarginTiersGET /unified/loan_margin_tiersQuery unified account tiered loan margin
UnifiedApicalculatePortfolioMarginPOST /unified/portfolio_calculatorPortfolio margin calculator
UnifiedApigetUserLeverageCurrencyConfigGET /unified/leverage/user_currency_configMaximum and minimum currency leverage that can be set
UnifiedApigetUserLeverageCurrencySettingGET /unified/leverage/user_currency_settingGet user currency leverage
UnifiedApisetUserLeverageCurrencySettingPOST /unified/leverage/user_currency_settingSet loan currency leverage
UnifiedApilistUnifiedCurrenciesGET /unified/currenciesList of loan currencies supported by unified account
UnifiedApigetHistoryLoanRateGET /unified/history_loan_rateGet historical lending rates
UnifiedApisetUnifiedCollateralPOST /unified/collateral_currenciesSet collateral currency
WalletApilistCurrencyChainsGET /wallet/currency_chainsQuery chains supported for specified currency
WalletApigetDepositAddressGET /wallet/deposit_addressGenerate currency deposit address
WalletApilistWithdrawalsGET /wallet/withdrawalsGet withdrawal records
WalletApilistDepositsGET /wallet/depositsGet deposit records
WalletApitransferPOST /wallet/transfersTransfer between trading accounts
WalletApilistSubAccountTransfersGET /wallet/sub_account_transfersGet transfer records between main and sub accounts
WalletApitransferWithSubAccountPOST /wallet/sub_account_transfersTransfer between main and sub accounts
WalletApisubAccountToSubAccountPOST /wallet/sub_account_to_sub_accountTransfer between sub-accounts
WalletApigetTransferOrderStatusGET /wallet/order_statusTransfer status query
WalletApilistWithdrawStatusGET /wallet/withdraw_statusQuery withdrawal status
WalletApilistSubAccountBalancesGET /wallet/sub_account_balancesQuery sub-account balance information
WalletApilistSubAccountMarginBalancesGET /wallet/sub_account_margin_balancesQuery sub-account isolated margin account balance information
WalletApilistSubAccountFuturesBalancesGET /wallet/sub_account_futures_balancesQuery sub-account perpetual futures account balance information
WalletApilistSubAccountCrossMarginBalancesGET /wallet/sub_account_cross_margin_balancesQuery sub-account cross margin account balance information
WalletApilistSavedAddressGET /wallet/saved_addressQuery withdrawal address whitelist
WalletApigetTradeFeeGET /wallet/feeQuery personal trading fees
WalletApigetTotalBalanceGET /wallet/total_balanceQuery personal account totals
WalletApilistSmallBalanceGET /wallet/small_balanceGet list of convertible small balance currencies
WalletApiconvertSmallBalancePOST /wallet/small_balanceConvert small balance currency
WalletApilistSmallBalanceHistoryGET /wallet/small_balance_historyGet convertible small balance currency history
WalletApilistPushOrdersGET /wallet/pushGet UID transfer history
WithdrawalApiwithdrawPOST /withdrawalsWithdraw
WithdrawalApiwithdrawPushOrderPOST /withdrawals/pushUID transfer
WithdrawalApicancelWithdrawalDELETE /withdrawals/{withdrawal_id}Cancel withdrawal with specified ID

Documentation for Models

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

FAQs

Package last updated on 31 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts