getFeeStats
POST
https://triport.io/rpc/stellarReturns statistics about charged inclusion fees through Stellar Soroban JSON-RPC.
Stellar mainnetstellar:rpcstellar_read_rpc — 15 / 20 / 100 / 250 RPS (free / basic / pro / business) (default, unmeasured)
Returns recent inclusion-fee distributions separately for classic Stellar and Soroban transactions because they have independent surge pricing.
Use the percentiles and mode to estimate inclusion fees. This method does not simulate resource consumption or submit transactions.
Fee values and transaction counts are strings; ledger counts and latestLedger are numbers.
Parameters
JSON-RPC params is a by-name object. Send an empty object ({}); this method defines no parameters.
——optionalNo method parameters.
Response
The response is copied unchanged from the accepted fixture.
resultobjectMethod result object.
result.inclusionFeeobjectFee distribution statistics for Stellar (i.e. non-Soroban) transactions. Statistics are normalized per operation.
result.inclusionFee.ledgerCountnumberHow many consecutive ledgers form the distribution
result.inclusionFee.maxstringMaximum fee
result.inclusionFee.minstringMinimum fee
result.inclusionFee.modestringFee value which occurs the most often
result.inclusionFee.p10string10th nearest-rank fee percentile
result.inclusionFee.p20string20th nearest-rank fee percentile
result.inclusionFee.p30string30th nearest-rank fee percentile
result.inclusionFee.p40string40th nearest-rank fee percentile
result.inclusionFee.p50string50th nearest-rank fee percentile
result.inclusionFee.p60string60th nearest-rank fee percentile
result.inclusionFee.p70string70th nearest-rank fee percentile
result.inclusionFee.p80string80th nearest-rank fee percentile
result.inclusionFee.p90string90th nearest-rank fee percentile.
result.inclusionFee.p95string95th nearest-rank fee percentile.
result.inclusionFee.p99string99th nearest-rank fee percentile
result.inclusionFee.transactionCountstringHow many transactions are part of the distribution
result.latestLedgernumberThe sequence number of the latest ledger known to Stellar RPC at the time it handled the request.
result.sorobanInclusionFeeobjectInclusion fee distribution statistics for Soroban transactions
result.sorobanInclusionFee.ledgerCountnumberHow many consecutive ledgers form the distribution
result.sorobanInclusionFee.maxstringMaximum fee
result.sorobanInclusionFee.minstringMinimum fee
result.sorobanInclusionFee.modestringFee value which occurs the most often
result.sorobanInclusionFee.p10string10th nearest-rank fee percentile
result.sorobanInclusionFee.p20string20th nearest-rank fee percentile
result.sorobanInclusionFee.p30string30th nearest-rank fee percentile
result.sorobanInclusionFee.p40string40th nearest-rank fee percentile
result.sorobanInclusionFee.p50string50th nearest-rank fee percentile
result.sorobanInclusionFee.p60string60th nearest-rank fee percentile
result.sorobanInclusionFee.p70string70th nearest-rank fee percentile
result.sorobanInclusionFee.p80string80th nearest-rank fee percentile
result.sorobanInclusionFee.p90string90th nearest-rank fee percentile.
result.sorobanInclusionFee.p95string95th nearest-rank fee percentile.
result.sorobanInclusionFee.p99string99th nearest-rank fee percentile
result.sorobanInclusionFee.transactionCountstringHow many transactions are part of the distribution
Errors
Errors use the standard JSON-RPC envelope. See Stellar errors and the shared error reference.
| Code | Meaning | When it happens |
|---|---|---|
-32602 | Invalid params | the by-name object or a field has the wrong type; positional-array style params are rejected. |
-32601 | Method not found | The method is absent from the published Stellar OpenRPC catalog. |
401 | Unauthorized | The API key is missing or invalid. |
429 | Rate limited | The stellar_read_rpc RPS budget is exceeded. |
Examples
JavaScript (fetch)
const request = {
"jsonrpc": "2.0",
"id": 1,
"method": "getFeeStats",
"params": {}
};
const response = await fetch("https://triport.io/rpc/stellar", {
method: "POST",
headers: {
"x-token": process.env.TRIPORT_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify(request),
});
const payload = await response.json();
if (!response.ok || payload.error) throw new Error(JSON.stringify(payload.error));
console.log(payload.result);Notes
- Classic and Soroban distributions are separate objects.
- Do not coerce string-encoded fee values through an unsafe integer type.
- Related:
simulateTransactionand HorizonGET /fee_stats. - This is a read-only surface. No write or transaction-submission method is published.