Fee Stats Request Builder
Builds requests connected to fee statistics.
The fee stats endpoint provides information about transaction fees network validators are currently accepting. This data is crucial for setting appropriate transaction fees to ensure timely transaction acceptance by the network.
This endpoint has no parameters - it simply returns the current fee statistics.
Example usage:
val server = HorizonServer("https://horizon.stellar.org")
// Get current fee statistics
val feeStats = server.feeStats().execute()
println("Last ledger: ${feeStats.lastLedger}")
println("Base fee: ${feeStats.lastLedgerBaseFee} stroops")
println("Ledger capacity usage: ${feeStats.ledgerCapacityUsage}")
// Get recommended fee (e.g., use p90 for high priority)
val recommendedFee = feeStats.feeCharged.p90
println("Recommended fee (90th percentile): $recommendedFee stroops")
// Get median fee
val medianFee = feeStats.feeCharged.p50
println("Median fee: $medianFee stroops")See also
Functions
Fee stats endpoint doesn't support cursor pagination. This method throws UnsupportedOperationException.
Build and execute request to get fee statistics.
Fee stats endpoint doesn't support limit parameter. This method throws UnsupportedOperationException.
Fee stats endpoint doesn't support order parameter. This method throws UnsupportedOperationException.
Creates a Server-Sent Events (SSE) stream for this request. The stream will automatically reconnect on connection loss and resume from the last received event.