For the complete documentation index, see llms.txt. This page is also available as Markdown.

tx_history - XRPL

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

This method retrieves some of the most recent transactions made. This method is deprecated and may be removed in future versions.

Parameters

Parameter
Type
Required
Description

start

number

No

Starting index

Request Example

curl --location --request POST 'https://go.getblock.io/<ACCESS_TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "tx_history",
    "params": [{
        "start": 0
    }],
    "id": "getblock.io"
}'
const axios = require('axios');

const url = 'https://go.getblock.io/<ACCESS_TOKEN>/';
const headers = {
    'Content-Type': 'application/json'
};

const payload = {
    jsonrpc: '2.0',
    method: 'tx_history',
    params: [{
        start: 0
    }],
    id: 'getblock.io'
};

axios.post(url, payload, { headers })
    .then(response => console.log(response.data))
    .catch(error => console.error(error));

Response Example

{
    "result": {
        "index": 0,
        "status": "success",
        "txs": []
    }
}

Returns

Field
Type
Description

index

number

Starting index

txs

array

Transaction array

Last updated

Was this helpful?