Last updated on January 1, 1970

2 min read

Method gettxout undefined ()
connect with JSON-RPC protocol

gettxout

info-circle-fill

Returns details about an unspent transaction output (UTXO)

Parameters

txid - string

Transactiond id for which the info should be returned.

index - string

The output index.

mempool - boolean

Optional, default=true

Add memory pool transactions.

Request

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

Response

{
    "error": null,
    "id": "getblock.io",
    "result": {
        "bestblock": "b1a5c36e7d007c5592061187d1e1eb2fdc9bac0988cb8cf5b81be9c3751e4b72",
        "coinbase": true,
        "confirmations": 1389,
        "scriptPubKey": {
            "addresses": [
                "D5gVXk2rNW7r1iBfMzfE77nhC5RdhiMi4u"
            ],
            "asm": "OP_DUP OP_HASH160 05f0163a43999424760262011d2d426eedd833da OP_EQUALVERIFY OP_CHECKSIG",
            "hex": "76a91405f0163a43999424760262011d2d426eedd833da88ac",
            "reqSigs": 1,
            "type": "pubkeyhash"
        },
        "value": 10000.0,
        "version": 1
    }
}
banner icon

Start Building with GetBlock RPCs for Free