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 freeSwap 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
| name | in | type | description | |
|---|---|---|---|---|
chainId | body | int | required | example: 1 |
fromTokenAddress | body | str | required | example: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE |
toTokenAddress | body | str | required | example: 0xdAC17F958D2ee523a2206206994597C13D831ec7 |
amount | body | str | required | Human units, not atomic example: 0.001 |
slippage | body | str | optional | default: 0.01example: 0.01 |
userWalletAddress | body | str | optional | Defaults 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"}'