Skip to content

Latest commit

 

History

History
319 lines (299 loc) · 46.7 KB

endpointFunctionList.md

File metadata and controls

319 lines (299 loc) · 46.7 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.

RestClient.ts

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

Function AUTH HTTP Method Endpoint
getSystemMaintenanceStatus() GET /v1/public/system_info
submitWithdrawal() 🔐 POST /withdrawals
submitSpotMainAccountTransfer() 🔐 POST /withdrawals/push
cancelWithdrawal() 🔐 DELETE /withdrawals/{withdrawal_id}
getCurrencyChains() GET /wallet/currency_chains
createDepositAddress() 🔐 GET /wallet/deposit_address
getWithdrawalRecords() 🔐 GET /wallet/withdrawals
getDepositRecords() 🔐 GET /wallet/deposits
submitTransfer() 🔐 POST /wallet/transfers
submitMainSubTransfer() 🔐 POST /wallet/sub_account_transfers
getMainSubTransfers() 🔐 GET /wallet/sub_account_transfers
submitSubToSubTransfer() 🔐 POST /wallet/sub_account_to_sub_account
getWithdrawalStatus() 🔐 GET /wallet/withdraw_status
getSubBalance() 🔐 GET /wallet/sub_account_balances
getSubMarginBalances() 🔐 GET /wallet/sub_account_margin_balances
getSubFuturesBalances() 🔐 GET /wallet/sub_account_futures_balances
getSubCrossMarginBalances() 🔐 GET /wallet/sub_account_cross_margin_balances
getSavedAddresses() 🔐 GET /wallet/saved_address
getTradingFees() 🔐 GET /wallet/fee
getBalances() 🔐 GET /wallet/total_balance
getSmallBalances() 🔐 GET /wallet/small_balance
convertSmallBalance() 🔐 POST /wallet/small_balance
getSmallBalanceHistory() 🔐 GET /wallet/small_balance_history
getPushOrders() 🔐 GET /wallet/push
createSubAccount() 🔐 POST /sub_accounts
getSubAccounts() 🔐 GET /sub_accounts
getSubAccount() 🔐 GET /sub_accounts/{user_id}
createSubAccountApiKey() 🔐 POST /sub_accounts/{user_id}/keys
getSubAccountApiKeys() 🔐 GET /sub_accounts/{user_id}/keys
updateSubAccountApiKey() 🔐 PUT /sub_accounts/{user_id}/keys/{key}
deleteSubAccountApiKey() 🔐 DELETE /sub_accounts/{user_id}/keys/{key}
getSubAccountApiKey() 🔐 GET /sub_accounts/{user_id}/keys/{key}
lockSubAccount() 🔐 POST /sub_accounts/{user_id}/lock
unlockSubAccount() 🔐 POST /sub_accounts/{user_id}/unlock
getSubAccountMode() 🔐 GET /sub_accounts/unified_mode
getUnifiedAccountInfo() 🔐 GET /unified/accounts
getUnifiedMaxBorrow() 🔐 GET /unified/borrowable
getUnifiedMaxTransferable() 🔐 GET /unified/transferable
submitUnifiedBorrowOrRepay() 🔐 POST /unified/loans
getUnifiedLoans() 🔐 GET /unified/loans
getUnifiedLoanRecords() 🔐 GET /unified/loan_records
getUnifiedInterestRecords() 🔐 GET /unified/interest_records
getUnifiedRiskUnitDetails() 🔐 GET /unified/risk_units
setUnifiedAccountMode() 🔐 PUT /unified/unified_mode
getUnifiedAccountMode() 🔐 GET /unified/unified_mode
getUnifiedEstimateRate() 🔐 GET /unified/estimate_rate
getUnifiedCurrencyDiscountTiers() GET /unified/currency_discount_tiers
getLoanMarginTiers() GET /unified/loan_margin_tiers
portfolioMarginCalculate() POST /unified/portfolio_calculator
getSpotCurrencies() GET /spot/currencies
getSpotCurrency() GET /spot/currencies/{currency}
getSpotCurrencyPairs() GET /spot/currency_pairs
getSpotCurrencyPair() GET /spot/currency_pairs/{currency_pair}
getSpotTicker() GET /spot/tickers
getSpotOrderBook() GET /spot/order_book
getSpotTrades() GET /spot/trades
getSpotCandles() GET /spot/candlesticks
getSpotFeeRates() 🔐 GET /spot/fee
getSpotBatchFeeRates() 🔐 GET /spot/batch_fee
getSpotAccounts() 🔐 GET /spot/accounts
getSpotAccountBook() 🔐 GET /spot/account_book
submitSpotBatchOrders() 🔐 POST /spot/batch_orders
getSpotOpenOrders() 🔐 GET /spot/open_orders
submitSpotClosePosCrossDisabled() 🔐 POST /spot/cross_liquidate_orders
submitSpotOrder() 🔐 POST /spot/orders
getSpotOrders() 🔐 GET /spot/orders
cancelSpotOpenOrders() 🔐 DELETE /spot/orders
batchCancelSpotOrders() 🔐 POST /spot/cancel_batch_orders
getSpotOrder() 🔐 GET /spot/orders/{order_id}
updateSpotOrder() 🔐 PATCH /spot/orders/{order_id}
cancelSpotOrder() 🔐 DELETE /spot/orders/{order_id}
getSpotTradingHistory() 🔐 GET /spot/my_trades
submitSpotCountdownOrders() 🔐 POST /spot/countdown_cancel_all
batchUpdateSpotOrders() 🔐 POST /spot/amend_batch_orders
submitSpotPriceTriggerOrder() 🔐 POST /spot/price_orders
getSpotAutoOrders() 🔐 GET /spot/price_orders
cancelAllOpenSpotOrders() 🔐 DELETE /spot/price_orders
getPriceTriggeredOrder() 🔐 GET /spot/price_orders/{order_id}
cancelSpotTriggeredOrder() 🔐 DELETE /spot/price_orders/{order_id}
getMarginAccounts() 🔐 GET /margin/accounts
getMarginBalanceHistory() 🔐 GET /margin/account_book
getFundingAccounts() 🔐 GET /margin/funding_accounts
updateAutoRepaymentSetting() 🔐 POST /margin/auto_repay
getAutoRepaymentSetting() 🔐 GET /margin/auto_repay
getMarginTransferableAmount() 🔐 GET /margin/transferable
getCrossMarginCurrencies() GET /margin/cross/currencies
getCrossMarginCurrency() GET /margin/cross/currencies/{currency}
getCrossMarginAccount() 🔐 GET /margin/cross/accounts
getCrossMarginAccountHistory() 🔐 GET /margin/cross/account_book
submitCrossMarginBorrowLoan() 🔐 POST /margin/cross/loans
getCrossMarginBorrowHistory() 🔐 GET /margin/cross/loans
getCrossMarginBorrowLoan() 🔐 GET /margin/cross/loans/{loan_id}
submitCrossMarginRepayment() 🔐 POST /margin/cross/repayments
getCrossMarginRepayments() 🔐 GET /margin/cross/repayments
getCrossMarginInterestRecords() 🔐 GET /margin/cross/interest_records
getCrossMarginTransferableAmount() 🔐 GET /margin/cross/transferable
getEstimatedInterestRates() 🔐 GET /margin/cross/estimate_rate
getCrossMarginBorrowableAmount() 🔐 GET /margin/cross/borrowable
getLendingMarkets() GET /margin/uni/currency_pairs
getLendingMarket() GET /margin/uni/currency_pairs/{currency_pair}
getEstimatedInterestRate() 🔐 GET /margin/uni/estimate_rate
submitMarginUNIBorrowOrRepay() 🔐 POST /margin/uni/loans
getMarginUNILoans() 🔐 GET /margin/uni/loans
getMarginUNILoanRecords() 🔐 GET /margin/uni/loan_records
getMarginUNIInterestRecords() 🔐 GET /margin/uni/interest_records
getMarginUNIMaxBorrow() 🔐 GET /margin/uni/borrowable
getFlashSwapCurrencyPairs() GET /flash_swap/currency_pairs
submitFlashSwapOrder() 🔐 POST /flash_swap/orders
getFlashSwapOrders() 🔐 GET /flash_swap/orders
getFlashSwapOrder() 🔐 GET /flash_swap/orders/{order_id}
submitFlashSwapOrderPreview() 🔐 POST /flash_swap/orders/preview
getFuturesContracts() GET /futures/{settle}/contracts
getFuturesContract() GET /futures/{settle}/contracts/{contract}
getFuturesOrderBook() GET /futures/{settle}/order_book
getFuturesTrades() GET /futures/{settle}/trades
getFuturesCandles() GET /futures/{settle}/candlesticks
getPremiumIndexKLines() GET /futures/{settle}/premium_index
getFuturesTickers() GET /futures/{settle}/tickers
getFundingRates() GET /futures/{settle}/funding_rate
getFuturesInsuranceBalanceHistory() GET /futures/{settle}/insurance
getFuturesStats() GET /futures/{settle}/contract_stats
getIndexConstituents() GET /futures/{settle}/index_constituents/{index}
getLiquidationHistory() GET /futures/{settle}/liq_orders
getRiskLimitTiers() GET /futures/{settle}/risk_limit_tiers
getFuturesAccount() 🔐 GET /futures/{settle}/accounts
getFuturesAccountBook() 🔐 GET /futures/{settle}/account_book
getFuturesPositions() 🔐 GET /futures/{settle}/positions
getFuturesPosition() 🔐 GET /futures/{settle}/positions/{contract}
updateFuturesMargin() 🔐 POST /futures/{settle}/positions/{contract}/margin
updateFuturesLeverage() 🔐 POST /futures/{settle}/positions/{contract}/leverage
updatePositionRiskLimit() 🔐 POST /futures/{settle}/positions/{contract}/risk_limit
updateFuturesDualMode() 🔐 POST /futures/{settle}/dual_mode
getDualModePosition() 🔐 GET /futures/{settle}/dual_comp/positions/{contract}
updateDualModePositionMargin() 🔐 POST /futures/{settle}/dual_comp/positions/{contract}/margin
updateDualModePositionLeverage() 🔐 POST /futures/{settle}/dual_comp/positions/{contract}/leverage
updateDualModePositionRiskLimit() 🔐 POST /futures/{settle}/dual_comp/positions/{contract}/risk_limit
submitFuturesOrder() 🔐 POST /futures/{settle}/orders
getFuturesOrders() 🔐 GET /futures/{settle}/orders
cancelAllFuturesOrders() 🔐 DELETE /futures/{settle}/orders
getFuturesOrdersByTimeRange() 🔐 GET /futures/{settle}/orders_timerange
submitFuturesBatchOrders() 🔐 POST /futures/{settle}/batch_orders
getFuturesOrder() 🔐 GET /futures/{settle}/orders/{order_id}
cancelFuturesOrder() 🔐 DELETE /futures/{settle}/orders/{order_id}
updateFuturesOrder() 🔐 PUT /futures/{settle}/orders/{order_id}
getFuturesTradingHistory() 🔐 GET /futures/{settle}/my_trades
getFuturesTradingHistoryByTimeRange() 🔐 GET /futures/{settle}/my_trades_timerange
getFuturesPositionHistory() 🔐 GET /futures/{settle}/position_close
getFuturesLiquidationHistory() 🔐 GET /futures/{settle}/liquidates
getFuturesAutoDeleveragingHistory() 🔐 GET /futures/{settle}/auto_deleverages
setFuturesOrderCancelCountdown() 🔐 POST /futures/{settle}/countdown_cancel_all
getFuturesUserTradingFees() 🔐 GET /futures/{settle}/fee
batchCancelFuturesOrders() 🔐 POST /futures/{settle}/batch_cancel_orders
batchUpdateFuturesOrders() 🔐 POST /futures/{settle}/batch_amend_orders
submitFuturesPriceTriggeredOrder() 🔐 POST /futures/{settle}/price_orders
getFuturesAutoOrders() 🔐 GET /futures/{settle}/price_orders
cancelAllOpenFuturesOrders() 🔐 DELETE /futures/{settle}/price_orders
getFuturesPriceTriggeredOrder() 🔐 GET /futures/{settle}/price_orders/{order_id}
cancelFuturesPriceTriggeredOrder() 🔐 DELETE /futures/{settle}/price_orders/{order_id}
getAllDeliveryContracts() GET /delivery/{settle}/contracts
getDeliveryContract() GET /delivery/{settle}/contracts/{contract}
getDeliveryOrderBook() GET /delivery/{settle}/order_book
getDeliveryTrades() GET /delivery/{settle}/trades
getDeliveryCandles() GET /delivery/{settle}/candlesticks
getDeliveryTickers() GET /delivery/{settle}/tickers
getDeliveryInsuranceBalanceHistory() GET /delivery/{settle}/insurance
getDeliveryAccount() 🔐 GET /delivery/{settle}/accounts
getDeliveryBook() 🔐 GET /delivery/{settle}/account_book
getDeliveryPositions() 🔐 GET /delivery/{settle}/positions
getDeliveryPosition() 🔐 GET /delivery/{settle}/positions/{contract}
updateDeliveryMargin() 🔐 POST /delivery/{settle}/positions/{contract}/margin
updateDeliveryLeverage() 🔐 POST /delivery/{settle}/positions/{contract}/leverage
updateDeliveryRiskLimit() 🔐 POST /delivery/{settle}/positions/{contract}/risk_limit
submitDeliveryOrder() 🔐 POST /delivery/{settle}/orders
getDeliveryOrders() 🔐 GET /delivery/{settle}/orders
cancelAllDeliveryOrders() 🔐 DELETE /delivery/{settle}/orders
getDeliveryOrder() 🔐 GET /delivery/{settle}/orders/{order_id}
cancelDeliveryOrder() 🔐 DELETE /delivery/{settle}/orders/{order_id}
getDeliveryTradingHistory() 🔐 GET /delivery/{settle}/my_trades
getDeliveryClosedPositions() 🔐 GET /delivery/{settle}/position_close
getDeliveryLiquidationHistory() 🔐 GET /delivery/{settle}/liquidates
getDeliverySettlementHistory() 🔐 GET /delivery/{settle}/settlements
submitDeliveryTriggeredOrder() 🔐 POST /delivery/{settle}/price_orders
getDeliveryAutoOrders() 🔐 GET /delivery/{settle}/price_orders
cancelAllOpenDeliveryOrders() 🔐 DELETE /delivery/{settle}/price_orders
getDeliveryTriggeredOrder() 🔐 GET /delivery/{settle}/price_orders/{order_id}
cancelTriggeredDeliveryOrder() 🔐 DELETE /delivery/{settle}/price_orders/{order_id}
getOptionsUnderlyings() GET /options/underlyings
getOptionsExpirationTimes() GET /options/expirations
getOptionsContracts() GET /options/contracts
getOptionsContract() GET /options/contracts/{contract}
getOptionsSettlementHistory() GET /options/settlements
getOptionsContractSettlement() GET /options/settlements/{contract}
getOptionsMySettlements() 🔐 GET /options/my_settlements
getOptionsOrderBook() GET /options/order_book
getOptionsTickers() GET /options/tickers
getOptionsUnderlyingTicker() GET /options/underlying/tickers/{underlying}
getOptionsCandles() GET /options/candlesticks
getOptionsUnderlyingCandles() GET /options/underlying/candlesticks
getOptionsTrades() GET /options/trades
getOptionsAccount() 🔐 GET /options/accounts
getOptionsAccountChange() 🔐 GET /options/account_book
getOptionsPositionsUnderlying() 🔐 GET /options/positions
getOptionsPositionContract() 🔐 GET /options/positions/{contract}
getOptionsLiquidation() 🔐 GET /options/position_close
submitOptionsOrder() 🔐 POST /options/orders
getOptionsOrders() 🔐 GET /options/orders
cancelAllOpenOptionsOrders() 🔐 DELETE /options/orders
getOptionsOrder() 🔐 GET /options/orders/{order_id}
cancelOptionsOrder() 🔐 DELETE /options/orders/{order_id}
submitOptionsCountdownCancel() 🔐 POST /options/countdown_cancel_all
getOptionsPersonalHistory() 🔐 GET /options/my_trades
setOptionsMMPSettings() 🔐 POST /options/mmp
getOptionsMMPSettings() 🔐 GET /options/mmp
resetOptionsMMPSettings() 🔐 POST /options/mmp/reset
getLendingCurrencies() GET /earn/uni/currencies
getLendingCurrency() GET /earn/uni/currencies/{currency}
submitLendOrRedeemOrder() 🔐 POST /earn/uni/lends
getLendingOrders() 🔐 GET /earn/uni/lends
updateLendingOrder() 🔐 PATCH /earn/uni/lends
getLendingRecords() 🔐 GET /earn/uni/lend_records
getLendingTotalInterest() 🔐 GET /earn/uni/interests/{currency}
getLendingInterestRecords() 🔐 GET /earn/uni/interest_records
updateInterestReinvestment() 🔐 PUT /earn/uni/interest_reinvest
getLendingInterestStatus() 🔐 GET /earn/uni/interest_status/{currency}
submitLoanOrder() 🔐 POST /loan/collateral/orders
getLoanOrders() 🔐 GET /loan/collateral/orders
getLoanOrder() 🔐 GET /loan/collateral/orders/{order_id}
submitLoanRepay() 🔐 POST /loan/collateral/repay
getLoanRepaymentHistory() 🔐 GET /loan/collateral/repay_records
updateLoanCollateral() 🔐 POST /loan/collateral/collaterals
getLoanCollateralRecords() 🔐 GET /loan/collateral/collaterals
getLoanTotalAmount() 🔐 GET /loan/collateral/total_amount
getLoanCollateralizationRatio() 🔐 GET /loan/collateral/ltv
getLoanSupportedCurrencies() GET /loan/collateral/currencies
submitMultiLoanOrder() 🔐 POST /loan/multi_collateral/orders
getMultiLoanOrders() 🔐 GET /loan/multi_collateral/orders
getMultiLoanOrder() 🔐 GET /loan/multi_collateral/orders/{order_id}
repayMultiLoan() 🔐 POST /loan/multi_collateral/repay
getMultiLoanRepayRecords() 🔐 GET /loan/multi_collateral/repay
updateMultiLoan() 🔐 POST /loan/multi_collateral/mortgage
getMultiLoanAdjustmentRecords() 🔐 GET /loan/multi_collateral/mortgage
getMultiLoanCurrencyQuota() 🔐 GET /loan/multi_collateral/currency_quota
getMultiLoanSupportedCurrencies() GET /loan/multi_collateral/currencies
getMultiLoanRatio() GET /loan/multi_collateral/ltv
getMultiLoanFixedRates() GET /loan/multi_collateral/fixed_rate
submitEth2Swap() 🔐 POST /earn/staking/eth2/swap
getDualInvestmentProducts() GET /earn/dual/investment_plan
getDualInvestmentOrders() 🔐 GET /earn/dual/orders
submitDualInvestmentOrder() 🔐 POST /earn/dual/orders
getStructuredProducts() GET /earn/structured/products
getStructuredProductOrders() 🔐 GET /earn/structured/orders
submitStructuredProductOrder() 🔐 POST /earn/structured/orders
getAccountDetail() 🔐 GET /account/detail
getAccountRateLimit() 🔐 GET /account/rate_limit
createStpGroup() 🔐 POST /account/stp_groups
getStpGroups() 🔐 GET /account/stp_groups
getStpGroupUsers() 🔐 GET /account/stp_groups/{stp_id}/users
addUsersToStpGroup() 🔐 POST /account/stp_groups/{stp_id}/users
deleteUserFromStpGroup() 🔐 DELETE /account/stp_groups/{stp_id}/users
setGTDeduction() 🔐 POST /account/debit_fee
getGTDeduction() 🔐 GET /account/debit_fee
getAgencyTransactionHistory() 🔐 GET /rebate/agency/transaction_history
getAgencyCommissionHistory() 🔐 GET /rebate/agency/commission_history
getPartnerTransactionHistory() 🔐 GET /rebate/partner/transaction_history
getPartnerCommissionHistory() 🔐 GET /rebate/partner/commission_history
getPartnerSubordinateList() 🔐 GET /rebate/partner/sub_list
getBrokerCommissionHistory() 🔐 GET /rebate/broker/commission_history
getBrokerTransactionHistory() 🔐 GET /rebate/broker/transaction_history
getUserRebateInfo() 🔐 GET /rebate/user/info