Skip to main content
This index maps every OKX API endpoint to the corresponding SDK method. Use it to find the right method once you have identified the endpoint you need from the OKX API documentation. Auth — a lock icon indicates the method requires API key, secret, and passphrase to be configured.

RestClient

Trading account

MethodAuthHTTPEndpoint
getAccountInstruments()YesGET/api/v5/account/instruments
getBalance()YesGET/api/v5/account/balance
getPositions()YesGET/api/v5/account/positions
getPositionsHistory()YesGET/api/v5/account/positions-history
getAccountPositionRisk()YesGET/api/v5/account/account-position-risk
getBills()YesGET/api/v5/account/bills
getBillsArchive()YesGET/api/v5/account/bills-archive
requestBillsHistoryDownloadLink()YesPOST/api/v5/account/bills-history-archive
getRequestedBillsHistoryLink()YesGET/api/v5/account/bills-history-archive
getAccountConfiguration()YesGET/api/v5/account/config
setPositionMode()YesPOST/api/v5/account/set-position-mode
setSettleCurrency()YesPOST/api/v5/account/set-settle-currency
setFeeType()YesPOST/api/v5/account/set-fee-type
setLeverage()YesPOST/api/v5/account/set-leverage
getMaxBuySellAmount()YesGET/api/v5/account/max-size
getMaxAvailableTradableAmount()YesGET/api/v5/account/max-avail-size
changePositionMargin()YesPOST/api/v5/account/position/margin-balance
getLeverage()YesGET/api/v5/account/leverage-info
getLeverageEstimatedInfo()YesGET/api/v5/account/adjust-leverage-info
getMaxLoan()YesGET/api/v5/account/max-loan
getFeeRates()YesGET/api/v5/account/trade-fee
getInterestAccrued()YesGET/api/v5/account/interest-accrued
getInterestRate()YesGET/api/v5/account/interest-rate
setGreeksDisplayType()YesPOST/api/v5/account/set-greeks
setIsolatedMode()YesPOST/api/v5/account/set-isolated-mode
getMaxWithdrawals()YesGET/api/v5/account/max-withdrawal
getAccountRiskState()YesGET/api/v5/account/risk-state
setAccountCollateralAssets()YesPOST/api/v5/account/set-collateral-assets
getAccountCollateralAssets()YesGET/api/v5/account/collateral-assets
submitQuickMarginBorrowRepay()YesPOST/api/v5/account/quick-margin-borrow-repay
getQuickMarginBorrowRepayHistory()YesGET/api/v5/account/quick-margin-borrow-repay-history
borrowRepayVIPLoan()YesPOST/api/v5/account/borrow-repay
getVIPLoanBorrowRepayHistory()YesGET/api/v5/account/borrow-repay-history
getVIPInterestAccrued()YesGET/api/v5/account/vip-interest-accrued
getVIPInterestDeducted()YesGET/api/v5/account/vip-interest-deducted
getVIPLoanOrders()YesGET/api/v5/account/vip-loan-order-list
getVIPLoanOrder()YesGET/api/v5/account/vip-loan-order-detail
getBorrowInterestLimits()YesGET/api/v5/account/interest-limits
getFixedLoanBorrowLimit()YesGET/api/v5/account/fixed-loan/borrowing-limit
getFixedLoanBorrowQuote()YesGET/api/v5/account/fixed-loan/borrowing-quote
submitFixedLoanBorrowOrder()YesPOST/api/v5/account/fixed-loan/borrowing-order
updateFixedLoanBorrowOrder()YesPOST/api/v5/account/fixed-loan/amend-borrowing-order
manualRenewFixedLoanBorrowOrder()YesPOST/api/v5/account/fixed-loan/manual-reborrow
repayFixedLoanBorrowOrder()YesPOST/api/v5/account/fixed-loan/repay-borrowing-order
convertFixedLoanToMarketLoan()YesPOST/api/v5/account/fixed-loan/convert-to-market-loan
reduceFixedLoanLiabilities()YesPOST/api/v5/account/fixed-loan/reduce-liabilities
getFixedLoanBorrowOrders()YesGET/api/v5/account/fixed-loan/borrowing-orders-list
manualBorrowRepay()YesPOST/api/v5/account/spot-manual-borrow-repay
setAutoRepay()YesPOST/api/v5/account/set-auto-repay
getBorrowRepayHistory()YesGET/api/v5/account/spot-borrow-repay-history
positionBuilder()YesPOST/api/v5/account/position-builder
updateRiskOffsetAmount()YesPOST/api/v5/account/set-riskOffset-amt
getGreeks()YesGET/api/v5/account/greeks
getPMLimitation()YesGET/api/v5/account/position-tiers
updateRiskOffsetType()YesPOST/api/v5/account/set-riskOffset-type
activateOption()YesPOST/api/v5/account/activate-option
setAutoLoan()YesPOST/api/v5/account/set-auto-loan
presetAccountLevelSwitch()YesPOST/api/v5/account/account-level-switch-preset
getAccountSwitchPrecheck()YesGET/api/v5/account/set-account-switch-precheck
setAccountMode()YesPOST/api/v5/account/set-account-level
resetMMPStatus()YesPOST/api/v5/account/mmp-reset
setMMPConfig()YesPOST/api/v5/account/mmp-config
getMMPConfig()YesGET/api/v5/account/mmp-config
setTradingConfig()YesPOST/api/v5/account/set-trading-config
precheckSetDeltaNeutral()YesGET/api/v5/account/precheck-set-delta-neutral

