Requires transaction indexing to be enabled when starting client. Pass --atxi
and --atxi.autobuild
when starting Akroma geth.
{"jsonrpc": "2.0","method": "eth_getTransactionsByAddress","params": ["0xb5C694a4cDbc1820Ba4eE8fD6f5AB71a25782534",0,"latest","tf","sc",-1,-1,true],"id": 1}
Param | Description |
Address | Address to check for transactions |
Earliest block | Number, ex: 0 |
End block | Number or "latest" |
Direction |
|
Type |
|
Begin Page | integer of index to begin pagination. Using |
End Page | integer of index to end pagination. Using |
Order | Bool, return oldest transactions first. Defaults to false (newest first) |
{"jsonrpc": "2.0","id": 1,"result": ["0xbdaa803ec661db62520eab4aed8854fdea7e04b716849cc67ee7d1c9d94db2d3","0x886e2197a1a703bfed97a39b627f40d8f8beed1fc4814fe8a9618281450f1046","0x4b7f948442732719b31d35139f4269ad021984975c23c35190ac89ef225e95eb","0x35aec85ad9718e937c4e7c11b6f47eebd557cc31b46afc7e19ac888e57e6cdcc","0x0cc2cd8e2b79ef43f441666c0f9de1f06e3690dc3fe64b6fe5d41976115f9184","0x0a06510426a311056e093d1b7a9aabafcb8ce723a6c5c40a9e02824db565844a"]}
curl --request POST--url http://localhost:8545--header 'Cache-Control: no-cache'--header 'Content-Type: application/json'--data '{"jsonrpc":"2.0","method":"eth_getTransactionsByAddress","params":["0x621Ece09310Bd428679D617b1577b21A2962e385", 0, "latest", "tf", "sc", -1, -1, false],"id":1}'
{"jsonrpc": "2.0","method": "eth_getTransactionCountByAddress","params": ["0xb9004ec1af9a8eb51b831de6c235f50982de9a9d",0,"latest","tf","sc",true],"id": 1}
Param | Description |
Address | Address to check for transactions |
Earliest block | Number, ex: 0 |
End block | Number or "latest" |
Direction |
|
Type |
|
Order | Bool, return oldest transactions first. Defaults to false (newest first) |
{"jsonrpc": "2.0","id": 1,"result": "0x4153e"}
curl --request POST--url http://localhost:8545--header 'Content-Type: application/json'--data '{"jsonrpc":"2.0","method":"eth_getTransactionCountByAddress","params":["0xb9004ec1af9a8eb51b831de6c235f50982de9a9d", 0, "latest", "tf", "sc", true],"id":1}'
{"jsonrpc": "2.0","method": "eth_getTransactionByHash","params": ["0x23ccc6ac61fa29efa14415328b1a4483b8092cec991912a2a376809c0a29ecb5"],"id": 1}
Param | Description |
Address | 32 bytes, transaction hash |
{"jsonrpc": "2.0","id": 1,"result": {"blockHash": "0xc912515f9f46ad455a05a967d2df2ce3b3ebf60d71402fce0b2b538e1b7841c2","blockNumber": "0x162746","from": "0x621ece09310bd428679d617b1577b21a2962e385","gas": "0x5824","gasPrice": "0x98bca5a00","hash": "0x23ccc6ac61fa29efa14415328b1a4483b8092cec991912a2a376809c0a29ecb5","input": "0x317374206d696e696e67207269672061727469636c6521","nonce": "0x0","to": "0x102ff38a1889439dd106f697646d889b1ff032d8","transactionIndex": "0x0","value": "0x10f1ad11b9100840000","v": "0x61f86","r": "0x7b6279b636ffe7c2d9fec54e979d3d8bbbe339db967da8fbb0e0c6be3aa5082d","s": "0x16ae8dd891ea30ebb5b8a14e69e6cd4633a0c315e3083a14b96d7b2b58247d61"}}
curl --request POST--url http://localhost:8545--header 'Cache-Control: no-cache'--header 'Content-Type: application/json'--data '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0x23ccc6ac61fa29efa14415328b1a4483b8092cec991912a2a376809c0a29ecb5"],"id":1}'
{"jsonrpc": "2.0","method": "eth_getBlockByHash","params": ["0xc912515f9f46ad455a05a967d2df2ce3b3ebf60d71402fce0b2b538e1b7841c2",false],"id": 1}
Param | Description |
Hash | 32 bytes, block hash |
Return Full Transactions | Required, Boolean, if |
Response
{"jsonrpc": "2.0","id": 1,"result": {"difficulty": "0x13595247a5c","extraData": "0x6d696e696e672e616b726f6d612e6f7267","gasLimit": "0x47e7c4","gasUsed": "0xaa2c","hash": "0xc912515f9f46ad455a05a967d2df2ce3b3ebf60d71402fce0b2b538e1b7841c2","logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","miner": "0x016f9baefee61d8a5b23ae9fedf9149505457d2a","mixHash": "0x03ccfd2c36effda35daf07aff0fed6b96eaf2e2ecb69a48bb47866404e83a8a0","nonce": "0x6af69e1c0a313c46","number": "0x162746","parentHash": "0x33f5e2c27daf58a0d0de3711ad57a1d2fe28dbef1fb3e46cd80cb495716e1666","receiptsRoot": "0x78a93493a429047a58d9c32b23e03f86a7f3b1c6c0eda73362e48cb063dd51b4","sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","size": "0x316","stateRoot": "0x5e5984e38902bc666c909a44398f511246dfe09ee295253583e997c4d15e137e","timestamp": "0x5b80cb86","totalDifficulty": "0x34e1e649ac2eb4a4","transactions": ["0x23ccc6ac61fa29efa14415328b1a4483b8092cec991912a2a376809c0a29ecb5","0x6d9bf8f988c60dc5bfeb28233821b3813d23480ae746eb4edecae41690d5626e"],"transactionsRoot": "0x5bb95bbab19b523112246971a9baf1b9994ff66c5b3977159162386ea3ca21e1","uncles": []}}
Example
curl --request POST--url http://localhost:8545--header 'Cache-Control: no-cache'--header 'Content-Type: application/json'--data '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params":["0xc912515f9f46ad455a05a967d2df2ce3b3ebf60d71402fce0b2b538e1b7841c2", false],"id":1}'
{"jsonrpc": "2.0","method": "eth_getBalance","params": ["0xb9004ec1af9a8eb51b831de6c235f50982de9a9d","latest"],"id": 1}
Param | Description |
Address | Address to get data for |
Tag | number or string ( 'latest', 'earliest', 'pending') |
{"jsonrpc": "2.0","id": 1,"result": "0x1e6e591395e7cbd717559"}
curl --request POST--url http://localhost:8545--header 'Cache-Control: no-cache'--header 'Content-Type: application/json'--data '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0xb9004ec1af9a8eb51b831de6c235f50982de9a9d", "latest"],"id":1}'