Files
rippled/API-VERSION-3.md
2026-04-03 10:52:42 -04:00

2.6 KiB

API Version 3

API version 3 is currently a beta API. It requires enabling [beta_rpc_api] in the rippled configuration to use. To use this API, clients specify "api_version" : 3 in each request.

For info about how API versioning works, including examples, please view the XLS-22d spec. For details about the implementation of API versioning, view the implementation PR. API versioning ensures existing integrations and users continue to receive existing behavior, while those that request a higher API version will experience new behavior.

Breaking Changes

Modifications to tx and account_tx

In API version 2, the tx_json field in tx and account_tx responses includes server-added lower-case fields (date, ledger_index, and ctid) that are not part of the canonical signed transaction. In API version 3, these fields are removed from tx_json and are only present at the top-level result object.

  • Before (API v2): The tx_json object in the response contained date, ledger_index, and ctid fields alongside the canonical PascalCase transaction fields.
  • After (API v3): The tx_json object contains only the canonical signed transaction fields. The date, ledger_index, and ctid fields appear exclusively at the top-level result object.

Modifications to amm_info

The order of error checks has been changed to provide more specific error messages. (#4924)

  • Before (API v2): When sending an invalid account or asset to amm_info while other parameters are not set as expected, the method returns a generic rpcINVALID_PARAMS error.
  • After (API v3): The same scenario returns a more specific error: rpcISSUE_MALFORMED for malformed assets or rpcACT_MALFORMED for malformed accounts.

Modifications to ledger_entry

Added support for string shortcuts to look up fixed-location ledger entries using the "index" parameter. (#5644)

In API version 3, the following string values can be used with the "index" parameter:

  • "index": "amendments" - Returns the Amendments ledger entry
  • "index": "fee" - Returns the FeeSettings ledger entry
  • "index": "nunl" - Returns the NegativeUNL ledger entry
  • "index": "hashes" - Returns the "short" LedgerHashes ledger entry (recent ledger hashes)

These shortcuts are only available in API version 3 and later. In API versions 1 and 2, these string values would result in an error.