Order trading

MethodAuthHTTPEndpoint
submitOrder()YesPOST/api/v5/trade/order
submitMultipleOrders()YesPOST/api/v5/trade/batch-orders
cancelOrder()YesPOST/api/v5/trade/cancel-order
cancelMultipleOrders()YesPOST/api/v5/trade/cancel-batch-orders
amendOrder()YesPOST/api/v5/trade/amend-order
amendMultipleOrders()YesPOST/api/v5/trade/amend-batch-orders
closePositions()YesPOST/api/v5/trade/close-position
getOrderDetails()YesGET/api/v5/trade/order
getOrderList()YesGET/api/v5/trade/orders-pending
getOrderHistory()YesGET/api/v5/trade/orders-history
getOrderHistoryArchive()YesGET/api/v5/trade/orders-history-archive
getFills()YesGET/api/v5/trade/fills
getFillsHistory()YesGET/api/v5/trade/fills-history
getEasyConvertCurrencies()YesGET/api/v5/trade/easy-convert-currency-list
submitEasyConvert()YesPOST/api/v5/trade/easy-convert
getEasyConvertHistory()YesGET/api/v5/trade/easy-convert-history
getOneClickRepayCurrencyList()YesGET/api/v5/trade/one-click-repay-currency-list
submitOneClickRepay()YesPOST/api/v5/trade/one-click-repay
getOneClickRepayHistory()YesGET/api/v5/trade/one-click-repay-history
cancelMassOrder()YesPOST/api/v5/trade/mass-cancel
cancelAllAfter()YesPOST/api/v5/trade/cancel-all-after
getAccountRateLimit()YesGET/api/v5/trade/account-rate-limit
submitOrderPrecheck()YesPOST/api/v5/trade/order-precheck
placeAlgoOrder()YesPOST/api/v5/trade/order-algo
cancelAlgoOrder()YesPOST/api/v5/trade/cancel-algos
amendAlgoOrder()YesPOST/api/v5/trade/amend-algos
cancelAdvanceAlgoOrder()YesPOST/api/v5/trade/cancel-advance-algos
getAlgoOrderDetails()YesGET/api/v5/trade/order-algo
getAlgoOrderList()YesGET/api/v5/trade/orders-algo-pending
getAlgoOrderHistory()YesGET/api/v5/trade/orders-algo-history

