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 freeQuote 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
| name | in | type | description | |
|---|---|---|---|---|
srcTokenBlockchain | body | str | required | Source chain code (ETH, BSC, ARBITRUM, …); any hub alias is translated. example: ETH |
dstTokenBlockchain | body | str | required | Destination chain code (ETH, BSC, ARBITRUM, …); any hub alias is translated. example: BSC |
srcTokenAmount | body | str | required | Amount of the source token as a plain decimal string in token units (not wei); integer part ≤ 40 chars, decimal part ≤ 30. example: 0.1 |
srcTokenAddress | body | str | optional | Source token contract; omit or send the zero address for the chain's native token. default: 0x0000000000000000000000000000000000000000example: 0x0000000000000000000000000000000000000000 |
dstTokenAddress | body | str | optional | Destination token contract; omit or send the zero address for the chain's native token. default: 0x0000000000000000000000000000000000000000example: 0x0000000000000000000000000000000000000000 |
timeout | body | int | optional | Seconds 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: 30example: 10 |
slippage | body | float | optional | Slippage tolerance as a fraction (server default 0.03 = 3%). default: 0.03example: 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"}'