dcr

Decred (DCR)

Method: POST gettxout

dropdown
POST

gettxout

Returns information about an unspent transaction output.

Returns null if the output is spent or never existed.

Parameters

txid - string

The hash of the transaction.

vout - numeric

The index of the output.

tree - numeric

The tree of the transaction.

includemempool - string

default=true

Include the mempool when true.

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": "gettxout",
"params": ["a2dfb8de368fafb349f9b37f7f59065860488c394a522ffb7fec4e3f9a10e08e", 1, 1, true],
"id": "getblock.io"}'


Response

{
    "error": {
        "code": -8,
        "message": "Failed to parse request: wrong number of params (expected between 2 and 3, received 4)"
    },
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": null
}