For AI agents: a documentation index is available at /llms.txt. A markdown version of this page is available at the same URL with .md appended (or via Accept: text/markdown).
Skip to main content

getFeeStats

Returns inclusion fee statistics for Soroban transactions and for other Stellar transactions. This method uses 160 credits from your daily balance.

Inclusion fees are the fees paid for a transaction to be included in a ledger. Soroban transactions and other Stellar transactions are priced separately.

Parameters​

None

Returns​

result: (object) - Fee distributions and the latest ledger.

  • sorobanInclusionFee: (object) - Inclusion fee distribution for Soroban transactions. The object uses the same fields as inclusionFee.
  • inclusionFee: (object) - Inclusion fee distribution for non-Soroban transactions, normalized per operation.
    • max: (string) - Maximum fee.
    • min: (string) - Minimum fee.
    • mode: (string) - Fee value that occurs most often.
    • p10: (string) - 10th nearest-rank fee percentile.
    • p20: (string) - 20th nearest-rank fee percentile.
    • p30: (string) - 30th nearest-rank fee percentile.
    • p40: (string) - 40th nearest-rank fee percentile.
    • p50: (string) - 50th nearest-rank fee percentile.
    • p60: (string) - 60th nearest-rank fee percentile.
    • p70: (string) - 70th nearest-rank fee percentile.
    • p80: (string) - 80th nearest-rank fee percentile.
    • p90: (string) - 90th nearest-rank fee percentile.
    • p95: (string) - 95th nearest-rank fee percentile.
    • p99: (string) - 99th nearest-rank fee percentile.
    • transactionCount: (string) - Number of transactions in the distribution.
    • ledgerCount: (integer) - Number of consecutive ledgers in the distribution.
  • latestLedger: (integer) - Sequence number of the latest ledger known to the node when it handled the request.

Request​

curl https://stellar-mainnet.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "getFeeStats"}'

Response​

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"sorobanInclusionFee": {
"max": "200",
"min": "100",
"mode": "200",
"p10": "200",
"p20": "200",
"p30": "200",
"p40": "200",
"p50": "200",
"p60": "200",
"p70": "200",
"p80": "200",
"p90": "200",
"p95": "200",
"p99": "200",
"transactionCount": "7803",
"ledgerCount": 50
},
"inclusionFee": {
"max": "200",
"min": "100",
"mode": "100",
"p10": "100",
"p20": "100",
"p30": "100",
"p40": "100",
"p50": "100",
"p60": "100",
"p70": "100",
"p80": "100",
"p90": "100",
"p95": "150",
"p99": "200",
"transactionCount": "2174",
"ledgerCount": 10
},
"latestLedger": 64923230
}
}