Skip to main content
POST
/
v1
/
estimate
Estimate Fee
curl --request POST \
  --url https://api.example.com/v1/estimate \
  --header 'Content-Type: application/json' \
  --data '
{
  "transaction": "<string>"
}
'
{
  "estimatedFee": "<string>",
  "breakdown": {
    "baseFee": "<string>",
    "resourceFee": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://grat.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

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

Request Body

transaction
string
required
The base64-encoded XDR of the transaction to estimate.

Response Fields

estimatedFee
string
The total estimated fee in stroops.
breakdown
object
A detailed breakdown of the fee components.

SDK Example

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

const result = await grat.estimate(transaction);
console.log(result.estimatedFee);
View on GitHub