Skip to content

Latest commit

 

History

History
288 lines (265 loc) · 40.3 KB

endpointFunctionList.md

File metadata and controls

288 lines (265 loc) · 40.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.

SpotClient.ts

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

Function AUTH HTTP Method Endpoint
getMyIp() GET api/v1/ip
getServiceStatus() GET api/v1/status
getAccountSummary() 🔐 GET api/v2/user-info
getApikeyInfo() 🔐 GET api/v1/user/api-key
getUserType() 🔐 GET api/v1/hf/accounts/opened
getBalances() 🔐 GET api/v1/accounts
getAccountDetail() 🔐 GET api/v1/accounts/{accountId}
getMarginBalance() 🔐 GET api/v3/margin/accounts
getIsolatedMarginBalance() 🔐 GET api/v3/isolated/accounts
getTransactions() 🔐 GET api/v1/accounts/ledgers
getHFTransactions() 🔐 GET api/v1/hf/accounts/ledgers
getHFMarginTransactions() 🔐 GET api/v3/hf/margin/account/ledgers
createSubAccount() 🔐 POST api/v2/sub/user/created
enableSubAccountMargin() 🔐 POST api/v3/sub/user/margin/enable
enableSubAccountFutures() 🔐 POST api/v3/sub/user/futures/enable
getSubAccountsV2() 🔐 GET api/v2/sub/user
getSubAccountBalance() 🔐 GET api/v1/sub-accounts/{subUserId}
getSubAccountBalancesV2() 🔐 GET api/v2/sub-accounts
createSubAPI() 🔐 POST api/v1/sub/api-key
updateSubAPI() 🔐 POST api/v1/sub/api-key/update
getSubAPIs() 🔐 GET api/v1/sub/api-key
deleteSubAPI() 🔐 DELETE api/v1/sub/api-key
createDepositAddressV3() 🔐 POST api/v3/deposit-address/create
getDepositAddressesV3() 🔐 GET api/v3/deposit-addresses
getDeposits() 🔐 GET api/v1/deposits
getWithdrawalQuotas() 🔐 GET api/v1/withdrawals/quotas
submitWithdrawV3() 🔐 POST api/v3/withdrawals
cancelWithdrawal() 🔐 DELETE api/v1/withdrawals/{withdrawalId}
getWithdrawals() 🔐 GET api/v1/withdrawals
getTransferable() 🔐 GET api/v1/accounts/transferable
submitFlexTransfer() 🔐 POST api/v3/accounts/universal-transfer
getBasicUserFee() 🔐 GET api/v1/base-fee
getTradingPairFee() 🔐 GET api/v1/trade-fees
getAnnouncements() GET api/v3/announcements
getCurrency() GET api/v3/currencies/{currency}
getCurrencies() GET api/v3/currencies
getSymbol() GET api/v2/symbols/{symbol}
getSymbols() GET api/v2/symbols
getTicker() GET api/v1/market/orderbook/level1
getTickers() GET api/v1/market/allTickers
getTradeHistories() GET api/v1/market/histories
getKlines() GET api/v1/market/candles
getOrderBookLevel20() GET api/v1/market/orderbook/level2_20
getOrderBookLevel100() GET api/v1/market/orderbook/level2_100
getFullOrderBook() 🔐 GET api/v3/market/orderbook/level2
getCallAuctionPartOrderBook() GET api/v1/market/orderbook/callauction/level2_{size}
getCallAuctionInfo() GET api/v1/market/callauctionData
getFiatPrice() GET api/v1/prices
get24hrStats() GET api/v1/market/stats
getMarkets() GET api/v1/markets
submitHFOrder() 🔐 POST api/v1/hf/orders
submitHFOrderSync() 🔐 POST api/v1/hf/orders/sync
submitHFOrderTest() 🔐 POST api/v1/hf/orders/test
submitHFMultipleOrders() 🔐 POST api/v1/hf/orders/multi
submitHFMultipleOrdersSync() 🔐 POST api/v1/hf/orders/multi/sync
cancelHFOrder() 🔐 DELETE api/v1/hf/orders/{orderId}
cancelHFOrderSync() 🔐 DELETE api/v1/hf/orders/sync/{orderId}
cancelHFOrderByClientOId() 🔐 DELETE api/v1/hf/orders/client-order/{clientOid}
cancelHFOrderSyncByClientOId() 🔐 DELETE api/v1/hf/orders/sync/client-order/{clientOid}
cancelHFOrdersNumber() 🔐 DELETE api/v1/hf/orders/cancel/{orderId}
cancelHFAllOrdersBySymbol() 🔐 DELETE api/v1/hf/orders
cancelHFAllOrders() 🔐 DELETE api/v1/hf/orders/cancelAll
updateHFOrder() 🔐 POST api/v1/hf/orders/alter
getHFOrderDetailsByOrderId() 🔐 GET api/v1/hf/orders/{orderId}
getHFOrderDetailsByClientOid() 🔐 GET api/v1/hf/orders/client-order/{clientOid}
getHFActiveSymbols() 🔐 GET api/v1/hf/orders/active/symbols
getHFActiveOrders() 🔐 GET api/v1/hf/orders/active
getHFCompletedOrders() 🔐 GET api/v1/hf/orders/done
getHFFilledOrders() 🔐 GET api/v1/hf/fills
cancelHFOrderAutoSettingQuery() 🔐 GET api/v1/hf/orders/dead-cancel-all/query
cancelHFOrderAutoSetting() 🔐 POST api/v1/hf/orders/dead-cancel-all
submitStopOrder() 🔐 POST api/v1/stop-order
cancelStopOrderByClientOid() 🔐 DELETE api/v1/stop-order/cancelOrderByClientOid
cancelStopOrderById() 🔐 DELETE api/v1/stop-order/{orderId}
cancelStopOrders() 🔐 DELETE api/v1/stop-order/cancel
getStopOrders() 🔐 GET api/v1/stop-order
getStopOrderByOrderId() 🔐 GET api/v1/stop-order/{orderId}
getStopOrderByClientOid() 🔐 GET api/v1/stop-order/queryOrderByClientOid
submitOCOOrder() 🔐 POST api/v3/oco/order
cancelOCOOrderById() 🔐 DELETE api/v3/oco/order/{orderId}
cancelOCOOrderByClientOid() 🔐 DELETE api/v3/oco/client-order/{clientOid}
cancelMultipleOCOOrders() 🔐 DELETE api/v3/oco/orders
getOCOOrderByOrderId() 🔐 GET api/v3/oco/order/{orderId}
getOCOOrderByClientOid() 🔐 GET api/v3/oco/client-order/{clientOid}
getOCOOrderDetails() 🔐 GET api/v3/oco/order/details/{orderId}
getOCOOrders() 🔐 GET api/v3/oco/orders
getMarginActivePairsV3() 🔐 GET api/v3/margin/symbols
getMarginConfigInfo() GET api/v1/margin/config
getMarginLeveragedToken() 🔐 GET api/v3/etf/info
getMarginMarkPrices() GET api/v3/mark-price/all-symbols
getMarginMarkPrice() GET api/v1/mark-price/{symbol}/current
getIsolatedMarginSymbolsConfig() 🔐 GET api/v1/isolated/symbols
submitHFMarginOrder() 🔐 POST api/v3/hf/margin/order
submitHFMarginOrderTest() 🔐 POST api/v3/hf/margin/order/test
cancelHFMarginOrder() 🔐 DELETE api/v3/hf/margin/orders/{orderId}
cancelHFMarginOrderByClientOid() 🔐 DELETE api/v3/hf/margin/orders/client-order/{clientOid}
cancelHFAllMarginOrders() 🔐 DELETE api/v3/hf/margin/orders
getHFMarginOpenSymbols() 🔐 GET api/v3/hf/margin/order/active/symbols
getHFActiveMarginOrders() 🔐 GET api/v3/hf/margin/orders/active
getHFMarginFilledOrders() 🔐 GET api/v3/hf/margin/orders/done
getHFMarginFills() 🔐 GET api/v3/hf/margin/fills
getHFMarginOrderByOrderId() 🔐 GET api/v3/hf/margin/orders/{orderId}
getHFMarginOrderByClientOid() 🔐 GET api/v3/hf/margin/orders/client-order/{clientOid}?symbol={symbol}
marginBorrowV3() 🔐 POST api/v3/margin/borrow
getMarginBorrowHistoryV3() 🔐 GET api/v3/margin/borrow
marginRepayV3() 🔐 POST api/v3/margin/repay
getMarginRepayHistoryV3() 🔐 GET api/v3/margin/repay
getMarginInterestRecordsV3() 🔐 GET api/v3/margin/interest
updateMarginLeverageV3() 🔐 POST api/v3/position/update-user-leverage
getLendingCurrencyV3() GET api/v3/project/list
getLendingInterestRateV3() GET api/v3/project/marketInterestRate
submitLendingSubscriptionV3() 🔐 POST api/v3/purchase
updateLendingSubscriptionOrdersV3() 🔐 POST api/v3/lend/purchase/update
getLendingSubscriptionOrdersV3() 🔐 GET api/v3/purchase/orders
submitLendingRedemptionV3() 🔐 POST api/v3/redeem
getLendingRedemptionOrdersV3() 🔐 GET api/v3/redeem/orders
getMarginRiskLimitConfig() 🔐 GET api/v3/margin/currencies
subscribeEarnFixedIncome() 🔐 POST api/v1/earn/orders
getEarnRedeemPreview() 🔐 GET api/v1/earn/redeem-preview
submitRedemption() 🔐 DELETE api/v1/earn/orders
getEarnSavingsProducts() 🔐 GET api/v1/earn/saving/products
getEarnPromotionProducts() 🔐 GET api/v1/earn/promotion/products
getEarnFixedIncomeHoldAssets() 🔐 GET api/v1/earn/hold-assets
getEarnStakingProducts() 🔐 GET api/v1/earn/staking/products
getEarnKcsStakingProducts() 🔐 GET api/v1/earn/kcs-staking/products
getEarnEthStakingProducts() 🔐 GET api/v1/earn/eth-staking/products
getDiscountRateConfigs() 🔐 GET api/v1/otc-loan/discount-rate-configs
getOtcLoan() 🔐 GET api/v1/otc-loan/loan
getOtcLoanAccounts() 🔐 GET api/v1/otc-loan/accounts
getAffiliateUserRebateInfo() 🔐 GET api/v2/affiliate/inviter/statistics
getBrokerRebateOrderDownloadLink() 🔐 GET api/v1/broker/api/rebase/download
getPublicWSConnectionToken() POST api/v1/bullet-public
getPrivateWSConnectionToken() 🔐 POST api/v1/bullet-private
getSubAccountsV1() 🔐 GET api/v1/sub/user
getSubAccountBalancesV1() 🔐 GET api/v1/sub-accounts
getMarginBalances() 🔐 GET api/v1/margin/account
createDepositAddress() 🔐 POST api/v1/deposit-addresses
getDepositAddressesV2() 🔐 GET api/v2/deposit-addresses
getDepositAddressV1() 🔐 GET api/v1/deposit-addresses
getHistoricalDepositsV1() 🔐 GET api/v1/hist-deposits
getHistoricalWithdrawalsV1() 🔐 GET api/v1/hist-withdrawals
submitWithdraw() 🔐 POST api/v1/withdrawals
submitTransferMasterSub() 🔐 POST api/v2/accounts/sub-transfer
submitInnerTransfer() 🔐 POST api/v2/accounts/inner-transfer
submitOrder() 🔐 POST api/v1/orders
submitOrderTest() 🔐 POST api/v1/orders/test
submitMultipleOrders() 🔐 POST api/v1/orders/multi
cancelOrderById() 🔐 DELETE api/v1/orders/{orderId}
cancelOrderByClientOid() 🔐 DELETE api/v1/order/client-order/{clientOid}
cancelAllOrders() 🔐 DELETE api/v1/orders
getOrders() 🔐 GET api/v1/orders
getRecentOrders() 🔐 GET api/v1/limit/orders
getOrderByOrderId() 🔐 GET api/v1/orders/{orderId}
getOrderByClientOid() 🔐 GET api/v1/order/client-order/{clientOid}
getFills() 🔐 GET api/v1/fills
getRecentFills() 🔐 GET api/v1/limit/fills
submitMarginOrder() 🔐 POST api/v1/margin/order
submitMarginOrderTest() 🔐 POST api/v1/margin/order/test
getIsolatedMarginAccounts() 🔐 GET api/v1/isolated/accounts
getIsolatedMarginAccount() 🔐 GET api/v1/isolated/account/{symbol}

