POST /quotes

Auth X-Hub-Key from API_HUB_KEYExecute POST /run/dzap/quotesCache executed live on every call — a read-only POST answer is never cachedCost free · weight 0 · standard rate classSource billing free

Swap/bridge quote discovery for up to several pairs at once: per provider output amount, minimum received, fees, price impact, route steps and ETA, plus the recommended / best-return / fastest source for each pair.

Latency contract: the aggregator answered in 40.3-40.4 s on Base for USDC->ETH and USDC->WETH, against a hub edge budget of about 60 s (Cloudflare in front of nginx) minus post-response accounting. The client gives this one route a bounded 45 s attempt and refuses a retry the remaining budget cannot hold; every other DZap route keeps the provider-wide 30 s timeout. An exhausted quote budget is a hub 502 envelope, never a Cloudflare HTML 504. Shares the platform's 5 req/min expensive class.

Parameters

nameintypedescription
fromChainbodyintrequiredNumeric chain id the trade starts on.
example: 8453
databodylist[dict]requiredOne entry per requested pair: {amount (base units, string), srcToken, srcDecimals, destToken, destDecimals, toChain, slippage (percent)}. The zero address is the native token.
example: [{"amount":"100000000","srcToken":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","srcDecimals":6,"destToken":"0x0000000000000000000000000000000000000000","destDecimals":18,"toChain":42161,"slippage":1}]
gaslessbodybooloptionalAsk only for gasless routes. Gasless quotes need a pair worth at least $1; below that the pair returns {status:'error', message:'Minimum $1 per pair required for gasless'}.
default: False
example: False
privatebodybooloptionalAsk for private (MEV-protected) routes where a provider supports them.
default: False
example: False
filterbodystroptionalOptional server-side narrowing, e.g. 'best'.
example: best

Response

type: object
pagination: none
sample: {
  "8453_0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913-8453_0x0000000000000000000000000000000000000000": "object"
}

Safe request

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

curl -sX POST "https://openapihub.dev/run/dzap/quotes" \
  -H "X-Hub-Key: $API_HUB_KEY" -H "Content-Type: application/json" \
  -d '{"fromChain": 8453, "data": [{"amount": "100000000", "srcToken": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "srcDecimals": 6, "destToken": "0x0000000000000000000000000000000000000000", "destDecimals": 18, "toChain": 42161, "slippage": 1}], "gasless": false, "private": false, "filter": "best"}'