Get Account Info

Get information about an account in the XAG Ledger. This includes its settings, activity, and XAG balance. It also includes the sequence number of the next valid transaction for this account, which you should use to prepare a transaction from this account. By default, this method returns data from the 'current' (in-progress) ledger, which may change before validation.

Warning: XAG-API is early alpha software. API methods and data formats are likely to change frequently in ways that break backwards compatibility.

Request Format

GET /accounts/{address}/info

This API method uses the following path parameters:

Field Value Required? Description
address String (Address) Required The account to query.

This API method uses the following query parameters:

Field Value Required? Description
ledger_index (Varies) (LedgerIndex) Optional (Optional) The sequence number of the ledger to use, or a shortcut string to choose a ledger automatically. (See Specifying Ledgers )

Response Formats

404 Not Found

Not found

Media type: application/json

Formatted as a RippleAPIError

The response uses the following fields:

Field Type Required? Description
errors Array of ErrorItem May be omitted A list of errors that occurred when processing this request.
message String May be omitted A human-readable error message summarizing the problem(s) that occurred.

400 Bad Request

The request was not properly formatted.

Media type: application/json

Formatted as a RippleAPIError

The response uses the following fields:

Field Type Required? Description
errors Array of ErrorItem May be omitted A list of errors that occurred when processing this request.
message String May be omitted A human-readable error message summarizing the problem(s) that occurred.

200 OK

A successful response provides the account data, and information about the ledger version that was used to provide this data.

Media type: application/json

Formatted as a AccountInfo

The response uses the following fields:

Field Type Required? Description
validated Boolean May be omitted True if this data is from a validated ledger version; if omitted or set to false, this data is not final.
ledger_current_index Integer May be omitted (Omitted if ledger_index is provided instead) The sequence number of the most-current ledger, which was used when retrieving this information. The information does not contain any changes from ledgers newer than this one.
ledger_index Integer May be omitted (Omitted if ledger_current_index is provided instead) The sequence number of the ledger used when retrieving this information. The information does not contain any changes from ledgers newer than this one.
account_data Object (AccountData) May be omitted The raw AccountRoot object of the account, as stored in the XAG Ledger.