Appearance
eth_getTransactionBySenderAndNonce
served · same as reth
Returns the transaction that an account sent with a given nonce.
When to use
Use it to find a pending transaction of an account by its nonce, for example to replace it.
Example
bash
curl -s -X POST -H 'Content-Type: application/json' \
--data '{"jsonrpc": "2.0", "id": 1, "method": "eth_getTransactionBySenderAndNonce", "params": ["0xc917c3fa468f2c4b9c84c72caa46420eb9825249", "0x25c30"]}' \
http://127.0.0.1:8547json
{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getTransactionBySenderAndNonce",
"params": [
"0xc917c3fa468f2c4b9c84c72caa46420eb9825249",
"0x25c30"
]
}Response
Live mainnet, block 26193069, 2026-10-14. Checked against reth 2.7: equal.
json
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": 4444,
"message": "pruned history unavailable: requested 13096568, earliest available 26193005"
}
}The error codes match, the messages differ. Cinder: "pruned history unavailable: requested 13096568, earliest available 26193005". reth: "pruned history unavailable: requested 13096567, earliest available 26183061".
Parameters
| Name | Type | Required | Meaning |
|---|---|---|---|
sender | address (20 bytes, hex) | yes | The account that sent the transaction. |
nonce | hex number | yes | The nonce of the transaction. |
Returns
The transaction, or null when the account did not use this nonce yet and the pool does not have it. See Transaction.
Notes and limits
- The node looks in the pool first. Only engine mode has a pool.
- For a nonce that is already used, the node searches the blocks by the state of the account. This search needs old state, so it usually gives the error 4444.
Errors
| Code | Message | When |
|---|---|---|
| 4444 | pruned history unavailable: requested N, earliest available M | The search needs the state of a block more than 128 blocks below the head. |
| -32602 | Invalid params | A parameter is missing or does not parse. data has the text of reth, with the position. |
Compared with reth
A reth full node gives the same error code 4444 for the same reason. The block numbers in the message differ.
The live example above gives the same answer on Cinder and on reth 2.7.
Related methods
eth_getTransactionByHash, eth_getTransactionCount, txpool_contentFrom.
Schema (OpenRPC)
Parameter sender: Address
json
{
"title": "hex encoded address",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
}Parameter nonce: Quantity
json
{
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
}Result: Transaction or null
json
{
"oneOf": [
{
"title": "Transaction",
"description": "A transaction in the JSON-RPC format of eth_getTransactionByHash.",
"type": "object"
},
{
"type": "null"
}
]
}