The XRP Ledger provides three primary API methods for querying current fee information: fee, server_info, and server_state. Each serves a slightly different use case and returns fee data in different formats.
The fee method is the most direct way to check what a transaction costs right now. It returns the drops.base_fee (minimum fee), drops.minimum_fee, drops.median_fee, and drops.open_ledger_fee — all in drops. A typical response looks like: {"drops": {"base_fee": "10", "minimum_fee": "10", "median_fee": "11000", "open_ledger_fee": "10"}}.
The server_info method returns human-readable fee data intended for display. The relevant fields are validated_ledger.base_fee_xrp (e.g., "0.00001") and load_factor. Multiply these two values to get the current effective fee in XRP.
The server_state method returns machine-friendly integer data used internally by rippled. The effective load rate is load_factor / load_base. This is the raw version of the same information server_info provides.
Best practice for developers: always query the fee method immediately before submitting a transaction, use the returned open_ledger_fee plus a small buffer, and never hard-code a fee amount. Network load can change between ledger closes, and outdated fees may result in transactions being queued or rejected.