stellarHorizonGetFeeStats — Stellar REST API
Get the current Horizon fee snapshot.
GET
https://triport.io/rpc/stellar/horizon/fee_stats- Network
- Stellar mainnet
- Scope
- stellar:rpc
- Auth
- x-token: $TRIPORT_API_KEY (or Authorization: Bearer)
- Rate limit
- stellar_read_rpc — 15 / 20 / 100 / 250 RPS sustained · short burst 30 / 40 / 200 / 500 (free / basic / pro / business) (plan policy); Burst capacity
Endpoint and plans: Stellar RPC endpoint.
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
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.