> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rialto.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Requesting a Quote

> Request a firm quote and receive an executable transaction for an exact-input swap.

## Endpoint

```http theme={null}
GET /quote
```

Auth: requires an API key with quote access. Returns the best route, expected
output, route legs, platform fee, estimated network fee, and an executable
transaction for an exact-input swap.

## Required parameters

| Param         | Description                                       |
| ------------- | ------------------------------------------------- |
| sell\_token   | Token symbol or token address.                    |
| buy\_token    | Token symbol or token address.                    |
| sell\_amount  | Human decimal sell amount, for example 0.01.      |
| taker         | Non-zero wallet address that will receive output. |
| slippage\_bps | Max slippage in basis points. 50 means 0.50%.     |

slippageBps is also accepted as an alias for slippage\_bps.

## Optional parameters

| Param                | Description                                                                                                                                     |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| chain\_id            | Chain id. Defaults to the server's configured chain.                                                                                            |
| max\_hops            | Route-depth hint; final route policy is controlled server-side.                                                                                 |
| permit2\_owner       | Non-zero Permit2 token owner for gasless or relayed ERC20 swaps. For gasless, this must equal taker. Also accepts permit2Owner and permitOwner. |
| swap\_fee\_bps       | Integrator fee in basis points. Requires an integrator key.                                                                                     |
| swap\_fee\_token     | Optional fee-token hint. Fees are charged in the token Rialto selects.                                                                          |
| swap\_fee\_recipient | Ignored. The payout wallet is bound to the API key.                                                                                             |

## Example

```bash theme={null}
API_KEY='rialto_live_example.redacted_secret'

curl -sS 'https://rialto-trade-api.rialto.xyz/quote?sell_token=WETH&buy_token=USDC&sell_amount=0.01&taker=0x1111111111111111111111111111111111111111&slippage_bps=50' \
  -H "Authorization: Bearer $API_KEY"
```

## Key response fields

| Field                    | Description                                                                                                                                                                                              |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| chain\_id                | Chain id for the quote.                                                                                                                                                                                  |
| quote\_id                | UUID handle for the server-stored quote. Bound into the Permit2 witness as a bytes32 quoteId, so the signature is tied to this exact quote.                                                              |
| settlement               | Execution mode: permit2 or allowance.                                                                                                                                                                    |
| tx                       | Ready-to-send transaction object. In direct flow, send this from the taker wallet after any required approval or signature step. In gasless flow, Rialto submits this transaction after /gasless/submit. |
| permit2                  | EIP-712 typed-data payload. Present only for Permit2 settlement. For gasless quotes, permit2.owner is the token owner that must sign.                                                                    |
| issues                   | Frontend blockers and execution hints for balance and allowance.                                                                                                                                         |
| sell\_token              | Sell token address.                                                                                                                                                                                      |
| buy\_token               | Buy token address.                                                                                                                                                                                       |
| sell\_amount             | Raw integer sell amount in token smallest units.                                                                                                                                                         |
| buy\_amount              | Expected raw integer buy amount before slippage.                                                                                                                                                         |
| min\_buy\_amount         | Slippage-protected raw minimum buy amount encoded into tx.data.                                                                                                                                          |
| platform\_fee            | Platform fee breakdown.                                                                                                                                                                                  |
| integrator\_fee          | Present when an integrator fee was accepted for this key.                                                                                                                                                |
| referral / referral\_fee | Present when referral attribution or referral fee policy applies.                                                                                                                                        |
| network\_fee             | Estimated transaction gas cost, if available.                                                                                                                                                            |
| taker                    | Recipient/taker address.                                                                                                                                                                                 |
| slippage\_bps            | Slippage tolerance used for quote.                                                                                                                                                                       |
| route.legs               | Ordered route legs and pools.                                                                                                                                                                            |

## The issues object

Inspect issues before submitting. It flags conditions that should block or gate
execution.

| Field                       | Meaning                                                                                                                     |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| issues.balance              | Non-null when the taker lacks enough sell-token balance. Do not submit.                                                     |
| issues.allowance            | Non-null when an ERC20 approval is needed before submitting tx. Approve issues.allowance.spender for at least sell\_amount. |
| issues.simulationIncomplete | true when the backend could not complete all quote simulation checks.                                                       |
| issues.invalidSourcesPassed | Reserved field; currently an empty array.                                                                                   |

## Notes

Quotes depend on live liquidity and can go stale quickly. Request a fresh quote if
the user waits. The exact amounts and route legs depend on live liquidity at
request time. The next page covers how to execute the returned transaction.
