Skip to content

Latest commit

 

History

History
208 lines (188 loc) · 29.3 KB

endpointFunctionList.md

File metadata and controls

208 lines (188 loc) · 29.3 KB

Endpoint maps

SDK Logo

Each REST client is a JavaScript class, which provides functions individually mapped to each endpoint available in the exchange's API offering.

The following table shows all methods available in each REST client, whether the method requires authentication (automatically handled if API keys are provided), as well as the exact endpoint each method is connected to.

This can be used to easily find which method to call, once you have found which endpoint you're looking to use.

All REST clients are in the src folder. For usage examples, make sure to check the examples folder.

List of clients:

If anything is missing or wrong, please open an issue or let us know in our Node.js Traders telegram group!

How to use table

Table consists of 4 parts:

  • Function name
  • AUTH
  • HTTP Method
  • Endpoint

Function name is the name of the function that can be called through the SDK. Check examples folder in the repo for more help on how to use them!

AUTH is a boolean value that indicates if the function requires authentication - which means you need to pass your API key and secret to the SDK.

HTTP Method shows HTTP method that the function uses to call the endpoint. Sometimes endpoints can have same URL, but different HTTP method so you can use this column to differentiate between them.

Endpoint is the URL that the function uses to call the endpoint. Best way to find exact function you need for the endpoint is to search for URL in this table and find corresponding function name.

rest-client-v5.ts

This table includes all endpoints from the official Exchange API docs and corresponding SDK functions for each endpoint that are found in rest-client-v5.ts.