FuturesClient.ts

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

Function AUTH HTTP Method Endpoint
getBalance() 🔐 GET api/v1/account-overview
getTransactions() 🔐 GET api/v1/transaction-history
getSubBalances() 🔐 GET api/v1/account-overview-all
getTradingPairFee() 🔐 GET api/v1/trade-fees
getSymbol() GET api/v1/contracts/{symbol}
getSymbols() GET api/v1/contracts/active
getTicker() GET api/v1/ticker
getTickers() GET api/v1/allTickers
getFullOrderBookLevel2() GET api/v1/level2/snapshot
getPartOrderBookLevel2Depth20() GET api/v1/level2/depth20
getPartOrderBookLevel2Depth100() GET api/v1/level2/depth100
getMarketTrades() GET api/v1/trade/history
getKlines() GET api/v1/kline/query
getMarkPrice() GET api/v1/mark-price/{symbol}/current
getIndex() GET api/v1/index/query
getInterestRates() GET api/v1/interest/query
getPremiumIndex() GET api/v1/premium/query
get24HourTransactionVolume() GET api/v1/trade-statistics
getServiceStatus() GET api/v1/status
submitOrder() 🔐 POST api/v1/orders
submitNewOrderTest() 🔐 POST api/v1/orders/test
submitMultipleOrders() 🔐 POST api/v1/orders/multi
submitSLTPOrder() 🔐 POST api/v1/st-orders
cancelOrderById() 🔐 DELETE api/v1/orders/{orderId}
cancelOrderByClientOid() 🔐 DELETE api/v1/orders/client-order/{clientOid}
batchCancelOrders() 🔐 DELETE api/v1/orders/multi-cancel
cancelAllOrdersV3() 🔐 DELETE api/v3/orders
cancelAllStopOrders() 🔐 DELETE api/v1/stopOrders
getOrderByOrderId() 🔐 GET api/v1/orders/{orderId}
getOrderByClientOrderId() 🔐 GET api/v1/orders/byClientOid
getOrders() 🔐 GET api/v1/orders
getRecentOrders() 🔐 GET api/v1/recentDoneOrders
getStopOrders() 🔐 GET api/v1/stopOrders
getOpenOrderStatistics() 🔐 GET api/v1/openOrderStatistics
getRecentFills() 🔐 GET api/v1/recentFills
getFills() 🔐 GET api/v1/fills
getMarginMode() 🔐 GET api/v2/position/getMarginMode
updateMarginMode() 🔐 POST api/v2/position/changeMarginMode
getMaxOpenSize() 🔐 GET api/v2/getMaxOpenSize
getPosition() 🔐 GET api/v1/position
getPositions() 🔐 GET api/v1/positions
getHistoryPositions() 🔐 GET api/v1/history-positions
getMaxWithdrawMargin() 🔐 GET api/v1/margin/maxWithdrawMargin
getCrossMarginLeverage() 🔐 GET api/v2/getCrossUserLeverage
changeCrossMarginLeverage() 🔐 POST api/v2/changeCrossUserLeverage
depositMargin() 🔐 POST api/v1/position/margin/deposit-margin
withdrawMargin() 🔐 POST api/v1/margin/withdrawMargin
getRiskLimitLevel() 🔐 GET api/v1/contracts/risk-limit/{symbol}
updateRiskLimitLevel() 🔐 POST api/v1/position/risk-limit-level/change
getFundingRate() 🔐 GET api/v1/funding-rate/{symbol}/current
getFundingRates() 🔐 GET api/v1/contract/funding-rates
getFundingHistory() 🔐 GET api/v1/funding-history
submitCopyTradeOrder() 🔐 POST api/v1/copy-trade/futures/orders
submitCopyTradeOrderTest() 🔐 POST api/v1/copy-trade/futures/orders/test
submitCopyTradeSLTPOrder() 🔐 POST api/v1/copy-trade/futures/st-orders
cancelCopyTradeOrderById() 🔐 DELETE api/v1/copy-trade/futures/orders
cancelCopyTradeOrderByClientOid() 🔐 DELETE api/v1/copy-trade/futures/orders/client-order
getCopyTradeMaxOpenSize() 🔐 GET api/v1/copy-trade/futures/get-max-open-size
getCopyTradeMaxWithdrawMargin() 🔐 GET api/v1/copy-trade/futures/position/margin/max-withdraw-margin
addCopyTradeIsolatedMargin() 🔐 POST api/v1/copy-trade/futures/position/margin/deposit-margin
removeCopyTradeIsolatedMargin() 🔐 POST api/v1/copy-trade/futures/position/margin/withdraw-margin
modifyCopyTradeRiskLimitLevel() 🔐 POST api/v1/copy-trade/futures/position/risk-limit-level/change
updateCopyTradeAutoDepositStatus() 🔐 POST api/v1/copy-trade/futures/position/margin/auto-deposit-status
getBrokerRebateOrderDownloadLink() 🔐 GET api/v1/broker/api/rebase/download
getPublicWSConnectionToken() POST api/v1/bullet-public
getPrivateWSConnectionToken() 🔐 POST api/v1/bullet-private
submitTransferOut() 🔐 POST api/v3/transfer-out
submitTransferIn() 🔐 POST api/v1/transfer-in
getTransfers() 🔐 GET api/v1/transfer-list
updateAutoDepositStatus() 🔐 POST api/v1/position/margin/auto-deposit-status