> For the complete documentation index, see [llms.txt](https://docs.validationcloud.io/v1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.validationcloud.io/v1/stellar/stellar-rpc-formerly-soroban-api/getfeestats.md).

# getFeeStats

Statistics for charged inclusion fees. The inclusion fee statistics are calculated from the inclusion fees that were paid for the transactions to be included onto the ledger.

This method will use `10` [Compute Units](/v1/about/billing.md).

***

## Reference: [Here](https://developers.stellar.org/docs/data/apis/rpc/api-reference/methods/getFeeStats)

## **Parameters**

`None`

## Returns

`sorobanInclusionFee` object: Inclusion fee distribution statistics for Soroban transactions containing the following fields:

* `max` string Maximum fee
* `min` string Minimum fee
* `mode` string Fee value which occurs the 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` number How many transactions are part of the distribution
* `ledgerCount` number How many consecutive ledgers form the distribution

`inclusionFee` object: Fee distribution statistics for Stellar (i.e. non-Soroban) transactions. Statistics are normalized per operation. Object contains the following fields:

* `max` string Maximum fee
* `min` string Minimum fee
* `mode` string Fee value which occurs the 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` number How many transactions are part of the distribution
* `ledgerCount` number How many consecutive ledgers form the distribution

`latestLedger` number. The sequence number of the latest ledger known to Stellar RPC at the time it handled the request.

```json
// Result
{
  "jsonrpc": "2.0",
  "id": 8675309,
  "result": {
    "sorobanInclusionFee": {
      "max": "210",
      "min": "100",
      "mode": "100",
      "p10": "100",
      "p20": "100",
      "p30": "100",
      "p40": "100",
      "p50": "100",
      "p60": "100",
      "p70": "100",
      "p80": "100",
      "p90": "120",
      "p95": "190",
      "p99": "200",
      "transactionCount": "10",
      "ledgerCount": 50
    },
    "inclusionFee": {
      "max": "100",
      "min": "100",
      "mode": "100",
      "p10": "100",
      "p20": "100",
      "p30": "100",
      "p40": "100",
      "p50": "100",
      "p60": "100",
      "p70": "100",
      "p80": "100",
      "p90": "100",
      "p95": "100",
      "p99": "100",
      "transactionCount": "7",
      "ledgerCount": 10
    },
    "latestLedger": 4519945
  }
}
```

{% tabs %}
{% tab title="mainnet" %}

```bash
curl https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc": "2.0","id": 8675309,"method": "getFeeStats"}'
```

{% endtab %}

{% tab title="testnet" %}

```bash
curl https://testnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc": "2.0","id": 8675309,"method": "getFeeStats"}'
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.validationcloud.io/v1/stellar/stellar-rpc-formerly-soroban-api/getfeestats.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
