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

# Quotes

> Fetch an indicative quote for a crypto deposit route

export const ChainIdentifier = () => <>
    Chain alias or CAIP-2 identifier, such as <code>base</code> or <code>eip155:8453</code>.
  </>;

export const AssetIdentifier = () => <>
    Asset alias or token contract address, such as <code>usdc</code> or{' '}
    <code>0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913</code>.
  </>;

Quote a route before [creating a deposit account](/wallets/funding/crypto-deposits/create-deposit-account). Quotes do not require a wallet ID or an authorization signature. Omit the input amount to quote approximately \$50 of the source asset. Source and destination must both be mainnet or both be testnet.

This calls [`POST /v1/deposit_accounts/crypto/quote`](/api-reference/crypto-deposits/quote).

<View title="REST API" icon="terminal">
  The body uses `input_amount` and `slippage_bps` for the amount and slippage.

  ```bash theme={"system"}
  curl --request POST https://api.privy.io/v1/deposit_accounts/crypto/quote \
    -u "<your-privy-app-id>:<your-privy-app-secret>" \
    -H "privy-app-id: <your-privy-app-id>" \
    -H "Content-Type: application/json" \
    -d '{
      "source": {"chain": "base", "asset": "usdc"},
      "destination": {"chain": "tempo", "asset": "pathusd"},
      "input_amount": "1.5",
      "slippage_bps": 50
    }'
  ```
</View>

<View title="React" icon="react">
  `getQuote` uses `inputAmount` and `slippageBps` for the amount and slippage fields below.

  <Warning>
    `useHeadlessCryptoDeposit` is experimental. Import it from `@privy-io/react-auth`. The interface
    may change without a major SDK version bump.
  </Warning>

  ```tsx {skip-check} theme={"system"}
  import {useHeadlessCryptoDeposit} from '@privy-io/react-auth';

  const {getQuote} = useHeadlessCryptoDeposit();

  const quote = await getQuote({
    source: {chain: 'base', asset: 'usdc'},
    destination: {chain: 'tempo', asset: 'pathusd'},
    inputAmount: '1.5',
    slippageBps: 50
  });
  ```
</View>

<View title="React Native" icon="react">
  `getQuote` uses `inputAmount` and `slippageBps` for the amount and slippage fields below.

  <Warning>
    `useHeadlessCryptoDeposit` is experimental. Import it from `@privy-io/expo`. The interface may
    change without a major SDK version bump.
  </Warning>

  ```tsx {skip-check} theme={"system"}
  import {useHeadlessCryptoDeposit} from '@privy-io/expo';

  const {getQuote} = useHeadlessCryptoDeposit();

  const quote = await getQuote({
    source: {chain: 'base', asset: 'usdc'},
    destination: {chain: 'tempo', asset: 'pathusd'},
    inputAmount: '1.5',
    slippageBps: 50
  });
  ```
</View>

<ParamField body="source" type="object" required>
  Asset the quote prices as input. Unlike create, both `chain` and `asset` are required.

  <Expandable title="properties" defaultOpen>
    <ParamField body="source.chain" type="string" required>
      <ChainIdentifier /> A quote is a specific route, so chain cannot be omitted.
    </ParamField>

    <ParamField body="source.asset" type="string" required>
      <AssetIdentifier />
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="destination" type="object" required>
  Asset delivered to the destination wallet.

  <Expandable title="properties" defaultOpen>
    <ParamField body="destination.chain" type="string" required>
      <ChainIdentifier />
    </ParamField>

    <ParamField body="destination.asset" type="string" required>
      <AssetIdentifier />
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="input_amount" type="string">
  Amount as a decimal string in the source token's standard unit (for example, `"1.5"` for 1.5
  USDC). Not the smallest on-chain unit. Omit to quote approximately \$50 of the source asset.
</ParamField>

<ParamField body="slippage_bps" type="number">
  Slippage tolerance in basis points.
</ParamField>

The request rejects when the route is unsupported or source and destination are not both mainnet or both testnet. It returns:

<ResponseField name="input_amount" type="string">
  Quoted input as a decimal string in the source token's standard unit.
</ResponseField>

<ResponseField name="estimated_output_amount" type="string">
  Estimated output as a decimal string in the destination token's standard unit.
</ResponseField>

<ResponseField name="created_at" type="string">
  ISO 8601 timestamp when the quote was created.
</ResponseField>

<View title="NodeJS" icon="node-js">
  `quote` uses `input_amount` and `slippage_bps` for the amount and slippage.

  ```ts {skip-check} theme={"system"}
  import {PrivyClient} from '@privy-io/node';

  const privy = new PrivyClient({
    appId: 'insert-your-app-id',
    appSecret: 'insert-your-app-secret'
  });

  const quote = await privy.wallets().depositAccounts.crypto.quote({
    source: {chain: 'base', asset: 'usdc'},
    destination: {chain: 'tempo', asset: 'pathusd'},
    input_amount: '1.5',
    slippage_bps: 50
  });
  ```
</View>

## Related

<CardGroup cols={2}>
  <Card title="Create a deposit account" icon="arrow-right-to-bracket" href="/wallets/funding/crypto-deposits/create-deposit-account">
    Provision deposit addresses
  </Card>

  <Card title="Orders" icon="arrows-rotate" href="/wallets/funding/crypto-deposits/orders">
    Poll sweep status after a deposit is sent
  </Card>

  <Card title="Quote API" icon="terminal" href="/api-reference/crypto-deposits/quote">
    `POST /v1/deposit_accounts/crypto/quote`
  </Card>
</CardGroup>
