account_info
Este conteúdo não está disponível em sua língua ainda.
The account_info method retrieves information about an account, its activity, and its XAH balance. All information retrieved is relative to a particular version of the ledger.
Request Format
Section titled “Request Format”{ "command": "account_info", "account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "ledger_index": "validated", "hooks": true}Request Parameters
Section titled “Request Parameters”| Field | JSON Type | Required? | Description |
|---|---|---|---|
account | String | Yes | The account to look up. |
ledger_hash | String | No | A 32-byte hex string for the ledger version to use. |
ledger_index | String or Number | No | The ledger index of the ledger to use, or a shortcut string ("validated", "closed" or "current"). |
queue | Boolean | No | If true, also return information about queued transactions sent by this account. Only valid with the current (open) ledger. |
signer_lists | Boolean | No | If true, also return any SignerList objects associated with this account. |
hooks | Boolean | No | If true, also return the account’s effective Hook configuration for each Hook slot (see Hooks Output). (Introduced in 2026.10.13-release+4119.) |
A non-boolean hooks value returns invalidParams.
Response Format
Section titled “Response Format”{ "result": { "account_data": { "Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "Balance": "148446663", "Flags": 0, "LedgerEntryType": "AccountRoot", "OwnerCount": 3, "Sequence": 336, "index": "13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8" }, "hooks": [ { "Hook": { "HookHash": "...", "HookNamespace": "...", "HookApiVersion": 0, "HookCanEmit": "...", "Flags": 1, "HookOnIncoming": "...", "HookOnOutgoing": "...", "HookParameters": [ { "HookParameter": { "HookParameterName": "...", "HookParameterValue": "..." } } ] } }, { "Hook": {} } ], "ledger_index": 12345678, "validated": true, "status": "success" }}Response Fields
Section titled “Response Fields”| Field | JSON Type | Description |
|---|---|---|
account_data | Object | The AccountRoot ledger object with this account’s information, as stored in the ledger. |
hooks | Array | (Only with hooks: true) One Hook object per entry in the account’s Hooks array, with the effective configuration described below. |
signer_lists | Array | (Only with signer_lists: true) The account’s SignerList objects. |
queue_data | Object | (Only with queue: true) Information about queued transactions sent by this account. |
ledger_index | Number | The ledger index of the ledger used (or ledger_current_index for the current open ledger). |
validated | Boolean | true if this data is from a validated ledger version. |
Hooks Output
Section titled “Hooks Output”(Introduced in 2026.10.13-release+4119.)
With hooks: true, the response includes a top-level hooks array with the account’s effective Hook configuration for each Hook slot. “Effective” means that the per-account installation (the Hook object) is merged with the defaults of the HookDefinition:
HookNamespace,HookCanEmitandFlags: the installation value if present, otherwise the definition value.HookCanEmitdefaults to “may emit anything”.HookApiVersion: taken from the definition.HookParameters: the definition parameters overlaid by the installation parameters. Absent values are shown explicitly as empty.- HookOn: shown as
HookOnif the incoming and outgoing triggers are the same, otherwise asHookOnIncomingandHookOnOutgoing. HookHash,HookGrantsandHookName: copied from the installation.- An empty slot is returned as an empty
Hookobject. CreateCodeand HookDefinition bookkeeping fields are not included.
Possible Errors
Section titled “Possible Errors”- Any of the universal error types.
invalidParams: one or more fields are specified incorrectly (for example, a non-booleanhooks), or one or more required fields are missing.actNotFound: the address is valid but does not correspond to a funded account in the ledger.lgrNotFound: the ledger specified byledger_hashorledger_indexdoes not exist.