Loading...
Loading...
© 2026 Hydrex. All rights reserved.
Best route across all sources, with Hydrex router calldata ready for on-chain submission.
| Parameter | Description |
|---|---|
fromTokenAddress | Input token address |
toTokenAddress | Output token address |
amount | Input amount in base units (string) |
chainId | EVM chain ID — use 8453 for Base |
taker | Wallet that receives output tokens; used as recipient in calldata |
| Parameter | Default | Description |
|---|---|---|
slippage | 50 | Slippage in BIPS |
source | all | Comma-separated source filter, e.g. ZEROX,OPENOCEAN |
referral | — | Partner wallet for on-chain fee attribution |
referralFeeBps | 0 | Partner fee in BIPS, applied by the Hydrex router contract |
origin | hydrex | Tracking label, e.g. my-app |
spread | — | Aggregator-level fee in BIPS passed upstream |
spreadDirection | — | input or output — which token the spread is taken from |
admin | — | Wallet that receives the spread fee |
gasPrice | — | Gas price hint in wei for upstream providers |
curl "https://router.api.hydrex.fi/quote" \
-G \
--data-urlencode "fromTokenAddress=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" \
--data-urlencode "toTokenAddress=0x4200000000000000000000000000000000000006" \
--data-urlencode "amount=100000000" \
--data-urlencode "chainId=8453" \
--data-urlencode "taker=0xYourWallet" \
--data-urlencode "slippage=50" \
--data-urlencode "referral=0xYourReferralWallet" \
--data-urlencode "referralFeeBps=10" \
--data-urlencode "origin=my-app"{
"amountIn": "100000000",
"amountOut": "29481052600000000",
"minOutputAmount": "29333407277000000",
"recipient": "0xYourWallet",
"transaction": {
"to": "0x599bfa1039c9e22603f15642b711d56be62071f4",
"data": "0x...",
"value": "0"
}
}Never hardcode transaction.to. The router contract address can change with protocol upgrades — always read it from the response.