Grid trading

MethodAuthHTTPEndpoint
placeGridAlgoOrder()YesPOST/api/v5/tradingBot/grid/order-algo
amendGridAlgoOrder()YesPOST/api/v5/tradingBot/grid/amend-order-algo
stopGridAlgoOrder()YesPOST/api/v5/tradingBot/grid/stop-order-algo
closeGridContractPosition()YesPOST/api/v5/tradingBot/grid/close-position
cancelGridContractCloseOrder()YesPOST/api/v5/tradingBot/grid/cancel-close-order
instantTriggerGridAlgoOrder()YesPOST/api/v5/tradingBot/grid/order-instant-trigger
getGridAlgoOrderList()YesGET/api/v5/tradingBot/grid/orders-algo-pending
getGridAlgoOrderHistory()YesGET/api/v5/tradingBot/grid/orders-algo-history
getGridAlgoOrderDetails()YesGET/api/v5/tradingBot/grid/orders-algo-details
getGridAlgoSubOrders()YesGET/api/v5/tradingBot/grid/sub-orders
getGridAlgoOrderPositions()YesGET/api/v5/tradingBot/grid/positions
spotGridWithdrawIncome()YesPOST/api/v5/tradingBot/grid/withdraw-income
computeGridMarginBalance()YesPOST/api/v5/tradingBot/grid/compute-margin-balance
adjustGridMarginBalance()YesPOST/api/v5/tradingBot/grid/margin-balance
adjustGridInvestment()YesPOST/api/v5/tradingBot/grid/adjust-investment
getGridAIParameter()NoGET/api/v5/tradingBot/grid/ai-param
computeGridMinInvestment()NoPOST/api/v5/tradingBot/grid/min-investment
getRSIBackTesting()NoGET/api/v5/tradingBot/public/rsi-back-testing
getMaxGridQuantity()NoGET/api/v5/tradingBot/grid/grid-quantity

Signal bots

MethodAuthHTTPEndpoint
createSignal()YesPOST/api/v5/tradingBot/signal/create-signal
getSignals()YesGET/api/v5/tradingBot/signal/signals
createSignalBot()YesPOST/api/v5/tradingBot/signal/order-algo
cancelSignalBots()YesPOST/api/v5/tradingBot/signal/stop-order-algo
updateSignalMargin()YesPOST/api/v5/tradingBot/signal/margin-balance
updateSignalTPSL()YesPOST/api/v5/tradingBot/signal/amendTPSL
setSignalInstruments()YesPOST/api/v5/tradingBot/signal/set-instruments
getSignalBotOrder()YesGET/api/v5/tradingBot/signal/orders-algo-details
getActiveSignalBot()YesGET/api/v5/tradingBot/signal/orders-algo-details
getSignalBotHistory()YesGET/api/v5/tradingBot/signal/orders-algo-history
getSignalBotPositions()YesGET/api/v5/tradingBot/signal/positions
getSignalBotPositionHistory()YesGET/api/v5/tradingBot/signal/positions-history
closeSignalBotPosition()YesPOST/api/v5/tradingBot/signal/close-position
placeSignalBotSubOrder()YesPOST/api/v5/tradingBot/signal/sub-order
cancelSubOrder()YesPOST/api/v5/tradingBot/signal/cancel-sub-order
getSignalBotSubOrders()YesGET/api/v5/tradingBot/signal/sub-orders
getSignalBotEventHistory()YesGET/api/v5/tradingBot/signal/event-history

Recurring buy

