TriportRPC

stellarHorizonGetFeeStats

GEThttps://triport.io/rpc/stellar/horizon/fee_stats

Get 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

optional
This operation defines no path or query parameters.

Response

This schema-shaped example uses placeholders where the contract does not provide a measured value:

last_ledgerstring
Latest ledger used for the snapshot.
last_ledger_base_feestring
Base fee for that ledger.
fee_chargedobject
Observed charged-fee percentiles.
max_feeobject
Declared maximum-fee percentiles when present.

Errors

See Stellar errors and the shared error reference.

StatusMeaningWhen it happens
401UnauthorizedThe API key is missing or invalid.
403ForbiddenThe key lacks the required scope or tier.
429Rate limitedThe 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 getFeeStats and simulateTransaction.
  • 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.