This page uses machine translation from English, which may contain errors or unclear language. For the most accurate information, please see the original English version. Some content may be in the original English due to frequent updates. Help us improve this page's translation by joining our effort on Crowdin. (Crowdin translation page, Contributing guide)
[Transaction] eth_getRawTransactionByBlockHashAndIndex
GetRawTransactionByBlockHashAndIndex returns the bytes of the transaction for the given block hash and index.
JSONRPC: eth_getRawTransactionByBlockHashAndIndex
Request
- application/json
Body
Array [
]
params
undefined[]
required
BlockHash 32-byte DATA
Hash of a block.
TransactionIndex hex
Integer of the transaction index position.
Responses
- 200
Returns the bytes of the transaction for the given block hash and index.
- application/json
- Schema
- Example (from schema)
Schema
error
object
result hex
Hex representation of some bytes
{
"jsonrpc": "2.0",
"id": 0,
"error": {
"code": -32700,
"message": "Parse error",
"data": "string"
},
"result": "0x"
}
- curl
- python
- nodejs
- java
- Curl
curl -X 'POST' \
'https://public-en-kairos.node.kaia.io' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"method": "eth_getRawTransactionByBlockHashAndIndex",
"id": 1,
"jsonrpc": "2.0",
"params": ["0x4c4cbf242a80183d2ea2daf047c578d5fc89c0b14c4262606c8b6bb0b36715be","0x0"]
}'
- CURL
curl -L 'https://public-en-kairos.node.kaia.io/' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"method": "eth_getRawTransactionByBlockHashAndIndex",
"id": 1,
"jsonrpc": "2.0",
"params": [
"0x29b6cd965c7d9a53a6f068da259dce1d3810ba79fff8eebac5d4da14754e67e6",
"0x20965255"
]
}'
ResponseClear