MethodAuthHTTPEndpoint
submitRecurringBuyOrder()YesPOST/api/v5/tradingBot/recurring/order-algo
amendRecurringBuyOrder()YesPOST/api/v5/tradingBot/recurring/amend-order-algo
stopRecurringBuyOrder()YesPOST/api/v5/tradingBot/recurring/stop-order-algo
getRecurringBuyOrders()YesGET/api/v5/tradingBot/recurring/orders-algo-pending
getRecurringBuyOrderHistory()YesGET/api/v5/tradingBot/recurring/orders-algo-history
getRecurringBuyOrderDetails()YesGET/api/v5/tradingBot/recurring/orders-algo-details
getRecurringBuySubOrders()YesGET/api/v5/tradingBot/recurring/sub-orders

Copy trading

MethodAuthHTTPEndpoint
getCopytradingSubpositions()YesGET/api/v5/copytrading/current-subpositions
getCopytradingSubpositionsHistory()YesGET/api/v5/copytrading/subpositions-history
submitCopytradingAlgoOrder()YesPOST/api/v5/copytrading/algo-order
closeCopytradingSubposition()YesPOST/api/v5/copytrading/close-subposition
getCopytradingInstruments()YesGET/api/v5/copytrading/instruments
setCopytradingInstruments()YesPOST/api/v5/copytrading/set-instruments
getCopytradingProfitDetails()YesGET/api/v5/copytrading/profit-sharing-details
getCopytradingTotalProfit()YesGET/api/v5/copytrading/total-profit-sharing
getCopytradingUnrealizedProfit()YesGET/api/v5/copytrading/unrealized-profit-sharing-details
getCopytradingTotalUnrealizedProfit()YesGET/api/v5/copytrading/total-unrealized-profit-sharing
applyCopytradingLeadTrading()YesPOST/api/v5/copytrading/apply-lead-trading
stopCopytradingLeadTrading()YesPOST/api/v5/copytrading/stop-lead-trading
updateCopytradingProfitSharing()YesPOST/api/v5/copytrading/amend-profit-sharing-ratio
getCopytradingAccount()YesGET/api/v5/copytrading/config
setCopytradingFirstCopy()YesPOST/api/v5/copytrading/first-copy-settings
updateCopytradingCopySettings()YesPOST/api/v5/copytrading/amend-copy-settings
stopCopytradingCopy()YesPOST/api/v5/copytrading/stop-copy-trading
getCopytradingCopySettings()YesGET/api/v5/copytrading/copy-settings
getCopytradingBatchLeverageInfo()YesGET/api/v5/copytrading/batch-leverage-info
setCopytradingBatchLeverage()YesPOST/api/v5/copytrading/batch-set-leverage
getCopytradingMyLeadTraders()YesGET/api/v5/copytrading/current-lead-traders
getCopytradingLeadTradersHistory()YesGET/api/v5/copytrading/lead-traders-history
getCopytradingConfig()NoGET/api/v5/copytrading/public-config
getCopytradingLeadRanks()NoGET/api/v5/copytrading/public-lead-traders
getCopytradingLeadWeeklyPnl()NoGET/api/v5/copytrading/public-weekly-pnl
getCopytradingLeadDailyPnl()NoGET/api/v5/copytrading/public-pnl
getCopytradingLeadStats()NoGET/api/v5/copytrading/public-stats
getCopytradingLeadPreferences()NoGET/api/v5/copytrading/public-preference-currency
getCopytradingLeadOpenPositions()NoGET/api/v5/copytrading/public-current-subpositions
getCopytradingLeadPositionHistory()NoGET/api/v5/copytrading/public-subpositions-history
getCopyTraders()NoGET/api/v5/copytrading/public-copy-traders
getCopytradingLeadPrivateRanks()YesGET/api/v5/copytrading/lead-traders
getCopytradingLeadPrivateWeeklyPnl()YesGET/api/v5/copytrading/weekly-pnl
getCopytradingPLeadPrivateDailyPnl()YesGET/api/v5/copytrading/pnl
geCopytradingLeadPrivateStats()YesGET/api/v5/copytrading/stats
getCopytradingLeadPrivatePreferences()YesGET/api/v5/copytrading/preference-currency
getCopytradingLeadPrivateOpenPositions()YesGET/api/v5/copytrading/performance-current-subpositions
getCopytradingLeadPrivatePositionHistory()YesGET/api/v5/copytrading/performance-subpositions-history
getCopyTradersPrivate()YesGET/api/v5/copytrading/copy-traders

