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

# Estimate Fee

> Retrieve fee estimates for any transaction type.

Provides a breakdown of the estimated network fees required to sponsor the provided transaction, including both Classic and Soroban components.

### Request Body

<ParamField body="transaction" type="string" required>
  The base64-encoded XDR of the transaction to estimate.
</ParamField>

### Response Fields

<ResponseField name="estimatedFee" type="string">
  The total estimated fee in stroops.
</ResponseField>

<ResponseField name="breakdown" type="object">
  A detailed breakdown of the fee components.

  <Expandable title="properties">
    <ResponseField name="baseFee" type="string">
      The Classic Stellar inclusion fee.
    </ResponseField>

    <ResponseField name="resourceFee" type="string">
      The Soroban-specific resource fee (if applicable).
    </ResponseField>
  </Expandable>
</ResponseField>

### SDK Example

```typescript theme={null}
import { Grat } from '@grat-official-sdk/sdk';
const grat = Grat.testnet();

const result = await grat.estimate(transaction);
console.log(result.estimatedFee);
```

[View on GitHub](https://github.com/gratnetwork/grat)
