--- seo: description: Retrieve info about a transaction from a particular ledger version. labels: - Transaction Sending --- # transaction_entry {% repo-link repo="xrpld" path="src/xrpld/rpc/handlers/TransactionEntry.cpp" format="source-link" %}[Source]{% /repo-link %} The `transaction_entry` method retrieves information on a single transaction from a specific ledger version. (The [tx method][], by contrast, searches all ledgers for the specified transaction. We recommend using that method instead.) ## Request Format An example of the request format: {% tabs %} {% tab label="WebSocket" %} ```json { "id": "example_transaction_entry", "command": "transaction_entry", "tx_hash": "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9", "ledger_index": 56865245, "api_version": 2 } ``` {% /tab %} {% tab label="JSON-RPC" %} ```json { "method": "transaction_entry", "params": [ { "tx_hash": "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9", "ledger_index": 56865245, "api_version": 2 } ] } ``` {% /tab %} {% tab label="Commandline" %} ```sh #Syntax: transaction_entry transaction_hash ledger_index|ledger_hash rippled transaction_entry C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9 56865245 ``` {% /tab %} {% /tabs %} {% try-it method="transaction_entry" /%} The request includes the following parameters: | `Field` | Type | Description | |:---------------|:---------------------------|:-------------------------------| | `ledger_hash` | String | _(Optional)_ The unique hash of the ledger version to use. (See [Specifying Ledgers][]) | | `ledger_index` | String or Unsigned Integer | _(Optional)_ The [ledger index][] of the ledger to use, or a shortcut string to choose a ledger automatically. (See [Specifying Ledgers][]) | | `tx_hash` | String | Unique hash of the transaction you are looking up | {% admonition type="info" name="Note" %}This method does not support retrieving information from the current in-progress ledger. You must specify a ledger version in either `ledger_index` or `ledger_hash`.{% /admonition %} ## Response Format An example of a successful response: {% tabs %} {% tab label="WebSocket" %} ```json { "result": { "validated": true, "meta": { "AffectedNodes": [ { "ModifiedNode": { "FinalFields": { "ExchangeRate": "4f04c66806cf7400", "Flags": 0, "RootIndex": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", "TakerGetsCurrency": "0000000000000000000000000000000000000000", "TakerGetsIssuer": "0000000000000000000000000000000000000000", "TakerPaysCurrency": "000000000000000000000000434E590000000000", "TakerPaysIssuer": "CED6E99370D5C00EF4EBF72567DA99F5661BFB3A" }, "LedgerEntryType": "DirectoryNode", "LedgerIndex": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400" } }, { "ModifiedNode": { "FinalFields": { "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", "Balance": "10404767991", "Flags": 0, "OwnerCount": 3, "Sequence": 5037711 }, "LedgerEntryType": "AccountRoot", "LedgerIndex": "1DECD9844E95FFBA273F1B94BA0BF2564DDF69F2804497A6D7837B52050174A2", "PreviousFields": { "Balance": "10404768003", "Sequence": 5037710 }, "PreviousTxnID": "4DC47B246B5EB9CCE92ABA8C482479E3BF1F946CABBEF74CA4DE36521D5F9008", "PreviousTxnLgrSeq": 56865244 } }, { "DeletedNode": { "FinalFields": { "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", "BookDirectory": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", "BookNode": "0", "Flags": 0, "OwnerNode": "0", "PreviousTxnID": "8F5FF57B404827F12BDA7561876A13C3E3B3095CBF75334DBFB5F227391A660C", "PreviousTxnLgrSeq": 56865244, "Sequence": 5037708, "TakerGets": "15000000000", "TakerPays": { "currency": "CNY", "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", "value": "20160.75" } }, "LedgerEntryType": "Offer", "LedgerIndex": "26AAE6CA8D29E28A47C92ADF22D5D96A0216F0551E16936856DDC8CB1AAEE93B" } }, { "ModifiedNode": { "FinalFields": { "Flags": 0, "IndexNext": "0", "IndexPrevious": "0", "Owner": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", "RootIndex": "47FAF5D102D8CE655574F440CDB97AC67C5A11068BB3759E87C2B9745EE94548" }, "LedgerEntryType": "DirectoryNode", "LedgerIndex": "47FAF5D102D8CE655574F440CDB97AC67C5A11068BB3759E87C2B9745EE94548" } }, { "CreatedNode": { "LedgerEntryType": "Offer", "LedgerIndex": "8BAEE3C7DE04A568E96007420FA11ABD0BC9AE44D35932BB5640E9C3FB46BC9B", "NewFields": { "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", "BookDirectory": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", "Sequence": 5037710, "TakerGets": "15000000000", "TakerPays": { "currency": "CNY", "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", "value": "20160.75" } } } } ], "TransactionIndex": 0, "TransactionResult": "tesSUCCESS" }, "tx_json": { "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", "Fee": "12", "Flags": 0, "LastLedgerSequence": 56865248, "OfferSequence": 5037708, "Sequence": 5037710, "SigningPubKey": "03B51A3EDF70E4098DA7FB053A01C5A6A0A163A30ED1445F14F87C7C3295FCB3BE", "TakerGets": "15000000000", "TakerPays": { "currency": "CNY", "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", "value": "20160.75" }, "TransactionType": "OfferCreate", "TxnSignature": "3045022100A5023A0E64923616FCDB6D664F569644C7C9D1895772F986CD6B981B515B02A00220530C973E9A8395BC6FE2484948D2751F6B030FC7FB8575D1BFB406368AD554D9" }, "ledger_index": 56865245, "ledger_hash": "793E56131D8D4ABFB27FA383BFC44F2978B046E023FF46C588D7E0C874C2472A", "close_time_iso": "2020-07-16T20:53:40Z", "hash": "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9" }, "id": "example_transaction_entry", "api_version": 2, "status": "success", "type": "response" } ``` {% /tab %} {% tab label="JSON-RPC" %} ```json 200 OK { "result": { "validated": true, "meta": { "AffectedNodes": [ { "ModifiedNode": { "FinalFields": { "ExchangeRate": "4f04c66806cf7400", "Flags": 0, "RootIndex": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", "TakerGetsCurrency": "0000000000000000000000000000000000000000", "TakerGetsIssuer": "0000000000000000000000000000000000000000", "TakerPaysCurrency": "000000000000000000000000434E590000000000", "TakerPaysIssuer": "CED6E99370D5C00EF4EBF72567DA99F5661BFB3A" }, "LedgerEntryType": "DirectoryNode", "LedgerIndex": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400" } }, { "ModifiedNode": { "FinalFields": { "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", "Balance": "10404767991", "Flags": 0, "OwnerCount": 3, "Sequence": 5037711 }, "LedgerEntryType": "AccountRoot", "LedgerIndex": "1DECD9844E95FFBA273F1B94BA0BF2564DDF69F2804497A6D7837B52050174A2", "PreviousFields": { "Balance": "10404768003", "Sequence": 5037710 }, "PreviousTxnID": "4DC47B246B5EB9CCE92ABA8C482479E3BF1F946CABBEF74CA4DE36521D5F9008", "PreviousTxnLgrSeq": 56865244 } }, { "DeletedNode": { "FinalFields": { "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", "BookDirectory": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", "BookNode": "0", "Flags": 0, "OwnerNode": "0", "PreviousTxnID": "8F5FF57B404827F12BDA7561876A13C3E3B3095CBF75334DBFB5F227391A660C", "PreviousTxnLgrSeq": 56865244, "Sequence": 5037708, "TakerGets": "15000000000", "TakerPays": { "currency": "CNY", "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", "value": "20160.75" } }, "LedgerEntryType": "Offer", "LedgerIndex": "26AAE6CA8D29E28A47C92ADF22D5D96A0216F0551E16936856DDC8CB1AAEE93B" } }, { "ModifiedNode": { "FinalFields": { "Flags": 0, "IndexNext": "0", "IndexPrevious": "0", "Owner": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", "RootIndex": "47FAF5D102D8CE655574F440CDB97AC67C5A11068BB3759E87C2B9745EE94548" }, "LedgerEntryType": "DirectoryNode", "LedgerIndex": "47FAF5D102D8CE655574F440CDB97AC67C5A11068BB3759E87C2B9745EE94548" } }, { "CreatedNode": { "LedgerEntryType": "Offer", "LedgerIndex": "8BAEE3C7DE04A568E96007420FA11ABD0BC9AE44D35932BB5640E9C3FB46BC9B", "NewFields": { "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", "BookDirectory": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", "Sequence": 5037710, "TakerGets": "15000000000", "TakerPays": { "currency": "CNY", "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", "value": "20160.75" } } } } ], "TransactionIndex": 0, "TransactionResult": "tesSUCCESS" }, "tx_json": { "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", "Fee": "12", "Flags": 0, "LastLedgerSequence": 56865248, "OfferSequence": 5037708, "Sequence": 5037710, "SigningPubKey": "03B51A3EDF70E4098DA7FB053A01C5A6A0A163A30ED1445F14F87C7C3295FCB3BE", "TakerGets": "15000000000", "TakerPays": { "currency": "CNY", "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", "value": "20160.75" }, "TransactionType": "OfferCreate", "TxnSignature": "3045022100A5023A0E64923616FCDB6D664F569644C7C9D1895772F986CD6B981B515B02A00220530C973E9A8395BC6FE2484948D2751F6B030FC7FB8575D1BFB406368AD554D9" }, "ledger_index": 56865245, "ledger_hash": "793E56131D8D4ABFB27FA383BFC44F2978B046E023FF46C588D7E0C874C2472A", "close_time_iso": "2020-07-16T20:53:40Z", "hash": "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9", "status": "success" } } ``` {% /tab %} {% tab label="Commandline" %} ```json Loading: "/etc/opt/ripple/rippled.cfg" 2025-Dec-19 03:16:00.638871262 UTC HTTPClient:NFO Connecting to 127.0.0.1:5005 { "result": { "validated": true, "meta": { "AffectedNodes": [ { "ModifiedNode": { "FinalFields": { "ExchangeRate": "4f04c66806cf7400", "Flags": 0, "RootIndex": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", "TakerGetsCurrency": "0000000000000000000000000000000000000000", "TakerGetsIssuer": "0000000000000000000000000000000000000000", "TakerPaysCurrency": "000000000000000000000000434E590000000000", "TakerPaysIssuer": "CED6E99370D5C00EF4EBF72567DA99F5661BFB3A" }, "LedgerEntryType": "DirectoryNode", "LedgerIndex": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400" } }, { "ModifiedNode": { "FinalFields": { "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", "Balance": "10404767991", "Flags": 0, "OwnerCount": 3, "Sequence": 5037711 }, "LedgerEntryType": "AccountRoot", "LedgerIndex": "1DECD9844E95FFBA273F1B94BA0BF2564DDF69F2804497A6D7837B52050174A2", "PreviousFields": { "Balance": "10404768003", "Sequence": 5037710 }, "PreviousTxnID": "4DC47B246B5EB9CCE92ABA8C482479E3BF1F946CABBEF74CA4DE36521D5F9008", "PreviousTxnLgrSeq": 56865244 } }, { "DeletedNode": { "FinalFields": { "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", "BookDirectory": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", "BookNode": "0", "Flags": 0, "OwnerNode": "0", "PreviousTxnID": "8F5FF57B404827F12BDA7561876A13C3E3B3095CBF75334DBFB5F227391A660C", "PreviousTxnLgrSeq": 56865244, "Sequence": 5037708, "TakerGets": "15000000000", "TakerPays": { "currency": "CNY", "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", "value": "20160.75" } }, "LedgerEntryType": "Offer", "LedgerIndex": "26AAE6CA8D29E28A47C92ADF22D5D96A0216F0551E16936856DDC8CB1AAEE93B" } }, { "ModifiedNode": { "FinalFields": { "Flags": 0, "IndexNext": "0", "IndexPrevious": "0", "Owner": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", "RootIndex": "47FAF5D102D8CE655574F440CDB97AC67C5A11068BB3759E87C2B9745EE94548" }, "LedgerEntryType": "DirectoryNode", "LedgerIndex": "47FAF5D102D8CE655574F440CDB97AC67C5A11068BB3759E87C2B9745EE94548" } }, { "CreatedNode": { "LedgerEntryType": "Offer", "LedgerIndex": "8BAEE3C7DE04A568E96007420FA11ABD0BC9AE44D35932BB5640E9C3FB46BC9B", "NewFields": { "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", "BookDirectory": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", "Sequence": 5037710, "TakerGets": "15000000000", "TakerPays": { "currency": "CNY", "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", "value": "20160.75" } } } } ], "TransactionIndex": 0, "TransactionResult": "tesSUCCESS" }, "tx_json": { "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", "Fee": "12", "Flags": 0, "LastLedgerSequence": 56865248, "OfferSequence": 5037708, "Sequence": 5037710, "SigningPubKey": "03B51A3EDF70E4098DA7FB053A01C5A6A0A163A30ED1445F14F87C7C3295FCB3BE", "TakerGets": "15000000000", "TakerPays": { "currency": "CNY", "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", "value": "20160.75" }, "TransactionType": "OfferCreate", "TxnSignature": "3045022100A5023A0E64923616FCDB6D664F569644C7C9D1895772F986CD6B981B515B02A00220530C973E9A8395BC6FE2484948D2751F6B030FC7FB8575D1BFB406368AD554D9" }, "ledger_index": 56865245, "ledger_hash": "793E56131D8D4ABFB27FA383BFC44F2978B046E023FF46C588D7E0C874C2472A", "close_time_iso": "2020-07-16T20:53:40Z", "hash": "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9", "status": "success" } } ``` {% /tab %} {% /tabs %} The response follows the [standard format][], with a successful result containing the following fields: {% tabs %} {% tab label="API v2" %} | `Field` | Type | Description | |:-----------------|:--------------------------|:--------------------------------| | `close_time_iso` | String | The time the ledger containing this transaction was closed, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. | | `hash` | String | The unique hash identifier of the transaction. | | `ledger_index` | Number - [Ledger Index][] | The ledger index of the ledger version the transaction was found in; this is the same as the one from the request. | | `ledger_hash` | String - [Hash][] | _(May be omitted)_ The identifying hash of the ledger version the transaction was found in; this is the same as the one from the request. | | `meta` | Object | The [transaction metadata](../../../protocol/transactions/metadata.md), which shows the exact results of the transaction in detail. | | `tx_json` | Object | JSON representation of the [Transaction object](../../../protocol/transactions/index.md) | {% /tab %} {% tab label="API v1" %} | `Field` | Type | Description | |:---------------|:--------------------------|:--------------------------------| | `ledger_index` | Number - [Ledger Index][] | The ledger index of the ledger version the transaction was found in; this is the same as the one from the request. | | `ledger_hash` | String - [Hash][] | _(May be omitted)_ The identifying hash of the ledger version the transaction was found in; this is the same as the one from the request. | | `metadata` | Object | The [transaction metadata](../../../protocol/transactions/metadata.md), which shows the exact results of the transaction in detail. | | `tx_json` | Object | JSON representation of the [Transaction object](../../../protocol/transactions/index.md) | {% /tab %} {% /tabs %} There are a couple possible reasons the server may fail to find the transaction: * The transaction does not exist * The transaction exists, but not in the specified ledger version * The server does not have the specified ledger version available. Another server that has the correct version on hand may have a different response. ## Possible Errors * Any of the [universal error types][]. * `fieldNotFoundTransaction` - The `tx_hash` field was omitted from the request * `notYetImplemented` - A ledger version was not specified in the request. * `lgrNotFound` - The ledger specified by the `ledger_hash` or `ledger_index` does not exist, or it does exist but the server does not have it. * `transactionNotFound` - The transaction specified in the request could not be found in the specified ledger. (It might be in a different ledger version, or it might not be available at all.) {% raw-partial file="/docs/_snippets/common-links.md" /%}