Market data

MethodAuthHTTPEndpoint
getTickers()NoGET/api/v5/market/tickers
getTicker()NoGET/api/v5/market/ticker
getOrderBook()NoGET/api/v5/market/books
getFullOrderBook()NoGET/api/v5/market/books-full
getCandles()NoGET/api/v5/market/candles
getHistoricCandles()NoGET/api/v5/market/history-candles
getTrades()NoGET/api/v5/market/trades
getHistoricTrades()NoGET/api/v5/market/history-trades
getOptionTradesByInstrument()NoGET/api/v5/market/option/instrument-family-trades
getOptionTrades()NoGET/api/v5/public/option-trades
get24hrTotalVolume()NoGET/api/v5/market/platform-24-volume
getBlockTickers()NoGET/api/v5/market/block-tickers
getBlockTicker()NoGET/api/v5/market/block-ticker
getBlockPublicTrades()NoGET/api/v5/public/block-trades
getPublicBlockTrades()NoGET/api/v5/market/block-trades
getIndexTickers()NoGET/api/v5/market/index-tickers
getIndexCandles()NoGET/api/v5/market/index-candles
getHistoricIndexCandles()NoGET/api/v5/market/history-index-candles
getMarkPriceCandles()NoGET/api/v5/market/mark-price-candles
getHistoricMarkPriceCandles()NoGET/api/v5/market/history-mark-price-candles
getOracle()NoGET/api/v5/market/open-oracle
getExchangeRate()NoGET/api/v5/market/exchange-rate
getIndexComponents()NoGET/api/v5/market/index-components
getPublicBorrowInfo()NoGET/api/v5/finance/savings/lending-rate-summary
getPublicBorrowHistory()NoGET/api/v5/finance/savings/lending-rate-history

Public data

MethodAuthHTTPEndpoint
getInstruments()NoGET/api/v5/public/instruments
getDeliveryExerciseHistory()NoGET/api/v5/public/delivery-exercise-history
getOpenInterest()NoGET/api/v5/public/open-interest
getFundingRate()NoGET/api/v5/public/funding-rate
getFundingRateHistory()NoGET/api/v5/public/funding-rate-history
getMinMaxLimitPrice()NoGET/api/v5/public/price-limit
getOptionMarketData()NoGET/api/v5/public/opt-summary
getEstimatedDeliveryExercisePrice()NoGET/api/v5/public/estimated-price
getDiscountRateAndInterestFreeQuota()NoGET/api/v5/public/discount-rate-interest-free-quota
getSystemTime()NoGET/api/v5/public/time
getMarkPrice()NoGET/api/v5/public/mark-price
getPositionTiers()NoGET/api/v5/public/position-tiers
getInterestRateAndLoanQuota()NoGET/api/v5/public/interest-rate-loan-quota
getVIPInterestRateAndLoanQuota()NoGET/api/v5/public/vip-interest-rate-loan-quota
getUnderlying()NoGET/api/v5/public/underlying
getInsuranceFund()NoGET/api/v5/public/insurance-fund
getUnitConvert()NoGET/api/v5/public/convert-contract-coin
getOptionTickBands()NoGET/api/v5/public/instrument-tick-bands
getPremiumHistory()NoGET/api/v5/public/premium-history
getEconomicCalendar()YesGET/api/v5/public/economic-calendar

Trading data (Rubik)

