🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

gate-api

Package Overview
Dependencies
Maintainers
1
Versions
33
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.98.0
latest
Source
npm
Version published
Weekly downloads
1.7K
6.63%
Maintainers
1
Weekly downloads
 
Created
Source

gate-api@6.98.0

TypeScript NodeJS client for gate-api.

Welcome to Gate API

APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf.

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 4.98.0
  • Package version:
  • Build package: org.openapitools.codegen.languages.TypeScriptNodeClientCodegen For more information, please visit https://www.gate.io/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/detailGet account detail
AccountApigetAccountRateLimitGET /account/rate_limitGet user transaction rate limit information
AccountApilistSTPGroupsGET /account/stp_groupsList STP Groups
AccountApicreateSTPGroupPOST /account/stp_groupsCreate STP Group
AccountApilistSTPGroupsUsersGET /account/stp_groups/{stp_id}/usersList users of the STP group
AccountApiaddSTPGroupUsersPOST /account/stp_groups/{stp_id}/usersAdd users to the STP group
AccountApideleteSTPGroupUsersDELETE /account/stp_groups/{stp_id}/usersDelete the user in the STP group
AccountApigetDebitFeeGET /account/debit_feeQuery GT deduction configuration.
AccountApisetDebitFeePOST /account/debit_feeSet GT deduction.
CollateralLoanApilistCollateralLoanOrdersGET /loan/collateral/ordersList Orders
CollateralLoanApicreateCollateralLoanPOST /loan/collateral/ordersPlace order
CollateralLoanApigetCollateralLoanOrderDetailGET /loan/collateral/orders/{order_id}Get a single order
CollateralLoanApirepayCollateralLoanPOST /loan/collateral/repayRepayment
CollateralLoanApilistRepayRecordsGET /loan/collateral/repay_recordsRepayment history
CollateralLoanApilistCollateralRecordsGET /loan/collateral/collateralsQuery collateral adjustment records
CollateralLoanApioperateCollateralPOST /loan/collateral/collateralsIncrease or redeem collateral
CollateralLoanApigetUserTotalAmountGET /loan/collateral/total_amountQuery the total borrowing and collateral amount for the user
CollateralLoanApigetUserLtvInfoGET /loan/collateral/ltvQuery user's collateralization ratio
CollateralLoanApilistCollateralCurrenciesGET /loan/collateral/currenciesQuery supported borrowing and collateral currencies
DeliveryApilistDeliveryContractsGET /delivery/{settle}/contractsList all futures contracts
DeliveryApigetDeliveryContractGET /delivery/{settle}/contracts/{contract}Get a single contract
DeliveryApilistDeliveryOrderBookGET /delivery/{settle}/order_bookFutures order book
DeliveryApilistDeliveryTradesGET /delivery/{settle}/tradesFutures trading history
DeliveryApilistDeliveryCandlesticksGET /delivery/{settle}/candlesticksGet futures candlesticks
DeliveryApilistDeliveryTickersGET /delivery/{settle}/tickersList futures tickers
DeliveryApilistDeliveryInsuranceLedgerGET /delivery/{settle}/insuranceFutures insurance balance history
DeliveryApilistDeliveryAccountsGET /delivery/{settle}/accountsQuery futures account
DeliveryApilistDeliveryAccountBookGET /delivery/{settle}/account_bookQuery account book
DeliveryApilistDeliveryPositionsGET /delivery/{settle}/positionsList all positions of a user
DeliveryApigetDeliveryPositionGET /delivery/{settle}/positions/{contract}Get single position
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}/ordersList futures orders
DeliveryApicreateDeliveryOrderPOST /delivery/{settle}/ordersCreate a futures order
DeliveryApicancelDeliveryOrdersDELETE /delivery/{settle}/ordersCancel all `open` orders matched
DeliveryApigetDeliveryOrderGET /delivery/{settle}/orders/{order_id}Get a single order
DeliveryApicancelDeliveryOrderDELETE /delivery/{settle}/orders/{order_id}Cancel a single order
DeliveryApigetMyDeliveryTradesGET /delivery/{settle}/my_tradesList personal trading history
DeliveryApilistDeliveryPositionCloseGET /delivery/{settle}/position_closeList position close history
DeliveryApilistDeliveryLiquidatesGET /delivery/{settle}/liquidatesList liquidation history
DeliveryApilistDeliverySettlementsGET /delivery/{settle}/settlementsList settlement history
DeliveryApilistDeliveryRiskLimitTiersGET /delivery/{settle}/risk_limit_tiersList risk limit tiers
DeliveryApilistPriceTriggeredDeliveryOrdersGET /delivery/{settle}/price_ordersList All Price-triggered Orders
DeliveryApicreatePriceTriggeredDeliveryOrderPOST /delivery/{settle}/price_ordersCreate a price-triggered order
DeliveryApicancelPriceTriggeredDeliveryOrderListDELETE /delivery/{settle}/price_ordersCancel All Price-triggered Orders
DeliveryApigetPriceTriggeredDeliveryOrderGET /delivery/{settle}/price_orders/{order_id}Get a price-triggered order
DeliveryApicancelPriceTriggeredDeliveryOrderDELETE /delivery/{settle}/price_orders/{order_id}cancel a price-triggered order
EarnApiswapETH2POST /earn/staking/eth2/swapETH2 swap
EarnApirateListETH2GET /earn/staking/eth2/rate_recordsETH2 historical rate of return 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
EarnUniApilistUniCurrenciesGET /earn/uni/currenciesList currencies for lending
EarnUniApigetUniCurrencyGET /earn/uni/currencies/{currency}Get currency detail for lending
EarnUniApilistUserUniLendsGET /earn/uni/lendsList user's lending orders
EarnUniApicreateUniLendPOST /earn/uni/lendsLend or redeem
EarnUniApichangeUniLendPATCH /earn/uni/lendsAmend lending order
EarnUniApilistUniLendRecordsGET /earn/uni/lend_recordsList records of lending
EarnUniApigetUniInterestGET /earn/uni/interests/{currency}Get the user's total interest income of specified currency
EarnUniApilistUniInterestRecordsGET /earn/uni/interest_recordsList interest records
EarnUniApiswitchInterestReinvestPUT /earn/uni/interest_reinvestSet interest reinvestment toggle
EarnUniApigetUniInterestStatusGET /earn/uni/interest_status/{currency}query currency interest compounding status
EarnUniApilistUniChartGET /earn/uni/chartUniLoan currency annualized trend chart
EarnUniApilistUniRateGET /earn/uni/rateCurrency estimate annualized interest rate
FlashSwapApilistFlashSwapCurrencyPairGET /flash_swap/currency_pairsList All Supported Currency Pairs In Flash Swap
FlashSwapApilistFlashSwapOrdersGET /flash_swap/ordersList all flash swap orders
FlashSwapApicreateFlashSwapOrderPOST /flash_swap/ordersCreate a flash swap order
FlashSwapApigetFlashSwapOrderGET /flash_swap/orders/{order_id}Get a single flash swap order's detail
FlashSwapApipreviewFlashSwapOrderPOST /flash_swap/orders/previewInitiate a flash swap order preview
FuturesApilistFuturesContractsGET /futures/{settle}/contractsList all futures contracts
FuturesApigetFuturesContractGET /futures/{settle}/contracts/{contract}Get a single contract
FuturesApilistFuturesOrderBookGET /futures/{settle}/order_bookFutures order book
FuturesApilistFuturesTradesGET /futures/{settle}/tradesFutures trading history
FuturesApilistFuturesCandlesticksGET /futures/{settle}/candlesticksGet futures candlesticks
FuturesApilistFuturesPremiumIndexGET /futures/{settle}/premium_indexPremium Index K-Line
FuturesApilistFuturesTickersGET /futures/{settle}/tickersList futures tickers
FuturesApilistFuturesFundingRateHistoryGET /futures/{settle}/funding_rateFunding rate history
FuturesApilistFuturesInsuranceLedgerGET /futures/{settle}/insuranceFutures insurance balance history
FuturesApilistContractStatsGET /futures/{settle}/contract_statsFutures stats
FuturesApigetIndexConstituentsGET /futures/{settle}/index_constituents/{index}Get index constituents
FuturesApilistLiquidatedOrdersGET /futures/{settle}/liq_ordersRetrieve liquidation history
FuturesApilistFuturesRiskLimitTiersGET /futures/{settle}/risk_limit_tiersList risk limit tiers
FuturesApilistFuturesAccountsGET /futures/{settle}/accountsQuery futures account
FuturesApilistFuturesAccountBookGET /futures/{settle}/account_bookQuery account book
FuturesApilistPositionsGET /futures/{settle}/positionsList all positions of a user
FuturesApigetPositionGET /futures/{settle}/positions/{contract}Get single position
FuturesApiupdatePositionMarginPOST /futures/{settle}/positions/{contract}/marginUpdate position margin
FuturesApiupdatePositionLeveragePOST /futures/{settle}/positions/{contract}/leverageUpdate position leverage
FuturesApiupdatePositionCrossModePOST /futures/{settle}/positions/cross_modeSwitch to the full position-by-store mode
FuturesApiupdatePositionRiskLimitPOST /futures/{settle}/positions/{contract}/risk_limitUpdate position risk limit
FuturesApisetDualModePOST /futures/{settle}/dual_modeEnable or disable dual mode
FuturesApigetDualModePositionGET /futures/{settle}/dual_comp/positions/{contract}Retrieve position detail 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}/ordersList futures orders
FuturesApicreateFuturesOrderPOST /futures/{settle}/ordersCreate a futures order
FuturesApicancelFuturesOrdersDELETE /futures/{settle}/ordersCancel all `open` orders matched
FuturesApigetOrdersWithTimeRangeGET /futures/{settle}/orders_timerangeList Futures Orders By Time Range
FuturesApicreateBatchFuturesOrderPOST /futures/{settle}/batch_ordersCreate a batch of futures orders
FuturesApigetFuturesOrderGET /futures/{settle}/orders/{order_id}Get a single order
FuturesApiamendFuturesOrderPUT /futures/{settle}/orders/{order_id}Amend an order
FuturesApicancelFuturesOrderDELETE /futures/{settle}/orders/{order_id}Cancel a single order
FuturesApigetMyTradesGET /futures/{settle}/my_tradesList personal trading history
FuturesApigetMyTradesWithTimeRangeGET /futures/{settle}/my_trades_timerangeList personal trading history by time range
FuturesApilistPositionCloseGET /futures/{settle}/position_closeList position close history
FuturesApilistLiquidatesGET /futures/{settle}/liquidatesList liquidation history
FuturesApilistAutoDeleveragesGET /futures/{settle}/auto_deleveragesList Auto-Deleveraging History
FuturesApicountdownCancelAllFuturesPOST /futures/{settle}/countdown_cancel_allCountdown cancel orders
FuturesApigetFuturesFeeGET /futures/{settle}/feeQuery user trading fee rates
FuturesApicancelBatchFutureOrdersPOST /futures/{settle}/batch_cancel_ordersCancel a batch of orders with an ID list
FuturesApiamendBatchFutureOrdersPOST /futures/{settle}/batch_amend_ordersBatch modify orders with specified IDs
FuturesApilistPriceTriggeredOrdersGET /futures/{settle}/price_ordersList All Price-triggered Orders
FuturesApicreatePriceTriggeredOrderPOST /futures/{settle}/price_ordersCreate a price-triggered order
FuturesApicancelPriceTriggeredOrderListDELETE /futures/{settle}/price_ordersCancel All Price-triggered Orders
FuturesApigetPriceTriggeredOrderGET /futures/{settle}/price_orders/{order_id}Get a price-triggered order
FuturesApicancelPriceTriggeredOrderDELETE /futures/{settle}/price_orders/{order_id}cancel a price-triggered order
MarginApilistMarginAccountsGET /margin/accountsMargin account list
MarginApilistMarginAccountBookGET /margin/account_bookList margin account balance change history
MarginApilistFundingAccountsGET /margin/funding_accountsFunding account list
MarginApigetAutoRepayStatusGET /margin/auto_repayRetrieve user auto repayment setting
MarginApisetAutoRepayPOST /margin/auto_repayUpdate user's auto repayment setting
MarginApigetMarginTransferableGET /margin/transferableGet the max transferable amount for a specific margin currency
MarginApilistCrossMarginCurrenciesGET /margin/cross/currenciesCurrencies supported by cross margin.(deprecated)
MarginApigetCrossMarginCurrencyGET /margin/cross/currencies/{currency}Retrieve detail of one single currency supported by cross margin. (deprecated)
MarginApigetCrossMarginAccountGET /margin/cross/accountsRetrieve cross margin account. (deprecated)
MarginApilistCrossMarginAccountBookGET /margin/cross/account_bookRetrieve cross margin account change history. (deprecated)
MarginApilistCrossMarginLoansGET /margin/cross/loansList cross margin borrow history. (deprecated)
MarginApicreateCrossMarginLoanPOST /margin/cross/loansCreate a cross margin borrow loan. (deprecated)
MarginApigetCrossMarginLoanGET /margin/cross/loans/{loan_id}Retrieve single borrow loan detail. (deprecated)
MarginApilistCrossMarginRepaymentsGET /margin/cross/repaymentsRetrieve cross margin repayments. (deprecated)
MarginApirepayCrossMarginLoanPOST /margin/cross/repaymentsCross margin repayments. (deprecated)
MarginApigetCrossMarginInterestRecordsGET /margin/cross/interest_recordsInterest records for the cross margin account. (deprecated)
MarginApigetCrossMarginTransferableGET /margin/cross/transferableGet the max transferable amount for a specific cross margin currency. (deprecated)
MarginApigetCrossMarginEstimateRateGET /margin/cross/estimate_rateEstimated interest rates. (deprecated)
MarginApigetCrossMarginBorrowableGET /margin/cross/borrowableGet the max borrowable amount for a specific cross margin currency. (deprecated)
MarginApigetUserMarginTierGET /margin/user/loan_margin_tiersCheck the user's own leverage lending gradient in the current market
MarginApigetMarketMarginTierGET /margin/loan_margin_tiersQuery the current market leverage lending gradient
MarginApisetUserMarketLeveragePOST /margin/leverage/user_market_settingSet the user market leverage multiple
MarginApilistMarginUserAccountGET /margin/user/accountQuery the user's leverage account list
MarginUniApilistUniCurrencyPairsGET /margin/uni/currency_pairsList lending markets
MarginUniApigetUniCurrencyPairGET /margin/uni/currency_pairs/{currency_pair}Get detail of lending market
MarginUniApigetMarginUniEstimateRateGET /margin/uni/estimate_rateEstimate interest Rate
MarginUniApilistUniLoansGET /margin/uni/loansList loans
MarginUniApicreateUniLoanPOST /margin/uni/loansBorrow or repay
MarginUniApilistUniLoanRecordsGET /margin/uni/loan_recordsGet load records
MarginUniApilistUniLoanInterestRecordsGET /margin/uni/interest_recordsList interest records
MarginUniApigetUniBorrowableGET /margin/uni/borrowableGet maximum borrowable
MultiCollateralLoanApilistMultiCollateralOrdersGET /loan/multi_collateral/ordersList Multi-Collateral Orders
MultiCollateralLoanApicreateMultiCollateralPOST /loan/multi_collateral/ordersCreate Multi-Collateral Order
MultiCollateralLoanApigetMultiCollateralOrderDetailGET /loan/multi_collateral/orders/{order_id}Get Multi-Collateral Order Detail
MultiCollateralLoanApilistMultiRepayRecordsGET /loan/multi_collateral/repayList Multi-Collateral Repay Records
MultiCollateralLoanApirepayMultiCollateralLoanPOST /loan/multi_collateral/repayRepay Multi-Collateral Loan
MultiCollateralLoanApilistMultiCollateralRecordsGET /loan/multi_collateral/mortgageQuery collateral adjustment records
MultiCollateralLoanApioperateMultiCollateralPOST /loan/multi_collateral/mortgageOperate Multi-Collateral
MultiCollateralLoanApilistUserCurrencyQuotaGET /loan/multi_collateral/currency_quotaList User Currency Quota
MultiCollateralLoanApilistMultiCollateralCurrenciesGET /loan/multi_collateral/currenciesQuery supported borrowing and collateral currencies in Multi-Collateral
MultiCollateralLoanApigetMultiCollateralLtvGET /loan/multi_collateral/ltvGet Multi-Collateral ratio
MultiCollateralLoanApigetMultiCollateralFixRateGET /loan/multi_collateral/fixed_rateQuery fixed interest rates for the currency for 7 days and 30 days
MultiCollateralLoanApigetMultiCollateralCurrentRateGET /loan/multi_collateral/current_rateQuery the current interest rate of the currency
OptionsApilistOptionsUnderlyingsGET /options/underlyingsList all underlyings
OptionsApilistOptionsExpirationsGET /options/expirationsList all expiration times
OptionsApilistOptionsContractsGET /options/contractsList all the contracts with specified underlying and expiration time
OptionsApigetOptionsContractGET /options/contracts/{contract}Query specified contract detail
OptionsApilistOptionsSettlementsGET /options/settlementsList settlement history
OptionsApigetOptionsSettlementGET /options/settlements/{contract}Get specified contract's settlement
OptionsApilistMyOptionsSettlementsGET /options/my_settlementsList my options settlements
OptionsApilistOptionsOrderBookGET /options/order_bookOptions order book
OptionsApilistOptionsTickersGET /options/tickersList tickers of options contracts
OptionsApilistOptionsUnderlyingTickersGET /options/underlying/tickers/{underlying}Get underlying ticker
OptionsApilistOptionsCandlesticksGET /options/candlesticksGet options candlesticks
OptionsApilistOptionsUnderlyingCandlesticksGET /options/underlying/candlesticksMark price candlesticks of an underlying
OptionsApilistOptionsTradesGET /options/tradesOptions trade history
OptionsApilistOptionsAccountGET /options/accountsList options account
OptionsApilistOptionsAccountBookGET /options/account_bookList account changing 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 `open` orders matched
OptionsApigetOptionsOrderGET /options/orders/{order_id}Get a single order
OptionsApicancelOptionsOrderDELETE /options/orders/{order_id}Cancel a single order
OptionsApicountdownCancelAllOptionsPOST /options/countdown_cancel_allCountdown cancel orders
OptionsApilistMyOptionsTradesGET /options/my_tradesList personal trading history
OptionsApigetOptionsMMPGET /options/mmpMMP Query
OptionsApisetOptionsMMPPOST /options/mmpMMP Settings
OptionsApiresetOptionsMMPPOST /options/mmp/resetMMP Reset
RebateApiagencyTransactionHistoryGET /rebate/agency/transaction_historyThe agency obtains the transaction history of the recommended user
RebateApiagencyCommissionsHistoryGET /rebate/agency/commission_historyThe agency obtains the commission history of the recommended user
RebateApipartnerTransactionHistoryGET /rebate/partner/transaction_historyPartner obtains transaction records of recommended users
RebateApipartnerCommissionsHistoryGET /rebate/partner/commission_historyPartner obtains commission records of recommended users
RebateApipartnerSubListGET /rebate/partner/sub_listPartner subordinate list
RebateApirebateBrokerCommissionHistoryGET /rebate/broker/commission_historyThe broker obtains the user's commission rebate records
RebateApirebateBrokerTransactionHistoryGET /rebate/broker/transaction_historyThe broker obtains the user's trading history
RebateApirebateUserInfoGET /rebate/user/infoUser retrieves rebate information
RebateApiuserSubRelationGET /rebate/user/sub_relationUser-subordinate relationship
SpotApilistCurrenciesGET /spot/currenciesList all currencies' details
SpotApigetCurrencyGET /spot/currencies/{currency}Get details of a specific currency
SpotApilistCurrencyPairsGET /spot/currency_pairsList all currency pairs supported
SpotApigetCurrencyPairGET /spot/currency_pairs/{currency_pair}Get details of a specifc currency pair
SpotApilistTickersGET /spot/tickersRetrieve ticker information
SpotApilistOrderBookGET /spot/order_bookRetrieve order book
SpotApilistTradesGET /spot/tradesRetrieve market trades
SpotApilistCandlesticksGET /spot/candlesticksMarket candlesticks
SpotApigetFeeGET /spot/feeQuery user trading fee rates
SpotApigetBatchSpotFeeGET /spot/batch_feeQuery a batch of user trading fee rates
SpotApilistSpotAccountsGET /spot/accountsList spot accounts
SpotApilistSpotAccountBookGET /spot/account_bookQuery account book
SpotApicreateBatchOrdersPOST /spot/batch_ordersCreate a batch of 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 a batch of orders with an ID list
SpotApigetOrderGET /spot/orders/{order_id}Get a single order
SpotApicancelOrderDELETE /spot/orders/{order_id}Cancel a single order
SpotApiamendOrderPATCH /spot/orders/{order_id}Amend an order
SpotApilistMyTradesGET /spot/my_tradesList personal trading history
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_ordersRetrieve running auto order list
SpotApicreateSpotPriceTriggeredOrderPOST /spot/price_ordersCreate a price-triggered order
SpotApicancelSpotPriceTriggeredOrderListDELETE /spot/price_ordersCancel All Price-triggered Orders
SpotApigetSpotPriceTriggeredOrderGET /spot/price_orders/{order_id}Get a price-triggered order
SpotApicancelSpotPriceTriggeredOrderDELETE /spot/price_orders/{order_id}cancel a price-triggered order
SubAccountApilistSubAccountsGET /sub_accountsList sub-accounts
SubAccountApicreateSubAccountsPOST /sub_accountsCreate a new sub-account
SubAccountApigetSubAccountGET /sub_accounts/{user_id}Get the sub-account
SubAccountApilistSubAccountKeysGET /sub_accounts/{user_id}/keysList all API Key of the sub-account
SubAccountApicreateSubAccountKeysPOST /sub_accounts/{user_id}/keysCreate API Key of the sub-account
SubAccountApigetSubAccountKeyGET /sub_accounts/{user_id}/keys/{key}Get the API Key of the sub-account
SubAccountApiupdateSubAccountKeysPUT /sub_accounts/{user_id}/keys/{key}Update API key of the sub-account
SubAccountApideleteSubAccountKeysDELETE /sub_accounts/{user_id}/keys/{key}Delete API key of the sub-account
SubAccountApilockSubAccountPOST /sub_accounts/{user_id}/lockLock the sub-account
SubAccountApiunlockSubAccountPOST /sub_accounts/{user_id}/unlockUnlock the sub-account
SubAccountApilistUnifiedModeGET /sub_accounts/unified_modeGet sub-account mode
UnifiedApilistUnifiedAccountsGET /unified/accountsGet unified account information
UnifiedApigetUnifiedBorrowableGET /unified/borrowableQuery about the maximum borrowing for the unified account
UnifiedApigetUnifiedTransferableGET /unified/transferableQuery about the maximum transferable for the unified account
UnifiedApigetUnifiedTransferablesGET /unified/transferablesBatch query can be transferred out at most for unified accounts; each currency is the maximum value. After the user withdraws the currency, the amount of transferable currency will be changed.
UnifiedApigetUnifiedBorrowableListGET /unified/batch_borrowableBatch query unified account can be borrowed up to a maximum
UnifiedApilistUnifiedLoansGET /unified/loansList loans
UnifiedApicreateUnifiedLoanPOST /unified/loansBorrow or repay
UnifiedApilistUnifiedLoanRecordsGET /unified/loan_recordsGet load records
UnifiedApilistUnifiedLoanInterestRecordsGET /unified/interest_recordsList interest records
UnifiedApigetUnifiedRiskUnitsGET /unified/risk_unitsGet user risk unit details
UnifiedApigetUnifiedModeGET /unified/unified_modeQuery mode of the unified account
UnifiedApisetUnifiedModePUT /unified/unified_modeSet mode of the unified account
UnifiedApigetUnifiedEstimateRateGET /unified/estimate_rateGet unified estimate rate
UnifiedApilistCurrencyDiscountTiersGET /unified/currency_discount_tiersList currency discount tiers
UnifiedApilistLoanMarginTiersGET /unified/loan_margin_tiersList loan margin tiers
UnifiedApicalculatePortfolioMarginPOST /unified/portfolio_calculatorPortfolio margin calculator
UnifiedApigetUserLeverageCurrencyConfigGET /unified/leverage/user_currency_configMinimum currency leverage that can be set
UnifiedApigetUserLeverageCurrencySettingGET /unified/leverage/user_currency_settingGet the leverage multiple of the user currency
UnifiedApisetUserLeverageCurrencySettingPOST /unified/leverage/user_currency_settingSet the loan currency leverage
UnifiedApilistUnifiedCurrenciesGET /unified/currenciesList of loan currencies supported by unified account
UnifiedApigetHistoryLoanRateGET /unified/history_loan_rateget historical lending rates
WalletApilistCurrencyChainsGET /wallet/currency_chainsList chains supported for specified currency
WalletApigetDepositAddressGET /wallet/deposit_addressGenerate currency deposit address
WalletApilistWithdrawalsGET /wallet/withdrawalsRetrieve withdrawal records
WalletApilistDepositsGET /wallet/depositsRetrieve deposit records
WalletApitransferPOST /wallet/transfersTransfer between trading accounts
WalletApilistSubAccountTransfersGET /wallet/sub_account_transfersRetrieve transfer records between main and sub accounts
WalletApitransferWithSubAccountPOST /wallet/sub_account_transfersTransfer between main and sub accounts
WalletApisubAccountToSubAccountPOST /wallet/sub_account_to_sub_accountSub-account transfers to sub-account
WalletApigetTransferOrderStatusGET /wallet/order_statusTransfer status query
WalletApilistWithdrawStatusGET /wallet/withdraw_statusRetrieve withdrawal status
WalletApilistSubAccountBalancesGET /wallet/sub_account_balancesRetrieve sub account balances
WalletApilistSubAccountMarginBalancesGET /wallet/sub_account_margin_balancesQuery sub accounts' margin balances
WalletApilistSubAccountFuturesBalancesGET /wallet/sub_account_futures_balancesQuery sub accounts' futures account balances
WalletApilistSubAccountCrossMarginBalancesGET /wallet/sub_account_cross_margin_balancesQuery subaccount's cross_margin account info
WalletApilistSavedAddressGET /wallet/saved_addressQuery saved address
WalletApigetTradeFeeGET /wallet/feeRetrieve personal trading fee
WalletApigetTotalBalanceGET /wallet/total_balanceRetrieve user's total balances
WalletApilistSmallBalanceGET /wallet/small_balanceList small balance
WalletApiconvertSmallBalancePOST /wallet/small_balanceConvert small balance
WalletApilistSmallBalanceHistoryGET /wallet/small_balance_historyList small balance history
WalletApilistPushOrdersGET /wallet/pushRetrieve the 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.io/docs/apiv4/en/index.html#apiv4-signed-request-requirements

FAQs

Package last updated on 04 Jun 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