POST /priapi/v6/dx/trade/multi/marketQuoteAndCalldata

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

Swap route quote plus unsigned calldata in one call

Fast mode (tradeMode 7): returns the unsigned EIP-1559 payload for the chosen route; nothing is signed or submitted. The returned calldata is documentation of the planned route only. A native-token corridor spelled with the EVM zero address is rejected locally: HTTP 200 with logical 10056 and no upstream call, so the gateway returns 400 no_route instead of waiting 5-8 s for an upstream 502 or 10056. The EIP-7528 0xEeee...EEeE spelling is not rejected.

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,available,calldata,defaultSelected,dexRouterList:array[1] object{dexPairInfo:object{dexName,percent,poolAddress}},autoSlippageInfo:object}",
  "networkFeeInfo": "object"
}

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/marketQuoteAndCalldata" \
  -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"}'