MethodAuthHTTPEndpoint
getSupportCoin()NoGET/api/v5/rubik/stat/trading-data/support-coin
getOpenInterestHistory()NoGET/api/v5/rubik/stat/contracts/open-interest-history
getTakerVolume()NoGET/api/v5/rubik/stat/taker-volume
getContractTakerVolume()NoGET/api/v5/rubik/stat/taker-volume-contract
getMarginLendingRatio()NoGET/api/v5/rubik/stat/margin/loan-ratio
getTopTradersAccountRatio()NoGET/api/v5/rubik/stat/contracts/long-short-account-ratio-contract-top-trader
getTopTradersContractPositionRatio()NoGET/api/v5/rubik/stat/contracts/long-short-position-ratio-contract-top-trader
getLongShortContractRatio()NoGET/api/v5/rubik/stat/contracts/long-short-account-ratio-contract
getLongShortRatio()NoGET/api/v5/rubik/stat/contracts/long-short-account-ratio
getContractsOpenInterestAndVolume()NoGET/api/v5/rubik/stat/contracts/open-interest-volume
getOptionsOpenInterestAndVolume()NoGET/api/v5/rubik/stat/option/open-interest-volume
getPutCallRatio()NoGET/api/v5/rubik/stat/option/open-interest-volume-ratio
getOpenInterestAndVolumeExpiry()NoGET/api/v5/rubik/stat/option/open-interest-volume-expiry
getOpenInterestAndVolumeStrike()NoGET/api/v5/rubik/stat/option/open-interest-volume-strike
getTakerFlow()NoGET/api/v5/rubik/stat/option/taker-block-volume

Funding

MethodAuthHTTPEndpoint
getCurrencies()YesGET/api/v5/asset/currencies
getBalances()YesGET/api/v5/asset/balances
getNonTradableAssets()YesGET/api/v5/asset/non-tradable-assets
getAccountAssetValuation()YesGET/api/v5/asset/asset-valuation
fundsTransfer()YesPOST/api/v5/asset/transfer
getFundsTransferState()YesGET/api/v5/asset/transfer-state
getAssetBillsDetails()YesGET/api/v5/asset/bills
getAssetBillsHistoric()YesGET/api/v5/asset/bills-history
getLightningDeposits()YesGET/api/v5/asset/deposit-lightning
getDepositAddress()YesGET/api/v5/asset/deposit-address
getDepositHistory()YesGET/api/v5/asset/deposit-history
submitWithdraw()YesPOST/api/v5/asset/withdrawal
submitWithdrawLightning()YesPOST/api/v5/asset/withdrawal-lightning
cancelWithdrawal()YesPOST/api/v5/asset/cancel-withdrawal
getWithdrawalHistory()YesGET/api/v5/asset/withdrawal-history
getDepositWithdrawStatus()YesGET/api/v5/asset/deposit-withdraw-status
getExchanges()NoGET/api/v5/asset/exchange-list
applyForMonthlyStatement()YesPOST/api/v5/asset/monthly-statement
getMonthlyStatement()YesGET/api/v5/asset/monthly-statement
getConvertCurrencies()YesGET/api/v5/asset/convert/currencies
getConvertCurrencyPair()YesGET/api/v5/asset/convert/currency-pair
estimateConvertQuote()YesPOST/api/v5/asset/convert/estimate-quote
convertTrade()YesPOST/api/v5/asset/convert/trade
getConvertHistory()YesGET/api/v5/asset/convert/history

Subaccounts

MethodAuthHTTPEndpoint
getSubAccountList()YesGET/api/v5/users/subaccount/list
resetSubAccountAPIKey()YesPOST/api/v5/users/subaccount/modify-apikey
getSubAccountBalances()YesGET/api/v5/account/subaccount/balances
getSubAccountFundingBalances()YesGET/api/v5/asset/subaccount/balances
getSubAccountMaxWithdrawal()YesGET/api/v5/account/subaccount/max-withdrawal
getSubAccountTransferHistory()YesGET/api/v5/asset/subaccount/bills
getManagedSubAccountTransferHistory()YesGET/api/v5/asset/subaccount/managed-subaccount-bills
transferSubAccountBalance()YesPOST/api/v5/asset/subaccount/transfer
setSubAccountTransferOutPermission()YesPOST/api/v5/users/subaccount/set-transfer-out
getSubAccountCustodyTradingList()YesGET/api/v5/users/entrust-subaccount-list
setSubAccountLoanAllocation()YesPOST/api/v5/account/subaccount/set-loan-allocation
getSubAccountBorrowInterestAndLimit()YesGET/api/v5/account/subaccount/interest-limits
createSubAccount()YesPOST/api/v5/broker/nd/create-subaccount
deleteSubAccount()YesPOST/api/v5/broker/nd/delete-subaccount
createSubAccountAPIKey()YesPOST/api/v5/broker/nd/subaccount/apikey

