For AI agents: an LLM-friendly Markdown version of every page is available by appending .md to its URL or by sending an Accept: text/markdown request header. The full documentation index is at https://www.ankr.com/docs/llms.txt
Skip to main content

XRP


XRP API is available on Web3 API platform.

The XRP Ledger (XRPL) is a decentralized blockchain optimized for fast, low-cost payments and asset transfers. It uses a federated consensus algorithm in which a trusted set of validators propose and agree on transactions; once 80%+ reach consensus, a new ledger is finalized in 3–5 seconds with deterministic finality. XRPL supports native issued assets, a built-in DEX, escrows, payment channels, and multi-signing.

In order for your Web3 application to interact with XRP — either by reading blockchain data or sending transactions to the network — it must connect to an XRP node. Developers interact with the blockchain using the methods provided by the API.

The API interaction follows the JSON-RPC which is a stateless, light-weight remote procedure call (RPC) protocol. It defines several data structures and the rules around their processing. It is transport agnostic in that the concepts can be used within the same process, over sockets, over HTTP, or in other message-passing environments. It uses JSON (RFC 4627) as data format.

info

Transaction history window. Ankr XRP Ledger nodes are full nodes (not archive): they retain roughly the last 2 weeks of history (~360,000-380,000 ledgers). Requests for older ledgers or transactions will fail - there is no archive backfill and genesis history is unavailable. For deep historical XRPL data, use a dedicated archive or explorer service.

Methods supported

Account Methods:

An account in the XRP Ledger represents a holder of XRP and a sender of transactions. Use these methods to work with account info.

  • account_channels — retrieves a list of payment channels where the account is the source of the channel.
  • account_currencies — retrieves a list of currencies an account can send or receive.
  • account_info — retrieves basic data on the account.
  • account_lines — retrieves info on the account's trust lines.
  • account_nfts — retrieves a list of all NFTs for an account.
  • account_objects — retrieves all ledger objects owned by an account.
  • account_offers — retrieves info on the account's currency exchange offers.
  • account_tx — retrieves a list of transactions affecting an account.
  • gateway_balances — calculates total amounts issued by an account.
  • noripple_check — gets recommended changes to an account's Default Ripple and No Ripple settings.

Ledger Methods:

A ledger version contains a header, a transaction tree, and a state tree, which contain account settings, trustlines, balances, transactions, and other data. Use these methods to retrieve ledger info.

  • ledger — retrieves info on the ledger.
  • ledger_closed — retrieves the latest closed ledger version.
  • ledger_current — retrieves the current working ledger version.
  • ledger_data — retrieves the raw contents of a ledger version.
  • ledger_entry — retrieves a single item from a ledger version.

Transaction Methods:

Transactions are the only thing that can modify the shared state of the XRP Ledger. All business on the XRP Ledger takes the form of transactions. Use these methods to work with transactions.

  • simulate — executes a dry run of any transaction type to preview results and metadata.
  • submit — sends a transaction to the network.
  • submit_multisigned — sends a multi-signed transaction to the network.
  • transaction_entry — retrieves info on the transaction from a particular ledger version.
  • tx — retrieves info on the transaction from all the ledgers at hand.
  • tx_history — retrieves info on all recent transactions.

Path and Order Book Methods:

Paths define a way for payments to flow through intermediary steps on their way from sender to receiver. Paths enable cross-currency payments by connecting sender and receiver through order books. Use these methods to work with paths and other books.

  • amm_info — retrieves info on the Automated Market Maker (AMM) instance.
  • book_changes — retrieves information on order book changes.
  • book_offers — retrieves info on the currency exchange offers.
  • deposit_authorized — checks whether an account is authorized to send money directly to another account.
  • get_aggregate_price — calculates the aggregate price of specified Oracle instances.
  • nft_buy_offers — retrieves a list of all buy offers for the NFT specified.
  • nft_sell_offers — retrieves a list of all sell offers for the NFT specified.
  • ripple_path_find — finds a path for payment between two accounts, once.

Payment Channel Methods:

Payment channels are a tool for facilitating repeated, unidirectional payments, or temporary credit between two parties. Use these methods to work with payment channels.

Server Info Methods:

Use these methods to retrieve information about the current state of the rippled server.

  • fee — retrieves information on the transaction cost.
  • feature — retrieves information on the protocol amendments.
  • manifest — retrieves public information on a known validator.
  • server_definitions — retrieves an SDK-compatible definitions.json, generated from the rippled instance currently running.
  • server_info (rippled) — retrieves status of the server in human-readable format.
  • server_state — retrieves status of the server in machine-readable format.
  • version — retrieves API version information.

Clio Methods:

These API methods are provided only by the Clio server, not rippled.

  • server_info — retrieves status of the Clio server in human-readable format.
  • ledger — retrieves info on the ledger version.
  • mpt_holders — retrieves the holders of a given MPT issuance for a given ledger.
  • version — retrieves API version information.

Utility Methods:

Use these methods to perform convenient tasks, such as ping and random number generation.

  • ping — confirms connectivity with the server.
  • random — generates a random number.

Account Methods:

An account in the XRP Ledger represents a holder of XRP and a sender of transactions. Use these methods to work with account info.

Methods

account

gateway, noripple, Methods, ledger

ledger, Methods

Methods, submit, transaction, tx, amm, book

book, deposit, get, nft, ripple, channel, Methods, server

server, Methods, mpt