Aggregator Quote
POST /aggregator/quote
Returns a swap quote with signed calldata ready for on-chain execution. Designed for aggregator integrations that submit transactions directly.
Request
bash
curl -X POST https://mainnet.router.ryze.pro/aggregator/quote \
-H "Content-Type: application/json" \
-d '{
"tokenIn": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"tokenOut": "0x4200000000000000000000000000000000000006",
"amountIn": "100000000",
"sender": "0xYourWalletAddress",
"slippageBps": 50,
"deadline": 1713200000
}'Parameters
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
tokenIn | string | Yes | -- | Input token address |
tokenOut | string | Yes | -- | Output token address |
amountIn | string | Yes | -- | Input amount (raw units) |
sender | string | Yes | -- | User wallet address |
slippageBps | number | No | 50 | Slippage tolerance in bps |
deadline | number | No | now + 1800s | Transaction deadline (Unix) |
Response
json
{
"tokenA": {
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"symbol": "USDC",
"decimals": 6
},
"tokenB": {
"address": "0x4200000000000000000000000000000000000006",
"symbol": "WETH",
"decimals": 18
},
"tokenAToB": {
"amountIn": "100000000",
"amountOut": "62500000000000000",
"minAmountOut": "62187500000000000",
"priceImpact": "100000000000000",
"effectiveRate": "1598400000000000000000",
"hops": [
{
"poolAddress": "0x7B41aA91947398CD9244AD4e314C253D9B1B5206",
"tokenIn": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"tokenOut": "0x4200000000000000000000000000000000000006"
}
],
"txData": "0x..."
},
"lastUpdated": "2026-04-15T12:00:00Z",
"priceA": "1000000000000000000",
"priceB": "1600250000000000000000"
}Response Fields
| Field | Type | Description |
|---|---|---|
tokenA | object | Input token metadata |
tokenB | object | Output token metadata |
amountIn | string | Input amount (raw) |
amountOut | string | Expected output (raw) |
minAmountOut | string | Minimum output after slippage |
priceImpact | string | Price impact (WAD) |
effectiveRate | string | Execution rate (WAD) |
hops | array | Route details |
txData | string | Hex-encoded calldata |
priceA / priceB | string | Oracle prices (WAD) |
txData
The txData field contains hex-encoded calldata for MultiHopRouter.swapExactIn. It includes:
- Swap parameters (tokenIn, tokenOut, amountIn, minAmountOut, path, deadline, recipient)
- Pyth oracle price update bytes
- Signed CEX price data (v, r, s signatures)
To execute the swap, send a transaction to the MultiHopRouter contract with this calldata:
javascript
const tx = await walletClient.sendTransaction({
to: MULTIHOP_ROUTER_ADDRESS,
data: response.tokenAToB.txData,
value: 0n, // unless tokenIn is native ETH
});Errors
| Code | Reason |
|---|---|
400 | Invalid request, missing fields, invalid sender, or invalid amount |
404 | No pool found for the token pair |