Rippled/XRP API Guide: account_info - Query Account Information

·

The account_info command retrieves detailed information about a specified XRP Ledger account, including its activity status and XRP balance. All returned data is relative to the specified ledger version.

API Request Format

WebSocket Request Example

{
  "id": 2,
  "command": "account_info",
  "account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
  "strict": true,
  "ledger_index": "current",
  "queue": true
}

JSON-RPC Request Example

{
  "method": "account_info",
  "params": [
    {
      "account": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
      "strict": true,
      "ledger_index": "current",
      "queue": true
    }
  ]
}

Command-Line Request Example

rippled account_info r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59 true

Request Parameters

ParameterTypeDescription
accountStringUnique account ID (typically the account address)
strictBooleanRestricts account ID to only addresses/public keys (optional)
ledger_hashStringHash of the ledger to use (optional)
ledger_indexVariantLedger index number or selection shortcut (optional)
queueBooleanIncludes queued transaction information (optional)
signer_listsBooleanReturns associated signer lists (optional)

API Response Format

WebSocket Response Example

{
  "id": 5,
  "status": "success",
  "type": "response",
  "result": {
    "account_data": {
      "Account": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
      "Balance": "999999999960",
      "Flags": 8388608,
      "LedgerEntryType": "AccountRoot",
      "OwnerCount": 0,
      "PreviousTxnID": "4294BEBE5B569A18C0A2702387C9B1E7146DC3A5850C1E87204951C6FDAA4C42",
      "PreviousTxnLgrSeq": 3,
      "Sequence": 6,
      "index": "92FA6A9FC8EA6018D5D16532D7795C91BFB0831355BDFDA177E86C8BF997985F"
    },
    "ledger_current_index": 4,
    "queue_data": {
      "auth_change_queued": true,
      "highest_sequence": 10,
      "lowest_sequence": 6,
      "max_spend_drops_total": "500",
      "transactions": [
        {
          "auth_change": false,
          "fee": "100",
          "fee_level": "2560",
          "max_spend_drops": "100",
          "seq": 6
        },
        {
          "LastLedgerSequence": 10,
          "auth_change": true,
          "fee": "100",
          "fee_level": "2560",
          "max_spend_drops": "100",
          "seq": 10
        }
      ],
      "txn_count": 5
    },
    "validated": false
  }
}

JSON-RPC Response Example

{
  "result": {
    "account_data": {
      "Account": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
      "Balance": "999999999960",
      "Flags": 8388608,
      "LedgerEntryType": "AccountRoot",
      "OwnerCount": 0,
      "PreviousTxnID": "4294BEBE5B569A18C0A2702387C9B1E7146DC3A5850C1E87204951C6FDAA4C42",
      "PreviousTxnLgrSeq": 3,
      "Sequence": 6,
      "index": "92FA6A9FC8EA6018D5D16532D7795C91BFB0831355BDFDA177E86C8BF997985F"
    },
    "ledger_current_index": 4,
    "queue_data": {
      "auth_change_queued": true,
      "highest_sequence": 10,
      "lowest_sequence": 6,
      "max_spend_drops_total": "500",
      "transactions": [
        {
          "auth_change": false,
          "fee": "100",
          "fee_level": "2560",
          "max_spend_drops": "100",
          "seq": 6
        }
      ],
      "txn_count": 5
    },
    "status": "success",
    "validated": false
  }
}

Response Fields

FieldTypeDescription
account_dataObjectContains core account details
signer_listsArrayLists of authorized signers (if requested)
ledger_current_indexIntegerSequence number of the latest ledger used
ledger_indexIntegerSequence number of the ledger used
queue_dataObjectContains queued transaction details (if requested)
validatedBooleanIndicates if results come from a validated ledger

Queue Data Structure:

👉 Master XRP Ledger API integration with our comprehensive developer tools.

Frequently Asked Questions

What's the purpose of the strict parameter?

The strict parameter enforces that only valid account addresses or public keys can be used as account IDs, preventing malformed requests.

How does queue_data help in transaction management?

queue_data provides visibility into pending transactions, allowing developers to optimize fee strategies and avoid transaction failures due to sequence mismatches.

Why is the validated field important?

This boolean indicates whether the response data comes from a validated ledger (immutable) versus a provisional one, crucial for financial auditing.

👉 Optimize your XRP transactions with real-time account monitoring and analytics tools.

Can I retrieve historical account data?

Yes! By specifying ledger_index or ledger_hash, you can query account states at any point in the ledger's history.

What security precautions should I take?

Always verify the validated field for sensitive operations, and consider using OKX's secure API gateways for enterprise-grade protection.