stellarHorizonGetFeeStats
GET
https://triport.io/rpc/stellar/horizon/fee_statsGet the current Horizon fee snapshot.
Stellar mainnetstellar:rpcstellar_read_rpc — 15 / 20 / 100 / 250 RPS (free / basic / pro / business) (default, unmeasured)
Returns current Horizon fee percentiles and the latest ledger used for the snapshot.
Use it to estimate classic Stellar transaction fees. Use Soroban getFeeStats for the RPC layer's separate classic and Soroban inclusion-fee distributions.
This is a current snapshot from one measured Horizon operator, not an SLA or a transaction-submission quote.
Parameters
——optionalThis operation defines no path or query parameters.
Response
This schema-shaped example uses placeholders where the contract does not provide a measured value:
last_ledgerstringLatest ledger used for the snapshot.
last_ledger_base_feestringBase fee for that ledger.
fee_chargedobjectObserved charged-fee percentiles.
max_feeobjectDeclared maximum-fee percentiles when present.
Errors
See Stellar errors and the shared error reference.
| Status | Meaning | When it happens |
|---|---|---|
401 | Unauthorized | The API key is missing or invalid. |
403 | Forbidden | The key lacks the required scope or tier. |
429 | Rate limited | The stellar_read_rpc RPS budget is exceeded. |
Examples
JavaScript (fetch)
const response = await fetch("https://triport.io/rpc/stellar/horizon/fee_stats", {
headers: {
"Authorization": `Bearer ${process.env.TRIPORT_API_KEY}`,
"Accept": "application/hal+json",
},
});
if (!response.ok) throw new Error(`Horizon returned ${response.status}`);
const payload = await response.json();
console.log(payload);Notes
- Fee values are string encoded.
- The snapshot changes as ledgers close.
- Related: Soroban
getFeeStatsandsimulateTransaction. - Horizon is currently served by one measured operator on a best-effort basis without an SLA.
- This product surface is read-only; transaction submission is unavailable.