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

# getSwapFeeEstimate

> Estimate fees for a leaf swap operation.

Gets the estimated fee for a swap of leaves for the `SparkWallet`.

## Method Signature

```typescript theme={null}
async getSwapFeeEstimate(amountSats: number): Promise<LeavesSwapFeeEstimateOutput>
```

## Parameters

<ResponseField name="amountSats" type="number" required>
  The amount of sats to swap
</ResponseField>

## Returns

<ResponseField name="estimate" type="LeavesSwapFeeEstimateOutput" required>
  The estimated fee for the swap
</ResponseField>

## Example

```typescript theme={null}
const feeEstimate = await wallet.getSwapFeeEstimate(10000);
console.log("Swap fee estimate:", feeEstimate);
```
