Transactions and Requests in the XRP Ledger

·

The XRP Ledger (XRPL) operates through two primary interaction types: transactions, which modify the ledger state, and requests, which retrieve data without altering the ledger. This guide explores both mechanisms, their structures, and use cases.


How Transactions Work

Transactions are the backbone of the XRPL, enabling actions like:

Transaction Structure

Every transaction follows a consistent JSON format with these required fields:

Example: Payment Transaction

{
  "TransactionType": "Payment",
  "Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
  "Amount": "1000000",
  "Destination": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX"
}

Execution Flow

  1. Submission: Send the transaction via JavaScript, Python, or CLI.
  2. Validation: rippled servers propose it to the network.
  3. Consensus: 80% validator approval finalizes the transaction.
  4. Confirmation: The ledger updates irreversibly.

👉 Learn more about XRP Ledger transactions


How Requests Work

Requests fetch ledger data without modifying it. Common use cases include:

Request Structure

Requests typically require:

Example: Account Info Request

{
  "command": "account_info",
  "account": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn"
}

Response Data

Responses include:

Servers Handling Requests:


Key Differences

FeatureTransactionsRequests
PurposeModify ledgerRetrieve data
SigningRequires signatureNo signature needed
CostFee in XRP dropsFree

FAQ

Q: Can I cancel a submitted transaction?
A: Only if it hasn’t been finalized. Use LastLedgerSequence to set a timeout.

Q: Why do some requests return unvalidated data?
A: For speed, Clio may return provisional data. Check validated: true for finality.

Q: How do I track NFT transfers?
A: Use the nft_info request with the NFT ID.

👉 Explore advanced XRPL features


Next Steps: