account_tx - XRPL

Example code for the account_tx JSON RPC method. Complete guide to using account_tx JSON-RPC in the GetBlock Web3 documentation.

This method retrieves a list of transactions that involved the specified account.

Parameters

Parameter
Type
Required
Description

account

string

Yes

Account address

ledger_index_min

number

No

Earliest ledger

ledger_index_max

number

No

Latest ledger

binary

boolean

No

Return binary format

forward

boolean

No

Sort oldest first

limit

number

No

Maximum results

marker

object

No

Pagination marker

Request Example

curl --location --request POST 'https://xrp.getblock.io/mainnet/' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "account_tx",
    "params": [{
        "account": "rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH",
        "limit": 10
    }],
    "id": "getblock.io"
}'

Response Example

Response Parameters

Parameter
Type
Description

transactions

array

Transaction list

tx

object

Transaction data

meta

object

Transaction metadata

ledger_index_min

integer

Earliest searched

ledger_index_max

integer

Latest searched

Use Cases

  • Build transaction history

  • Track payments

  • Monitor account activity

Error Handling

Error Code
Description

actNotFound

Account not found

invalidParams

Invalid parameters

SDK Integration

Last updated

Was this helpful?