Skip to main content
A quote previews how much of the target asset a deposit delivers after conversion. Use quotes to check that a route is supported, or to show users an estimate before they send funds. Quotes do not require a wallet ID or an authorization signature. Quotes reflect the app’s gas and fee sponsorship settings. Quotes are indicative. A deposit address does not lock this price for later deposits. Fetch a fresh quote when displaying an estimate, since market conditions and liquidity can change before conversion.
Use getQuote from the useHeadlessCryptoDeposit hook.
useHeadlessCryptoDeposit is experimental and requires @privy-io/react-auth 3.46.0 or later. The interface may change without a major SDK version bump.
ParametersgetQuote accepts an object with the following fields:
object
required
Asset the user would deposit. Unlike create, both chain and asset are required.
object
required
Asset delivered to the destination wallet.
string
Amount as a decimal string in the source token’s standard unit, such as '1.5' for 1.5 USDC. Omit to quote approximately $50 of the source asset.
number
Slippage tolerance in basis points.
ReturnsgetQuote returns a Promise for a quote.

Response

Every SDK returns the API response unchanged, with snake_case fields:
string
Quoted input as a decimal string in the source token’s standard unit.
string
Estimated output as a decimal string in the destination token’s standard unit.
string
ISO 8601 timestamp when the quote was created.

Error handling

The request rejects when:
  • the route is unsupported
  • the source and destination are the same asset on the same chain
  • the source and destination are not both mainnet or both testnet

Create a deposit account

Get deposit addresses for a destination wallet

Track orders

Optionally check conversion status after a deposit