TriportRPC

getFeeStats

POSThttps://triport.io/rpc/stellar

Returns 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.

optional
No method parameters.

Response

The response is copied unchanged from the accepted fixture.

resultobject
Method result object.
result.inclusionFeeobject
Fee distribution statistics for Stellar (i.e. non-Soroban) transactions. Statistics are normalized per operation.
result.inclusionFee.ledgerCountnumber
How many consecutive ledgers form the distribution
result.inclusionFee.maxstring
Maximum fee
result.inclusionFee.minstring
Minimum fee
result.inclusionFee.modestring
Fee value which occurs the most often
result.inclusionFee.p10string
10th nearest-rank fee percentile
result.inclusionFee.p20string
20th nearest-rank fee percentile
result.inclusionFee.p30string
30th nearest-rank fee percentile
result.inclusionFee.p40string
40th nearest-rank fee percentile
result.inclusionFee.p50string
50th nearest-rank fee percentile
result.inclusionFee.p60string
60th nearest-rank fee percentile
result.inclusionFee.p70string
70th nearest-rank fee percentile
result.inclusionFee.p80string
80th nearest-rank fee percentile
result.inclusionFee.p90string
90th nearest-rank fee percentile.
result.inclusionFee.p95string
95th nearest-rank fee percentile.
result.inclusionFee.p99string
99th nearest-rank fee percentile
result.inclusionFee.transactionCountstring
How many transactions are part of the distribution
result.latestLedgernumber
The sequence number of the latest ledger known to Stellar RPC at the time it handled the request.
result.sorobanInclusionFeeobject
Inclusion fee distribution statistics for Soroban transactions
result.sorobanInclusionFee.ledgerCountnumber
How many consecutive ledgers form the distribution
result.sorobanInclusionFee.maxstring
Maximum fee
result.sorobanInclusionFee.minstring
Minimum fee
result.sorobanInclusionFee.modestring
Fee value which occurs the most often
result.sorobanInclusionFee.p10string
10th nearest-rank fee percentile
result.sorobanInclusionFee.p20string
20th nearest-rank fee percentile
result.sorobanInclusionFee.p30string
30th nearest-rank fee percentile
result.sorobanInclusionFee.p40string
40th nearest-rank fee percentile
result.sorobanInclusionFee.p50string
50th nearest-rank fee percentile
result.sorobanInclusionFee.p60string
60th nearest-rank fee percentile
result.sorobanInclusionFee.p70string
70th nearest-rank fee percentile
result.sorobanInclusionFee.p80string
80th nearest-rank fee percentile
result.sorobanInclusionFee.p90string
90th nearest-rank fee percentile.
result.sorobanInclusionFee.p95string
95th nearest-rank fee percentile.
result.sorobanInclusionFee.p99string
99th nearest-rank fee percentile
result.sorobanInclusionFee.transactionCountstring
How many transactions are part of the distribution

Errors

Errors use the standard JSON-RPC envelope. See Stellar errors and the shared error reference.

CodeMeaningWhen it happens
-32602Invalid paramsthe by-name object or a field has the wrong type; positional-array style params are rejected.
-32601Method not foundThe method is absent from the published Stellar OpenRPC catalog.
401UnauthorizedThe API key is missing or invalid.
429Rate limitedThe 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: simulateTransaction and Horizon GET /fee_stats.
  • This is a read-only surface. No write or transaction-submission method is published.