Block trading (RFQ)

MethodAuthHTTPEndpoint
getBlockCounterParties()YesGET/api/v5/rfq/counterparties
createBlockRFQ()YesPOST/api/v5/rfq/create-rfq
cancelBlockRFQ()YesPOST/api/v5/rfq/cancel-rfq
cancelMultipleBlockRFQs()YesPOST/api/v5/rfq/cancel-batch-rfqs
cancelAllRFQs()YesPOST/api/v5/rfq/cancel-all-rfqs
executeBlockQuote()YesPOST/api/v5/rfq/execute-quote
getQuoteProducts()YesGET/api/v5/rfq/maker-instrument-settings
updateBlockQuoteProducts()YesPOST/api/v5/rfq/maker-instrument-settings
resetBlockMmp()YesPOST/api/v5/rfq/mmp-reset
updateBlockMmpConfig()YesPOST/api/v5/rfq/mmp-config
getBlockMmpConfig()YesGET/api/v5/rfq/mmp-config
createBlockQuote()YesPOST/api/v5/rfq/create-quote
cancelBlockQuote()YesPOST/api/v5/rfq/cancel-quote
cancelMultipleBlockQuotes()YesPOST/api/v5/rfq/cancel-batch-quotes
cancelAllBlockQuotes()YesPOST/api/v5/rfq/cancel-all-quotes
cancelAllBlockAfter()YesPOST/api/v5/rfq/cancel-all-after
getBlockRFQs()YesGET/api/v5/rfq/rfqs
getBlockQuotes()YesGET/api/v5/rfq/quotes
getBlockTrades()YesGET/api/v5/rfq/trades
getPublicRFQBlockTrades()NoGET/api/v5/rfq/public-trades

Spread trading

MethodAuthHTTPEndpoint
submitSpreadOrder()YesPOST/api/v5/sprd/order
cancelSpreadOrder()YesPOST/api/v5/sprd/cancel-order
cancelAllSpreadOrders()YesPOST/api/v5/sprd/mass-cancel
updateSpreadOrder()YesPOST/api/v5/sprd/amend-order
getSpreadOrder()YesGET/api/v5/sprd/order
getSpreadActiveOrders()YesGET/api/v5/sprd/orders-pending
getSpreadOrdersRecent()YesGET/api/v5/sprd/orders-history
getSpreadOrdersArchive()YesGET/api/v5/sprd/orders-history-archive
getSpreadTrades()YesGET/api/v5/sprd/trades
getSpreads()NoGET/api/v5/sprd/spreads
getSpreadOrderBook()NoGET/api/v5/sprd/books
getSpreadTicker()NoGET/api/v5/market/sprd-ticker
getSpreadPublicTrades()NoGET/api/v5/sprd/public-trades
getSpreadCandles()NoGET/api/v5/market/sprd-candles
getSpreadHistoryCandles()NoGET/api/v5/market/sprd-history-candles
cancelSpreadAllAfter()YesPOST/api/v5/sprd/cancel-all-after

Earn and finance

