OKX API Integration Guide: Technical Documentation & Updates (2025)

·

Latest API Updates (May 2025)

April 2025 Enhancements

Sub-Account Management

Error Code Updates

Error CodeMessage
59515Your account isn't whitelisted for custody services. Contact support.
59516Create Copper custody account first
59517Create Komainu custody account first
59518Sub-account creation via API disabled. Use web/App interface.
59519Feature frozen: {freezereason}

👉 Explore OKX's sub-account management solutions

February 2025 Feature Additions

Balance Tracking Improvements

ParameterTypeDescription
notionalUsdForBorrowStringBorrowed amount (USD value)
notionalUsdForSwapStringPerpetual swap position value
notionalUsdForFuturesStringFutures position value
notionalUsdForOptionStringOptions position value

January 2025 Compliance Updates

EEA Withdrawal Requirements

European Economic Area users must include rcvrInfo for:

ParameterRequiredDescription
walletTypeYesexchange for institutional wallets
exchIdOptionalSupported exchange ID (query via public endpoint)
rcvrFirstNameConditionalReceiver's first name/company name
rcvrLastNameConditionalReceiver's last name ("N/A" for companies)

Withdrawal Restrictions

ParameterDescription
noteAdditional remarks

New Error Codes

CodeMessage
58239Private wallet withdrawals require OKX App/website

December 2024 Updates

(No significant changes recorded)


September 2024 Improvements

Account Configuration

ParameterDescription
enableSpotBorrowSpot mode borrowing support
spotBorrowAutoRepayAuto-repayment feature

Leverage Adjustments

Strategy Order Enhancements

New parameter across multiple algo-trading endpoints:

ParameterDescription
isTradeBorrowModeAuto-borrow toggle for TWAP/stop orders

👉 Discover advanced trading strategies on OKX


FAQ Section

Q: Can I create sub-accounts via API?
A: As of April 2025, sub-account creation requires using the web/App interface (error code 59518).

Q: What's required for EEA withdrawals?
A: European users must provide receiver information (rcvrInfo) when withdrawing to exchange wallets.

Q: How do I check borrowing availability?
A: The enableSpotBorrow parameter in account configuration indicates borrowing support.

Q: Where can I find supported exchanges for withdrawals?
A: Use the Get Exchange List endpoint.

Q: Why can't I withdraw to private wallets via API?
A: Compliance measures require private wallet withdrawals through official OKX interfaces (App/website).