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. 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)Inclusion fee distribution statistics for Soroban transactions
Maximum fee
Minimum fee
Fee value which occurs the most often
10th nearest-rank fee percentile
20th nearest-rank fee percentile
30th nearest-rank fee percentile
40th nearest-rank fee percentile
50th nearest-rank fee percentile
60th nearest-rank fee percentile
70th nearest-rank fee percentile
80th nearest-rank fee percentile
90th nearest-rank fee percentile.
95th nearest-rank fee percentile.
99th nearest-rank fee percentile
How many transactions are part of the distribution
How many consecutive ledgers form the distribution
Fee distribution statistics for Stellar (i.e. non-Soroban) transactions. Statistics are normalized per operation.
Maximum fee
Minimum fee
Fee value which occurs the most often
10th nearest-rank fee percentile
20th nearest-rank fee percentile
30th nearest-rank fee percentile
40th nearest-rank fee percentile
50th nearest-rank fee percentile
60th nearest-rank fee percentile
70th nearest-rank fee percentile
80th nearest-rank fee percentile
90th nearest-rank fee percentile.
95th nearest-rank fee percentile.
99th nearest-rank fee percentile
How many transactions are part of the distribution
How many consecutive ledgers form the distribution
The sequence number of the latest ledger known to Soroban RPC at the time it handled the request.
Example
Example request to the getFeeStats
method
Request
- cURL
- JavaScript
- Python
- JSON
curl -X POST \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 8675309,
"method": "getFeeStats"
}' \
https://soroban-testnet.stellar.org | jq
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)
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))
{
"jsonrpc": "2.0",
"id": 8675309,
"method": "getFeeStats"
}
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
}
}