MethodAuthHTTPEndpoint
getStakingOffers()YesGET/api/v5/finance/staking-defi/offers
submitStake()YesPOST/api/v5/finance/staking-defi/purchase
redeemStake()YesPOST/api/v5/finance/staking-defi/redeem
cancelStakingRequest()YesPOST/api/v5/finance/staking-defi/cancel
getActiveStakingOrders()YesGET/api/v5/finance/staking-defi/orders-active
getStakingOrderHistory()YesGET/api/v5/finance/staking-defi/orders-history
getETHStakingProductInfo()NoGET/api/v5/finance/staking-defi/eth/product-info
purchaseETHStaking()YesPOST/api/v5/finance/staking-defi/eth/purchase
redeemETHStaking()YesPOST/api/v5/finance/staking-defi/eth/redeem
getETHStakingBalance()YesGET/api/v5/finance/staking-defi/eth/balance
getETHStakingHistory()YesGET/api/v5/finance/staking-defi/eth/purchase-redeem-history
cancelRedeemETHStaking()YesPOST/api/v5/finance/staking-defi/eth/cancel-redeem
getAPYHistory()NoGET/api/v5/finance/staking-defi/eth/apy-history
getSavingBalance()YesGET/api/v5/finance/savings/balance
savingsPurchaseRedemption()YesPOST/api/v5/finance/savings/purchase-redempt
setLendingRate()YesPOST/api/v5/finance/savings/set-lending-rate
getLendingHistory()YesGET/api/v5/finance/savings/lending-history
getLendingOffers()NoGET/api/v5/finance/fixed-loan/lending-offers
getLendingAPYHistory()NoGET/api/v5/finance/fixed-loan/lending-apy-history
getLendingVolume()NoGET/api/v5/finance/fixed-loan/pending-lending-volume
placeLendingOrder()YesPOST/api/v5/finance/fixed-loan/lending-order
amendLendingOrder()YesPOST/api/v5/finance/fixed-loan/amend-lending-order
getLendingOrders()YesGET/api/v5/finance/fixed-loan/lending-orders-list
getLendingSubOrders()YesGET/api/v5/finance/fixed-loan/lending-sub-orders
getBorrowableCurrencies()NoGET/api/v5/finance/flexible-loan/borrow-currencies
getCollateralAssets()NoGET/api/v5/finance/flexible-loan/collateral-assets
getMaxLoanAmount()YesPOST/api/v5/finance/flexible-loan/max-loan
adjustCollateral()YesPOST/api/v5/finance/flexible-loan/adjust-collateral
getLoanInfo()YesGET/api/v5/finance/flexible-loan/loan-info
getLoanHistory()YesGET/api/v5/finance/flexible-loan/loan-history
getAccruedInterest()YesGET/api/v5/finance/flexible-loan/interest-accrued

Affiliate and system

MethodAuthHTTPEndpoint
getInviteeDetail()YesGET/api/v5/affiliate/invitee/detail
getAffiliateRebateInfo()YesGET/api/v5/users/partner/if-rebate
getSystemStatus()NoGET/api/v5/system/status
getAnnouncements()NoGET/api/v5/support/announcements
getAnnouncementTypes()NoGET/api/v5/support/announcement-types

WebsocketAPIClient

The WebsocketAPIClient provides WebSocket API endpoints for low-latency order management. All methods require authentication and use a persistent WebSocket connection.
MethodAuthWS connectionOKX operation
submitNewOrder()Yesprivateorder
submitMultipleOrders()Yesprivatebatch-orders
cancelOrder()Yesprivatecancel-order
cancelMultipleOrders()Yesprivatebatch-cancel-orders
amendOrder()Yesprivateamend-order
amendMultipleOrders()Yesprivatebatch-amend-orders
massCancelOrders()Yesprivatemass-cancel
submitSpreadOrder()Yesbusinesssprd-order
amendSpreadOrder()Yesbusinesssprd-amend-order
cancelSpreadOrder()Yesbusinesssprd-cancel-order
massCancelSpreadOrders()Yesbusinesssprd-mass-cancel

Build docs developers (and LLMs) love