How quotes work
A quote estimates your output for a chosen pair and input amount. Shield Swap finds a route through the available pools, which can include an intermediate asset when the trade needs more than one pool. You can review the estimate without spending funds. A quote does not reserve liquidity, so the output can change before you submit the swap. Every quote includes a slippage setting. Slippage is how much the price can move between your quote and your trade. In practice, it is the gap between the amount you expect to receive and the least you will accept. If slippage is set too low, the swap can fail when the price moves. If it is set too high, you can receive less than you expected. At 1% slippage, a quote for 100 USDCx can settle for as little as 99.In the app
The app quotes a trade as soon as you enter an amount. Nothing is sent until you confirm it on the Swap page’s steps.Before you startYou’ll need: Shield Wallet connected to Shield Swap, with a confidential balance of the asset you want to sell. See Fund your wallet.Shield Swap has two places to get a quote. Trade quotes one market at a time, each paired with USDCx, with a price chart and recent market activity. Swap quotes any two assets and routes through USDCx when no direct pool exists.Quote on the Trade page
- Open Trade.
- Select the market name at the top left to open Switch pair, then select a market. Each entry shows the pool’s fee.
- Select Buy to receive the market’s asset or Sell to sell it. Private Balance shows how much of the asset you pay with is available.
- Enter an amount in You pay or You are selling, or select 25%, 50%, 75%, or Max.
Quote on the Swap page
- Open Swap.
- In From, select the asset to sell. In To, select the asset to receive. The arrow button between them swaps the two.
- Enter the amount to sell.
Change the slippage setting
- Select the gear next to Slippage.
- Select 0.10%, 0.50%, or 1.00%, or enter a value. The control shows the current default and the allowed range.
Read the quote
Discover pools
Pool discovery helps you find markets for the asset you want to trade. A listed pool may have no active liquidity or have trading disabled; requesting a quote checks whether a route is available for your amount.Prerequisites: Your authenticated mainnet clients from Setup:client for TypeScript, dex for Python, or a configured CLI profile. You do not need a funded account to discover pools.These examples find pools containing USDCx:- TypeScript
- Python
- CLI
pools contains the matching entries, each with a pool key and the token IDs token0 and token1.This request inspects up to 50 pools, starting at offset 0. Check page.pagination and increase offset to read subsequent pages if you need a complete list.Look up token details
Token metadata lets you display a symbol and format amounts with the correct decimal precision. This example looks up both tokens in the first matching pool:symbol and decimals, such as token0.symbol and token0.decimals.Check pool availability
A pool needs active liquidity and permission to trade. Continue withselectedPool from the token lookup to check both on chain:hasLiquidity checks liquidity at the current price. controls.tradeable checks whether the pool is enabled and whether global, token, or pair pauses block trading. canTrade is true only when both checks pass.Request a quote
You choose the asset to sell, the asset to receive, and the input amount. The SDK finds the route for you, so you do not need to select a pool from the discovery results.Prerequisites: Your authenticated mainnetclient, dex, or CLI profile from Setup. The SDKs can quote an unfunded account. The CLI checks your holdings while preparing the trade, so fund your account before using its example.These examples quote 1 USDCx for ETH on mainnet. The slippage setting is 50 basis points (0.5%), which determines the minimum output you’ll accept if the price changes before execution.- TypeScript
- Python
- CLI
expectedOutput and minimumOutput are decimal strings in ETH units. Use them to compare the estimate with the least you’re willing to receive. The quote retains the amounts as base-unit bigint values and lists its route in quote.hops.quote.expiresAt gives the expiry time in Unix milliseconds. Request a new quote if it expires before you submit the swap.