POST /sdk/routes/quoteAll

Auth X-Hub-Key from API_HUB_KEYExecute POST /run/rubic/sdk/routes/quoteAllCache executed live on every call — a read-only POST answer is never cachedCost free · weight 0 · heavy rate classSource billing free

Quote every available provider for one swap: destination amount, minimum after slippage, USD value, ETA, price impact, gas estimate, fees, provider type and routing hops.

Parameters

nameintypedescription
srcTokenBlockchainbodystrrequiredSource chain code (ETH, BSC, ARBITRUM, …); any hub alias is translated.
example: ETH
dstTokenBlockchainbodystrrequiredDestination chain code (ETH, BSC, ARBITRUM, …); any hub alias is translated.
example: BSC
srcTokenAmountbodystrrequiredAmount of the source token as a plain decimal string in token units (not wei); integer part ≤ 40 chars, decimal part ≤ 30.
example: 0.1
srcTokenAddressbodystroptionalSource token contract; omit or send the zero address for the chain's native token.
default: 0x0000000000000000000000000000000000000000
example: 0x0000000000000000000000000000000000000000
dstTokenAddressbodystroptionalDestination token contract; omit or send the zero address for the chain's native token.
default: 0x0000000000000000000000000000000000000000
example: 0x0000000000000000000000000000000000000000
timeoutbodyintoptionalSeconds the backend may spend aggregating bridge providers before it answers (server default 30). Small values keep cross-chain quotes fast; a call still returns as soon as every requested provider reports.
default: 30
example: 10
slippagebodyfloatoptionalSlippage tolerance as a fraction (server default 0.03 = 3%).
default: 0.03
example: 0.03

Response

type: object
data key: routes
pagination: none
sample: {
  "quote": "object",
  "routes": "array[11]",
  "failed": "array[0]"
}

Safe request

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

curl -sX POST "https://openapihub.dev/run/rubic/sdk/routes/quoteAll" \
  -H "X-Hub-Key: $API_HUB_KEY" -H "Content-Type: application/json" \
  -d '{"srcTokenBlockchain": "ETH", "dstTokenBlockchain": "BSC", "srcTokenAmount": "0.1", "srcTokenAddress": "0x0000000000000000000000000000000000000000", "dstTokenAddress": "0x0000000000000000000000000000000000000000", "timeout": 10, "slippage": "0.03"}'