Get a quote

The first step is to retrieve swap details — route, estimated output, slippage guardrails, and fees.

Endpoint POST /public/emigroswap/quote

Request fields

  • fromTokenAddress (address) – input ERC-20.

  • toTokenAddress (address) – desired output ERC-20.

  • amount (string, HUMAN) – e.g., "100.00".

  • chainId (number) – e.g., 8453 for Base.

  • slippage (number, %) – e.g., 0.5 (optional; default configured on server).

What comes back

  • Always:

    • amountOut (RAW of input token) – use later in build (it’s your exact input in base units).

    • minAmountIn (RAW of output token) – use later in build (slippage already applied).

    • estimatedAmount, priceImpactPercent, liquidityPoolFeePercent, routerType, etc.

    • path (address[]) – canonical path; single-hop is [tokenIn, tokenOut].

  • If multi-hop:

    • multihop (array of hops) – includes per-hop feeTier/tickSpacing information.

You may receive either a single-hop quote (multihop: null) or a multi-hop quote (multihop: [...]). The difference only affects how you build calldata in the next step.


Single-hop sample (USDC→BRZ on Base)


Multi-hop sample (EURC→USDC→BRZ on Base)

circle-info

The quote tells you how much output to expect (estimatedAmount) and the minimum acceptable amount to protect against slippage (minAmountIn), both already accounting for any fee settings.

circle-info

displayPath/displayPathText are convenience fields sourced from Emigro’s DB; treat them as optional.

Last updated