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

# claimStaticDepositWithMaxFee

> Claim a static deposit only if fee is within your limit.

Gets a quote for a static deposit claim and automatically claims it if the fee is within the specified maximum.

## Method Signature

```typescript theme={null}
async claimStaticDepositWithMaxFee({
  transactionId,
  maxFee,
  outputIndex,
}: {
  transactionId: string;
  maxFee: number;
  outputIndex?: number;
}): Promise<ClaimStaticDepositOutput | null>
```

## Parameters

<ResponseField name="transactionId" type="string" required>
  The Bitcoin transaction ID of the deposit
</ResponseField>

<ResponseField name="maxFee" type="number" required>
  Maximum fee in satoshis you're willing to pay
</ResponseField>

<ResponseField name="outputIndex" type="number">
  The output index (auto-detected if not provided)
</ResponseField>

## Returns

<ResponseField name="result" type="ClaimStaticDepositOutput | null" required>
  The claim result, or null if the fee exceeds maxFee
</ResponseField>

## Example

```typescript theme={null}
const result = await wallet.claimStaticDepositWithMaxFee({
  transactionId: "abc123...",
  maxFee: 500 // Will only claim if fee <= 500 sats
});

if (result) {
  console.log("Deposit claimed:", result);
} else {
  console.log("Fee too high, deposit not claimed");
}
```
