POST /priapi/v6/dx/trade/multi/quote

Auth X-Hub-Key from API_HUB_KEYExecute POST /run/okxwallet/priapi/v6/dx/trade/multi/quoteCache executed live on every call — a read-only POST answer is never cachedCost free · weight 0 · standard rate classSource billing free

Swap route quote for the registered wallet

Routes live in defiPlatformInfoList[].dexRouterList[] (venue hops with pool addresses and splits); quote totals in commonDexInfo. accountInfo.accountId, tradeMode, liquidityConfig, slippageConfig and preSetConfig are injected by the client; caller keys win. Empty routes with code 0 mean the registered identity or the size gate (10098 JUMP_TO_DAPP) rejected the quote. Use EIP-7528 0xEeee...EEeE for native tokens; a native-token corridor spelled with the EVM zero address is rejected locally with HTTP 400 (logical 10056 body). Upstream HTTP 200 logical code 10056 (insufficient liquidity / no route) maps to HTTP 400 no_route at the gateway.

Parameters

nameintypedescription
chainIdbodyintrequired
example: 1
fromTokenAddressbodystrrequired
example: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
toTokenAddressbodystrrequired
example: 0xdAC17F958D2ee523a2206206994597C13D831ec7
amountbodystrrequiredHuman units, not atomic
example: 0.001
slippagebodystroptional
default: 0.01
example: 0.01
userWalletAddressbodystroptionalDefaults to the registered wallet address
example: 0x1111111111111111111111111111111111111111

Response

type: object
data key: defiPlatformInfoList
pagination: none
sample: {
  "commonDexInfo": "object{code,fromToken,fromTokenAmount,fromTokenValue,nativeTokenPrice,realSlippage,toToken}",
  "defiPlatformInfoList": "array[1] object{defiPlatformId,dexRouterList:array[1] object{dexPairInfo:object{dexName,percent,poolAddress},fromIndex,percent,toIndex},autoSlippageInfo:object}",
  "networkFeeInfo": "object",
  "swapType": "int"
}

Safe request

Reads the credential from API_HUB_KEY; it never appears in the URL.

curl -sX POST "https://openapihub.dev/run/okxwallet/priapi/v6/dx/trade/multi/quote" \
  -H "X-Hub-Key: $API_HUB_KEY" -H "Content-Type: application/json" \
  -d '{"chainId": 1, "fromTokenAddress": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", "toTokenAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7", "amount": "0.001", "slippage": "0.01", "userWalletAddress": "0x1111111111111111111111111111111111111111"}'