getrawtransaction

Returns the corresponding transaction information based on the specified hash value.

📘

getrawtransaction only works for transactions in mempool.

Parameters

Object NameRequiredTypeDetail
TXIDStringThe transaction ID.
VERBOSEBoolean/IntegerIf false or 0, serialized information of the block is returned in a Base64-encoded string. If true or 1, detailed information of the block is returned in JSON format. Default is false.
"params":[
    "0x8e9c9b328fbe4425678af59767015827a34aacc5423e3dceb4667794288bf271",
    true
]

Result

The transaction information with the specified hash value.

Example

Request

curl <your-endpoint> \
   -X POST \
   -H "Content-Type: application/json" \
   -d '{"jsonrpc": "2.0", "method": "getrawtransaction", "params":["0x2e21b4a800646e48b03789dcdc9fa943aea7feaa4f06c0d4578f01826b7fbe73", true],"id": 1}'

Return

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "hash": "0x2e21b4a800646e48b03789dcdc9fa943aea7feaa4f06c0d4578f01826b7fbe73",
        "size": 301,
        "version": 0,
        "nonce": 1631457285,
        "sender": "NcYfKwepdnNos2CB55EPL5uiJ7LrXiuDVm",
        "sysfee": "12288878",
        "netfee": "128502",
        "validuntilblock": 1315169,
        "signers": [
            {
                "account": "0x3a11aec89f04e29ae36b346ccddc3e04cd7e72b6",
                "scopes": "Global"
            }
        ],
        "attributes": [],
        "script": "AmYIDAAMFAjY9Z5HWDDZobuX10KFxNNMbawIAgDh9QUDBVXTTIIwAAAMFO0YtQDXAEVc3LSrQ1BC6rNwBrPUDBS2cn7NBD7czWw0a+Oa4gSfyK4ROgwUn1SNK9GiKzBVpF7brzR2tA0z4XgXwB8MBGxvY2sMFGd16/U8eiAba2wxbVHBSu31vbOOQWJ9W1I=",
        "witnesses": [
            {
                "invocation": "DEARwOi1YUhb0eUktF8MLUqPWuxstL7KkX8JEZEIONnuO3hE7fFb2+dofII747WWhHJ0LVlc8bM5MTTtY0uoOeFe",
                "verification": "DCEDkUKWm1X8W0EEKXInV//4cq1ZZRczDofc1w5l3N3aBy5BVuezJw=="
            }
        ],
        "blockhash": "0x1f62cf5b41a41b3a53311329addfa895d3240153712207aab3ed9854770a01b8",
        "confirmations": 11,
        "blocktime": 1648755022089
    }
}
Language
Click Try It! to start a request and see the response here!