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

# getFeeStats

> Returns statistics about charged inclusion fees for Soroban transactions and Stellar transactions

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. For Soroban transactions and Stellar transactions, they each have their own inclusion fees and own surge pricing. Inclusion fees are used to prevent spam and prioritize transactions during network traffic surge.

## Params (0)

## Result

*(getFeeStatsResult)*

**sorobanInclusionFee** `object`

Inclusion fee distribution statistics for Soroban transactions

**properties**

**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** `string`

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.

**properties**

**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** `string`

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.

## Example

Example request to the `getFeeStats` method

**Request**

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST \
-H 'Content-Type: application/json' \
-d '{
  "jsonrpc": "2.0",
  "id": 8675309,
  "method": "getFeeStats"
}' \
https://soroban-testnet.stellar.org | jq
```

```js JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
let requestBody = {
  jsonrpc: "2.0",
  id: 8675309,
  method: "getFeeStats",
};
let res = await fetch("https://soroban-testnet.stellar.org", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify(requestBody),
});
let json = await res.json();
console.log(json);
```

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
import json, requests
res = requests.post("https://soroban-testnet.stellar.org", json={
    "jsonrpc": "2.0",
    "id": 8675309,
    "method": "getFeeStats"
})
print(json.dumps(res.json(), indent=4))
```

```json JSON theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "jsonrpc": "2.0",
  "id": 8675309,
  "method": "getFeeStats"
}
```

**Result**

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "jsonrpc": "2.0",
  "id": 8675309,
  "result": {
    "sorobanInclusionFee": {
      "max": "200",
      "min": "100",
      "mode": "100",
      "p10": "100",
      "p20": "100",
      "p30": "100",
      "p40": "100",
      "p50": "100",
      "p60": "100",
      "p70": "100",
      "p80": "100",
      "p90": "200",
      "p95": "200",
      "p99": "200",
      "transactionCount": "371",
      "ledgerCount": 50
    },
    "inclusionFee": {
      "max": "133",
      "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": "133",
      "transactionCount": "28",
      "ledgerCount": 10
    },
    "latestLedger": 3730870
  }
}
```

### Using the Lab

You can view the current **mainnet fee stats** using [`mainnet.sorobanrpc.com`](https://sorobanrpc.com), powered by Overcat's RPC service, directly in the [Stellar Laboratory](https://laboratory.stellar.org).

👉 [View Mainnet Fee Stats on the Lab](https://lab.stellar.org/endpoints/rpc/get-fee-stats?\$=network\$id=mainnet\&label=Mainnet\&horizonUrl=https:////horizon.stellar.org\&rpcUrl=https:////mainnet.sorobanrpc.com\&passphrase=Public%20Global%20Stellar%20Network%20/;%20September%202015;;)

![Lab: Get Fee Stats](https://mintcdn.com/stellardevelopmentfoundation/1iVxlvEjme-PeN5h/assets/api/rpc/getfeestats.png?fit=max\&auto=format\&n=1iVxlvEjme-PeN5h\&q=85\&s=d28799d6afb62b5c07677e5926edbadb)