Function AUTH HTTP Method Endpoint
fetchServerTime() GET /v5/market/time
requestDemoTradingFunds() 🔐 POST /v5/account/demo-apply-money
getKline() GET /v5/market/kline
getMarkPriceKline() GET /v5/market/mark-price-kline
getIndexPriceKline() GET /v5/market/index-price-kline
getPremiumIndexPriceKline() GET /v5/market/premium-index-price-kline
getOrderbook() GET /v5/market/orderbook
getTickers() GET /v5/market/tickers
getFundingRateHistory() GET /v5/market/funding/history
getPublicTradingHistory() GET /v5/market/recent-trade
getOpenInterest() GET /v5/market/open-interest
getHistoricalVolatility() GET /v5/market/historical-volatility
getInsurance() GET /v5/market/insurance
getRiskLimit() GET /v5/market/risk-limit
getOptionDeliveryPrice() GET /v5/market/delivery-price
getDeliveryPrice() GET /v5/market/delivery-price
getLongShortRatio() GET /v5/market/account-ratio
submitOrder() 🔐 POST /v5/order/create
amendOrder() 🔐 POST /v5/order/amend
cancelOrder() 🔐 POST /v5/order/cancel
getActiveOrders() 🔐 GET /v5/order/realtime
cancelAllOrders() 🔐 POST /v5/order/cancel-all
getHistoricOrders() 🔐 GET /v5/order/history
batchSubmitOrders() 🔐 POST /v5/order/create-batch
batchAmendOrders() 🔐 POST /v5/order/amend-batch
batchCancelOrders() 🔐 POST /v5/order/cancel-batch
getSpotBorrowCheck() 🔐 GET /v5/order/spot-borrow-check
setDisconnectCancelAllWindow() 🔐 POST /v5/order/disconnected-cancel-all
setDisconnectCancelAllWindowV2() 🔐 POST /v5/order/disconnected-cancel-all
getPositionInfo() 🔐 GET /v5/position/list
setLeverage() 🔐 POST /v5/position/set-leverage
switchIsolatedMargin() 🔐 POST /v5/position/switch-isolated
setTPSLMode() 🔐 POST /v5/position/set-tpsl-mode
switchPositionMode() 🔐 POST /v5/position/switch-mode
setRiskLimit() 🔐 POST /v5/position/set-risk-limit
setTradingStop() 🔐 POST /v5/position/trading-stop
setAutoAddMargin() 🔐 POST /v5/position/set-auto-add-margin
addOrReduceMargin() 🔐 POST /v5/position/add-margin
getExecutionList() 🔐 GET /v5/execution/list
getClosedPnL() 🔐 GET /v5/position/closed-pnl
movePosition() 🔐 POST /v5/position/move-positions
getMovePositionHistory() 🔐 GET /v5/position/move-history
confirmNewRiskLimit() 🔐 POST /v5/position/confirm-pending-mmr
getPreUpgradeOrderHistory() 🔐 GET /v5/pre-upgrade/order/history
getPreUpgradeTradeHistory() 🔐 GET /v5/pre-upgrade/execution/list
getPreUpgradeClosedPnl() 🔐 GET /v5/pre-upgrade/position/closed-pnl
getPreUpgradeTransactions() 🔐 GET /v5/pre-upgrade/account/transaction-log
getPreUpgradeOptionDeliveryRecord() 🔐 GET /v5/pre-upgrade/asset/delivery-record
getPreUpgradeUSDCSessionSettlements() 🔐 GET /v5/pre-upgrade/asset/settlement-record
getWalletBalance() 🔐 GET /v5/account/wallet-balance
upgradeToUnifiedAccount() 🔐 POST /v5/account/upgrade-to-uta
getBorrowHistory() 🔐 GET /v5/account/borrow-history
repayLiability() 🔐 POST /v5/account/quick-repayment
setCollateralCoin() 🔐 POST /v5/account/set-collateral-switch
batchSetCollateralCoin() 🔐 POST /v5/account/set-collateral-switch-batch
getCollateralInfo() 🔐 GET /v5/account/collateral-info
getCoinGreeks() 🔐 GET /v5/asset/coin-greeks
getFeeRate() 🔐 GET /v5/account/fee-rate
getAccountInfo() 🔐 GET /v5/account/info
getTransactionLog() 🔐 GET /v5/account/transaction-log
getClassicTransactionLogs() 🔐 GET /v5/account/contract-transaction-log
getSMPGroup() 🔐 GET /v5/account/smp-group
setMarginMode() 🔐 POST /v5/account/set-margin-mode
setSpotHedging() 🔐 POST /v5/account/set-hedging-mode
setMMP() 🔐 POST /v5/account/mmp-modify
resetMMP() 🔐 POST /v5/account/mmp-reset
getMMPState() 🔐 GET /v5/account/mmp-state
getDCPInfo() 🔐 GET /v5/account/query-dcp-info
getCoinExchangeRecords() 🔐 GET /v5/asset/exchange/order-record
getDeliveryRecord() 🔐 GET /v5/asset/delivery-record
getSettlementRecords() 🔐 GET /v5/asset/settlement-record
getAssetInfo() 🔐 GET /v5/asset/transfer/query-asset-info
getAllCoinsBalance() 🔐 GET /v5/asset/transfer/query-account-coins-balance
getCoinBalance() 🔐 GET /v5/asset/transfer/query-account-coin-balance
getTransferableCoinList() 🔐 GET /v5/asset/transfer/query-transfer-coin-list
createInternalTransfer() 🔐 POST /v5/asset/transfer/inter-transfer
getInternalTransferRecords() 🔐 GET /v5/asset/transfer/query-inter-transfer-list
getSubUID() 🔐 GET /v5/asset/transfer/query-sub-member-list
enableUniversalTransferForSubUIDs() 🔐 POST /v5/asset/transfer/save-transfer-sub-member
createUniversalTransfer() 🔐 POST /v5/asset/transfer/universal-transfer
getUniversalTransferRecords() 🔐 GET /v5/asset/transfer/query-universal-transfer-list
getAllowedDepositCoinInfo() GET /v5/asset/deposit/query-allowed-list
setDepositAccount() 🔐 POST /v5/asset/deposit/deposit-to-account
getDepositRecords() 🔐 GET /v5/asset/deposit/query-record
getSubAccountDepositRecords() 🔐 GET /v5/asset/deposit/query-sub-member-record
getInternalDepositRecords() 🔐 GET /v5/asset/deposit/query-internal-record
getMasterDepositAddress() 🔐 GET /v5/asset/deposit/query-address
getSubDepositAddress() 🔐 GET /v5/asset/deposit/query-sub-member-address
querySubMemberAddress() 🔐 GET /v5/asset/deposit/query-sub-member-address
getCoinInfo() 🔐 GET /v5/asset/coin/query-info
getWithdrawalRecords() 🔐 GET /v5/asset/withdraw/query-record
getWithdrawableAmount() 🔐 GET /v5/asset/withdraw/withdrawable-amount
getExchangeEntities() 🔐 GET /v5/asset/withdraw/vasp/list
submitWithdrawal() 🔐 POST /v5/asset/withdraw/create
cancelWithdrawal() 🔐 POST /v5/asset/withdraw/cancel
getConvertCoins() 🔐 GET /v5/asset/exchange/query-coin-list
requestConvertQuote() 🔐 POST /v5/asset/exchange/quote-apply
confirmConvertQuote() 🔐 POST /v5/asset/exchange/convert-execute
getConvertStatus() 🔐 GET /v5/asset/exchange/convert-result-query
getConvertHistory() 🔐 GET /v5/asset/exchange/query-convert-history
createSubMember() 🔐 POST /v5/user/create-sub-member
createSubUIDAPIKey() 🔐 POST /v5/user/create-sub-api
getSubUIDList() 🔐 GET /v5/user/query-sub-members
getSubUIDListUnlimited() 🔐 GET /v5/user/submembers
getSubAccountAllApiKeys() 🔐 GET /v5/user/sub-apikeys
setSubUIDFrozenState() 🔐 POST /v5/user/frozen-sub-member
getQueryApiKey() 🔐 GET /v5/user/query-api
getUIDWalletType() 🔐 GET /v5/user/query-api
updateMasterApiKey() 🔐 POST /v5/user/update-api
updateSubApiKey() 🔐 POST /v5/user/update-sub-api
deleteMasterApiKey() 🔐 POST /v5/user/delete-api
deleteSubApiKey() 🔐 POST /v5/user/delete-sub-api
deleteSubMember() 🔐 POST /v5/user/del-submember
getAffiliateUserInfo() 🔐 GET /v5/user/aff-customer-info
getLeveragedTokenInfo() GET /v5/spot-lever-token/info
getLeveragedTokenMarket() GET /v5/spot-lever-token/reference
purchaseSpotLeveragedToken() 🔐 POST /v5/spot-lever-token/purchase
redeemSpotLeveragedToken() 🔐 POST /v5/spot-lever-token/redeem
getSpotLeveragedTokenOrderHistory() 🔐 GET /v5/spot-lever-token/order-record
getVIPMarginData() GET /v5/spot-margin-trade/data
getHistoricalInterestRate() 🔐 GET /v5/spot-margin-trade/interest-rate-history
toggleSpotMarginTrade() 🔐 POST /v5/spot-margin-trade/switch-mode
setSpotMarginLeverage() 🔐 POST /v5/spot-margin-trade/set-leverage
getSpotMarginState() 🔐 GET /v5/spot-margin-trade/state
getSpotMarginCoinInfo() 🔐 GET /v5/spot-cross-margin-trade/pledge-token
getSpotMarginBorrowableCoinInfo() 🔐 GET /v5/spot-cross-margin-trade/borrow-token
getSpotMarginInterestAndQuota() 🔐 GET /v5/spot-cross-margin-trade/loan-info
getSpotMarginLoanAccountInfo() 🔐 GET /v5/spot-cross-margin-trade/account
spotMarginBorrow() 🔐 POST /v5/spot-cross-margin-trade/loan
spotMarginRepay() 🔐 POST /v5/spot-cross-margin-trade/repay
getSpotMarginBorrowOrderDetail() 🔐 GET /v5/spot-cross-margin-trade/orders
getSpotMarginRepaymentOrderDetail() 🔐 GET /v5/spot-cross-margin-trade/repay-history
toggleSpotCrossMarginTrade() 🔐 POST /v5/spot-cross-margin-trade/switch
getCollateralCoins() GET /v5/crypto-loan/collateral-data
getBorrowableCoins() GET /v5/crypto-loan/loanable-data
getAccountBorrowCollateralLimit() 🔐 GET /v5/crypto-loan/borrowable-collateralisable-number
borrowCryptoLoan() 🔐 POST /v5/crypto-loan/borrow
repayCryptoLoan() 🔐 POST /v5/crypto-loan/repay
getUnpaidLoanOrders() 🔐 GET /v5/crypto-loan/ongoing-orders
getRepaymentHistory() 🔐 GET /v5/crypto-loan/repayment-history
getCompletedLoanOrderHistory() 🔐 GET /v5/crypto-loan/borrow-history
getMaxAllowedReductionCollateralAmount() 🔐 GET /v5/crypto-loan/max-collateral-amount
adjustCollateralAmount() 🔐 POST /v5/crypto-loan/adjust-ltv
getLoanLTVAdjustmentHistory() 🔐 GET /v5/crypto-loan/adjustment-history
getInstitutionalLendingProductInfo() GET /v5/ins-loan/product-infos
getInstitutionalLendingMarginCoinInfo() GET /v5/ins-loan/ensure-tokens
getInstitutionalLendingMarginCoinInfoWithConversionRate() GET /v5/ins-loan/ensure-tokens-convert
getInstitutionalLendingLoanOrders() 🔐 GET /v5/ins-loan/loan-order
getInstitutionalLendingRepayOrders() 🔐 GET /v5/ins-loan/repaid-history
getInstitutionalLendingLTV() 🔐 GET /v5/ins-loan/ltv
getInstitutionalLendingLTVWithLadderConversionRate() 🔐 GET /v5/ins-loan/ltv-convert
bindOrUnbindUID() 🔐 POST /v5/ins-loan/association-uid
getExchangeBrokerEarnings() 🔐 GET /v5/broker/earnings-info
getExchangeBrokerAccountInfo() 🔐 GET /v5/broker/account-info
getBrokerSubAccountDeposits() 🔐 GET /v5/broker/asset/query-sub-member-deposit-record
getBrokerVoucherSpec() 🔐 POST /v5/broker/award/info
issueBrokerVoucher() 🔐 POST /v5/broker/award/distribute-award
getBrokerIssuedVoucher() 🔐 POST /v5/broker/award/distribution-record