dcr

Decred (DCR)

Method: POST getrawtransaction

dropdown
POST

getrawtransaction

Returns information about a transaction given its hash.

Parameters

transaction hash - string

the hash of the transaction.

verbose - int

Optional, default=0

specifies the transaction is returned as a JSON object instead of hex-encoded string.

Request

curl --location --request POST 'https://dcr.getblock.io/mainnet/' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "getrawtransaction",
"params": ["a2dfb8de368fafb349f9b37f7f59065860488c394a522ffb7fec4e3f9a10e08e", 0],
"id": "getblock.io"}'


Response

{
    "error": null,
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": "03000000010000000000000000000000000000000000000000000000000000000000000000ffffffff00ffffffff02000000000000000000000e6a0cc1ff0800b3e0fccf37a786b7c6ed842b0000000000001976a91469ed0fbcc41348fef05385091d9d4a306387b2bd88ac00000000000000000170cf592b0000000000000000ffffffff0800002f646372642f"
}