> ## 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.

# getWithdrawalFeeQuote

> Get a fee quote for withdrawing BTC from a Spark wallet to a Bitcoin L1 address.

<RequestExample>
  ```sh theme={"system"}
  curl --request POST \
    --url https://api.privy.io/v1/wallets/{wallet_id}/rpc \
    --header 'Authorization: Basic <encoded-value>' \
    --header 'Content-Type: application/json' \
    --header 'privy-app-id: <privy-app-id>' \
    --data '{
    "method": "getWithdrawalFeeQuote",
    "network": "MAINNET",
    "params": {
      "amount_sats": 10000,
      "onchain_address": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4"
    }
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"system"}
  {
    "method": "getWithdrawalFeeQuote",
    "data": {
      "id": "5c1a2b3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
      "created_at": "2025-07-24T16:43:12.509Z",
      "updated_at": "2025-07-24T16:43:12.509Z",
      "network": "MAINNET",
      "total_amount": {
        "original_value": 10000,
        "original_unit": "SATOSHI"
      },
      "user_fee_fast": {
        "original_value": 200,
        "original_unit": "SATOSHI"
      },
      "user_fee_medium": {
        "original_value": 150,
        "original_unit": "SATOSHI"
      },
      "user_fee_slow": {
        "original_value": 100,
        "original_unit": "SATOSHI"
      },
      "l1_broadcast_fee_fast": {
        "original_value": 50,
        "original_unit": "SATOSHI"
      },
      "l1_broadcast_fee_medium": {
        "original_value": 40,
        "original_unit": "SATOSHI"
      },
      "l1_broadcast_fee_slow": {
        "original_value": 30,
        "original_unit": "SATOSHI"
      },
      "expires_at": "2025-07-24T17:43:12.509Z"
    }
  }
  ```
</ResponseExample>

### Headers

<ParamField header="privy-app-id" type="string" required>
  ID of your Privy app.
</ParamField>

<ParamField header="privy-authorization-signature" type="string">
  Request authorization signature. If multiple signatures are required, they should be comma
  separated.
</ParamField>

<ParamField header="privy-request-expiry" type="string">
  Request expiry. Value is a Unix timestamp in milliseconds representing the deadline by which the
  request must be processed.
</ParamField>

### Path Parameters

<ParamField path="wallet_id" type="string" required>
  ID of the wallet to get.
</ParamField>

<Info>
  These wallet methods are modeled after the [Spark Wallet
  SDK](https://github.com/buildonspark/spark/tree/main/sdks/js/packages/spark-sdk). For more
  information about this wallet method, check out the [Spark Wallet
  documentation](https://docs.spark.money/wallet/introduction).
</Info>

### Body

<ParamField body="method" type="string" defaultValue="getWithdrawalFeeQuote" required>
  Must be set to `getWithdrawalFeeQuote`.
</ParamField>

<ParamField body="network" type="string" required>
  Blockchain network to use. Options: `MAINNET`, `REGTEST`.
</ParamField>

<ParamField body="params" type="object" required>
  <Expandable title="child attributes" defaultOpen="true">
    <ParamField body="amount_sats" type="number" required>
      The amount of satoshis to withdraw.
    </ParamField>

    <ParamField body="onchain_address" type="string" required>
      The Bitcoin L1 address to withdraw to.
    </ParamField>
  </Expandable>
</ParamField>

### Returns

<ResponseField name="method" type="enum<string>" defaultValue="getWithdrawalFeeQuote" required>
  Available options: `getWithdrawalFeeQuote`
</ResponseField>

<ResponseField name="data" type="object" required>
  A `CoopExitFeeQuote` object with the following fields:

  <Expandable title="child attributes" defaultOpen="true">
    <ResponseField name="id" type="string" required>
      The unique identifier of this fee quote.
    </ResponseField>

    <ResponseField name="created_at" type="string" required>
      The date and time when the quote was first created.
    </ResponseField>

    <ResponseField name="updated_at" type="string" required>
      The date and time when the quote was last updated.
    </ResponseField>

    <ResponseField name="network" type="string" required>
      The network the coop exit fee quote is on.
    </ResponseField>

    <ResponseField name="total_amount" type="object" required>
      The total amount of all nodes swapped for the coop exit quote.

      <Expandable title="child attributes" defaultOpen="true">
        <ResponseField name="original_value" type="number" required />

        <ResponseField name="original_unit" type="string" required />
      </Expandable>
    </ResponseField>

    <ResponseField name="user_fee_fast" type="object" required>
      The user fee (excluding L1 broadcast fee) for fast exit speed.

      <Expandable title="child attributes" defaultOpen="true">
        <ResponseField name="original_value" type="number" required />

        <ResponseField name="original_unit" type="string" required />
      </Expandable>
    </ResponseField>

    <ResponseField name="user_fee_medium" type="object" required>
      The user fee (excluding L1 broadcast fee) for medium exit speed.

      <Expandable title="child attributes" defaultOpen="true">
        <ResponseField name="original_value" type="number" required />

        <ResponseField name="original_unit" type="string" required />
      </Expandable>
    </ResponseField>

    <ResponseField name="user_fee_slow" type="object" required>
      The user fee (excluding L1 broadcast fee) for slow exit speed.

      <Expandable title="child attributes" defaultOpen="true">
        <ResponseField name="original_value" type="number" required />

        <ResponseField name="original_unit" type="string" required />
      </Expandable>
    </ResponseField>

    <ResponseField name="l1_broadcast_fee_fast" type="object" required>
      The L1 broadcast fee for fast exit speed.

      <Expandable title="child attributes" defaultOpen="true">
        <ResponseField name="original_value" type="number" required />

        <ResponseField name="original_unit" type="string" required />
      </Expandable>
    </ResponseField>

    <ResponseField name="l1_broadcast_fee_medium" type="object" required>
      The L1 broadcast fee for medium exit speed.

      <Expandable title="child attributes" defaultOpen="true">
        <ResponseField name="original_value" type="number" required />

        <ResponseField name="original_unit" type="string" required />
      </Expandable>
    </ResponseField>

    <ResponseField name="l1_broadcast_fee_slow" type="object" required>
      The L1 broadcast fee for slow exit speed.

      <Expandable title="child attributes" defaultOpen="true">
        <ResponseField name="original_value" type="number" required />

        <ResponseField name="original_unit" type="string" required />
      </Expandable>
    </ResponseField>

    <ResponseField name="expires_at" type="string" required>
      The time when the fee quote expires.
    </ResponseField>
  </Expandable>
</ResponseField>
