(Un)Spent Transaction Outputs
These endpoints cover spent and unspent transaction outputs.
Get Unspent UTXOs by Address
This endpoint retrieves a combined, ordered list of both confirmed and unconfirmed UTXOs for a given address.
GET https://api.whatsonchain.com/v1/bsv/<network>/address/<address>/unspent/all
Example Request
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/address/1L2F8wYxTRagCZLnsm2engg8ngGECSeuE5/unspent/all"
Example Response
{
"address": "1L2F8wYxTRagCZLnsm2engg8ngGECSeuE5",
"script": "b3005d46af31c4b5675b73c17579b7bd366dfe10635b7b43ac111aea5226efb6",
"result": [{
"height": 861499,
"tx_pos": 1,
"tx_hash": "ab0f76f957662335f98ee430a665f924c28310ec5126c2aede56086f9233326f",
"value": 154,
"isSpentInMempoolTx": false,
"status": "confirmed"
}, {
"height": 861925,
"tx_pos": 99,
"tx_hash": "54e27d08c371b67746fd3088b78eecb9acef91f497f7e776d11d605635b9dc20",
"value": 1000,
"isSpentInMempoolTx": false,
"status": "confirmed"
},
...
],
"error": ""
}
URL Parameters
network
Selected network: main
or test
.
address
Address.
Get Unconfirmed UTXOs by Address
This endpoint retrieves an ordered list of unconfirmed UTXOs for a given address.
GET https://api.whatsonchain.com/v1/bsv/<network>/address/<address>/unconfirmed/unspent
Example Request
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/address/12drYTV2c9nZMrxep9ewpWPdLrV5bNcWF2/unconfirmed/unspent"
Example Response
{
"address": "12drYTV2c9nZMrxep9ewpWPdLrV5bNcWF2",
"script": "2d4ec8100056a819943df89efb3ac6a37a44bdf46a307dc390c31f6db31a092f",
"result": [{
"tx_pos": 0,
"tx_hash": "bdcfb99b692a3418f79471ca970a201149d19ba97d0ca5c0b89949bdb627a1c9",
"value": 85,
"isSpentInMempoolTx": false,
"hex": "76a91411f074cf02b2c8070c424384493cb5c8548ae20788ac"
}, {
"tx_pos": 0,
"tx_hash": "575e01c3ef02809308c835308a643199e56c3eb80816a28c1db51f31968c413d",
"value": 17000,
"isSpentInMempoolTx": false,
"hex": "76a91411f074cf02b2c8070c424384493cb5c8548ae20788ac"
},
...
],
"error": ""
}
URL Parameters
network
Selected network: main
or test
.
address
Address.
Bulk Unconfirmed UTXOs by Address
This endpoint retrieves an ordered list of unconfirmed UTXOs for a given set of addresses
GET https://api.whatsonchain.com/v1/bsv/<network>/addresses/unconfirmed/unspent
{
"addresses": [
"<address>",
"<address>",
...
]
}
Example Request
curl --location --request POST "https://api.whatsonchain.com/v1/bsv/main/addresses/unconfirmed/unspent" \
--header "Content-Type: application/json" \
--data "{\"addresses\" : [\"12drYTV2c9nZMrxep9ewpWPdLrV5bNcWF2\",\"1uEVHTbkzhz6pFfMQEYoimE2bQZNbhRC8\" ] }"
Example Response
[{
"address": "12drYTV2c9nZMrxep9ewpWPdLrV5bNcWF2",
"script": "2d4ec8100056a819943df89efb3ac6a37a44bdf46a307dc390c31f6db31a092f",
"result": [{
"tx_pos": 0,
"tx_hash": "bdcfb99b692a3418f79471ca970a201149d19ba97d0ca5c0b89949bdb627a1c9",
"value": 85,
"isSpentInMempoolTx": false,
"hex": "76a91411f074cf02b2c8070c424384493cb5c8548ae20788ac"
}, {
"tx_pos": 0,
"tx_hash": "575e01c3ef02809308c835308a643199e56c3eb80816a28c1db51f31968c413d",
"value": 17000,
"isSpentInMempoolTx": false,
"hex": "76a91411f074cf02b2c8070c424384493cb5c8548ae20788ac"
},
...
],
"error": ""
}, {
"address": "1uEVHTbkzhz6pFfMQEYoimE2bQZNbhRC8",
"script": "b1654010d45195751fd392c13819834726edc87d6508f94cff4e41f643db2e49",
"result": [{
"tx_pos": 0,
"tx_hash": "ee568800fe3c442fc458e2a1471ac0c697d1b6c31d4185e016a58700514c82cc",
"value": 85,
"isSpentInMempoolTx": false,
"hex": "76a91409e0e39164714f25254ac278fc939933b1fe21f888ac"
}, {
"tx_pos": 0,
"tx_hash": "186e0bd354cc0ba6a00a70529b60940a553eef4e468d109c7c8614d04d260ee9",
"value": 85,
"isSpentInMempoolTx": false,
"hex": "76a91409e0e39164714f25254ac278fc939933b1fe21f888ac"
},
...
],
"error": ""
}]
URL Parameters
network
Selected network: main
or test
.
Get Confirmed UTXOs by Address
This endpoint retrieves an ordered list of confirmed UTXOs for a given address.
GET https://api.whatsonchain.com/v1/<chain>/<network>/address/<address>/confirmed/unspent
Example Request
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/address/1Dbj1LUxTqtuZ1U52KZiZChLPHkTAMiD6h/confirmed/unspent"
Example Response
{
"address": "1Dbj1LUxTqtuZ1U52KZiZChLPHkTAMiD6h",
"script": "0374d9ee2df8e5d7c5fd8359f33456996f2a1a9c76d9c783d2f8d5ee05ba5832",
"result": [{
"height": 797518,
"tx_pos": 0,
"tx_hash": "6cc9631ef3dad77eb0141134167f20469d0b4e61405de57fe6a9ac71b943bb9f",
"value": 181827,
"isSpentInMempoolTx": false
}],
"error": ""
}
URL Parameters
chain
Desired blockchain: bsv
or btc
.
network
Selected network: main
or test
.
address
Address.
limit
Between 1
and 10000
(default).
token
Provided next-page
token.
Bulk Confirmed UTXOs by Address
This endpoint retrieves an ordered list of confirmed UTXOs for a given set of addresses
GET https://api.whatsonchain.com/v1/<chain>/<network>/addresses/confirmed/unspent
{
"addresses": [
"<address>",
"<address>",
...
]
}
Example Request
curl --location --request POST "https://api.whatsonchain.com/v1/bsv/main/addresses/confirmed/unspent" \
--header "Content-Type: application/json" \
--data "{\"addresses\" : [\"16ZBEb7pp6mx5EAGrdeKivztd5eRJFuvYP\",\"1KGHhLTQaPr4LErrvbAuGE62yPpDoRwrob\" ] }"
Example Response
[{
"address": "16ZBEb7pp6mx5EAGrdeKivztd5eRJFuvYP",
"result": [{
"height": 657540,
"tx_pos": 1,
"tx_hash": "d75485c2329a533fd06b5f55a3f21644741c0258f2974d5d989e946a0bb4357f",
"value": 25000000
},{
"height": 657542,
"tx_pos": 1,
"tx_hash": "55a656d50327ec3237fa6e821ab62294695cfd508d631dc9b04dc3a395cf0a37",
"value": 25000000
}],
"error": ""
},{
"address": "1KGHhLTQaPr4LErrvbAuGE62yPpDoRwrob",
"result": [{
"height": 658133,
"tx_pos": 1,
"tx_hash": "7ae43aac97396bc99616d8273c6cd9b57f017d6d49aca742fbc8c214fee49fa7",
"value": 25000000
},{
"height": 658134,
"tx_pos": 1,
"tx_hash": "5b25a56bbb959f9cf4b3e48dbbe412bf5cc85e655d27f87c3bfb07aa6aa01518",
"value": 25000000
}],
"error": ""
}]
URL Parameters
chain
Desired blockchain: bsv
or btc
.
network
Selected network: main
or test
.
Get Unspent UTXOs by Script
This endpoint retrieves a combined, ordered list of both confirmed and unconfirmed UTXOs for a given script.
GET https://api.whatsonchain.com/v1/bsv/<network>/script/<scriptHash>/unspent/all
Example Request
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/script/b3005d46af31c4b5675b73c17579b7bd366dfe10635b7b43ac111aea5226efb6/unspent/all"
Example Response
{
"script": "b3005d46af31c4b5675b73c17579b7bd366dfe10635b7b43ac111aea5226efb6",
"result": [{
"height": 861499,
"tx_pos": 1,
"tx_hash": "ab0f76f957662335f98ee430a665f924c28310ec5126c2aede56086f9233326f",
"value": 154,
"isSpentInMempoolTx": false,
"status": "confirmed"
}, {
"height": 861925,
"tx_pos": 99,
"tx_hash": "54e27d08c371b67746fd3088b78eecb9acef91f497f7e776d11d605635b9dc20",
"value": 1000,
"isSpentInMempoolTx": false,
"status": "confirmed"
},
...
],
"error": ""
}
URL Parameters
network
Selected network: main
or test
.
scriptHash
Script hash: Sha256
hash of the binary bytes of the locking script (ScriptPubKey
), expressed as a hexadecimal string.
Get Unconfirmed UTXOs by Script
This endpoint retrieves the ordered list of unconfirmed UTXOs for a given script.
GET https://api.whatsonchain.com/v1/bsv/<network>/script/<scriptHash>/unconfirmed/unspent
Example Request
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/script/b1654010d45195751fd392c13819834726edc87d6508f94cff4e41f643db2e49/unconfirmed/unspent"
Example Response
{
"script": "b1654010d45195751fd392c13819834726edc87d6508f94cff4e41f643db2e49",
"result": [{
"tx_pos": 0,
"tx_hash": "ee568800fe3c442fc458e2a1471ac0c697d1b6c31d4185e016a58700514c82cc",
"value": 85,
"isSpentInMempoolTx": false,
"hex": "76a91409e0e39164714f25254ac278fc939933b1fe21f888ac"
}, {
"tx_pos": 0,
"tx_hash": "186e0bd354cc0ba6a00a70529b60940a553eef4e468d109c7c8614d04d260ee9",
"value": 85,
"isSpentInMempoolTx": false,
"hex": "76a91409e0e39164714f25254ac278fc939933b1fe21f888ac"
},
...
],
"error": ""
}
URL Parameters
network
Selected network: main
or test
.
scriptHash
Script hash: Sha256
hash of the binary bytes of the locking script (ScriptPubKey
), expressed as a hexadecimal string.
Bulk Unconfirmed UTXOs by Script
This endpoint retrieves an ordered list of unconfirmed UTXOs for a given set of script hashes.
GET https://api.whatsonchain.com/v1/bsv/<network>/scripts/unconfirmed/unspent
{
"scripts": [
"<script>",
"<script>",
...
]
}
Example Request
curl --location --request POST "https://api.whatsonchain.com/v1/bsv/main/scripts/unconfirmed/unspent" \
--header "Content-Type: application/json" \
--data "{\"scripts\" : [\"b1654010d45195751fd392c13819834726edc87d6508f94cff4e41f643db2e49\",\"2d4ec8100056a819943df89efb3ac6a37a44bdf46a307dc390c31f6db31a092f\" ] }"
Example Response
[{
"script": "b1654010d45195751fd392c13819834726edc87d6508f94cff4e41f643db2e49",
"result": [{
"tx_pos": 0,
"tx_hash": "ee568800fe3c442fc458e2a1471ac0c697d1b6c31d4185e016a58700514c82cc",
"value": 85,
"isSpentInMempoolTx": false,
"hex": "76a91409e0e39164714f25254ac278fc939933b1fe21f888ac"
}, {
"tx_pos": 0,
"tx_hash": "186e0bd354cc0ba6a00a70529b60940a553eef4e468d109c7c8614d04d260ee9",
"value": 85,
"isSpentInMempoolTx": false,
"hex": "76a91409e0e39164714f25254ac278fc939933b1fe21f888ac"
},
...
],
"error": ""
}, {
"script": "2d4ec8100056a819943df89efb3ac6a37a44bdf46a307dc390c31f6db31a092f",
"result": [{
"tx_pos": 0,
"tx_hash": "bdcfb99b692a3418f79471ca970a201149d19ba97d0ca5c0b89949bdb627a1c9",
"value": 85,
"isSpentInMempoolTx": false,
"hex": "76a91411f074cf02b2c8070c424384493cb5c8548ae20788ac"
}, {
"tx_pos": 0,
"tx_hash": "575e01c3ef02809308c835308a643199e56c3eb80816a28c1db51f31968c413d",
"value": 17000,
"isSpentInMempoolTx": false,
"hex": "76a91411f074cf02b2c8070c424384493cb5c8548ae20788ac"
},
...
],
"error": ""
}]
URL Parameters
network
Selected network: main
or test
.
Get Confirmed UTXOs by Script
This endpoint retrieves the ordered list of confirmed UTXOs for a given script.
GET https://api.whatsonchain.com/v1/<chain>/<network>/script/<scriptHash>/confirmed/unspent
Example Request
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/script/0374d9ee2df8e5d7c5fd8359f33456996f2a1a9c76d9c783d2f8d5ee05ba5832/confirmed/unspent"
Example Response
{
"script": "0374d9ee2df8e5d7c5fd8359f33456996f2a1a9c76d9c783d2f8d5ee05ba5832",
"result": [{
"height": 797518,
"tx_pos": 0,
"tx_hash": "6cc9631ef3dad77eb0141134167f20469d0b4e61405de57fe6a9ac71b943bb9f",
"value": 181827,
"isSpentInMempoolTx": false
}],
"error": ""
}
URL Parameters
chain
Desired blockchain: bsv
or btc
.
network
Selected network: main
or test
.
scriptHash
Script hash: Sha256
hash of the binary bytes of the locking script (ScriptPubKey
), expressed as a hexadecimal string.
limit
Between 1
and 10000
(default).
token
Provided next-page
token.
Bulk Confirmed UTXOs by Script
This endpoint retrieves an ordered list of confirmed UTXOs for a given set of script hashes.
GET https://api.whatsonchain.com/v1/<chain>/<network>/scripts/confirmed/unspent
{
"scripts": [
"<script>",
"<script>",
...
]
}
Example Request
curl --location --request POST "https://api.whatsonchain.com/v1/bsv/main/scripts/confirmed/unspent" \
--header "Content-Type: application/json" \
--data "{\"scripts\" : [\"f814a7c3a40164aacc440871e8b7b14eb6a45f0ca7dcbeaea709edc83274c5e7\",\"995ea8d0f752f41cdd99bb9d54cb004709e04c7dc4088bcbbbb9ea5c390a43c3\" ] }"
Example Response
[{
"script": "f814a7c3a40164aacc440871e8b7b14eb6a45f0ca7dcbeaea709edc83274c5e7",
"result": [{
"height": 620539,
"tx_pos": 0,
"tx_hash": "4ec3b63d764558303eda720e8e51f69bbcfe81376075657313fb587306f8a9b0",
"value": 450000,
"isSpentInMempoolTx": false
}],
"error": ""
}, {
"script": "995ea8d0f752f41cdd99bb9d54cb004709e04c7dc4088bcbbbb9ea5c390a43c3",
"result": [],
"error": ""
}]
URL Parameters
chain
Desired blockchain: bsv
or btc
.
network
Selected network: main
or test
.
Get Unconfirmed Spent Tx Output
This endpoint retrieves where the specified unconfirmed transaction output was spent.
GET https://api.whatsonchain.com/v1/bsv/<network>/tx/<txid>/<voutIndex>/unconfirmed/spent
Example Request
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/tx/c6647a562ac6a3cce0f46c2fb2b417cbd5daf1258f2a96d7556e6b9304f2889a/0/unconfirmed/spent"
Example Response
{
"txid": "6fe244e16ea34b30ec2888c41d7e05a36fc1838de6a612008adf71c99678c0c1",
"vin": 0,
"status": "unconfirmed"
}
URL Parameters
network
Selected network: main
or test
.
txid
Transaction ID.
voutIndex
Output index.
Get Confirmed Spent Tx Output
This endpoint retrieves where the specified confirmed transaction output was spent.
GET https://api.whatsonchain.com/v1/bsv/<network>/tx/<txid>/<voutIndex>/confirmed/spent
Example Request
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/tx/17d533c6a215223a62eef389707f77bef1601a18e4e994805a7846c3f3d50870/2/confirmed/spent"
Example Response
{
"txid": "87645a7c4a9a5a9b9cd1468db19cdba44129c35cc487fc57c4d8843141ad2551",
"vin": 2,
"status": "confirmed"
}
URL Parameters
chain
Desired blockchain: bsv
or btc
.
network
Selected network: main
or test
.
txid
Transaction ID.
voutIndex
Output index.
Get Spent Transaction Output
This endpoint retrieves where the specified transaction output was spent, checking both confirmed and unconfirmed in a single call.
GET https://api.whatsonchain.com/v1/bsv/<network>/tx/<txid>/<voutIndex>/spent
Example Request
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/tx/17d533c6a215223a62eef389707f77bef1601a18e4e994805a7846c3f3d50870/2/spent"
Example Response
{
"txid": "87645a7c4a9a5a9b9cd1468db19cdba44129c35cc487fc57c4d8843141ad2551",
"vin": 2,
"status": "confirmed"
}
URL Parameters
network
Selected network: main
or test
.
txid
Transaction ID.
voutIndex
Output index.
Errors
400 Bad Request
If UTXO is unknown.
404 Not Found
If UTXO is known but spent details are not found, i.e., it's still unspent.
Bulk Spent Transaction Outputs
This endpoint retrieves where the specified transaction outputs were spent, checking both confirmed and unconfirmed in a single call.
POST https://api.whatsonchain.com/v1/bsv/<network>/utxos/spent
{
"utxos": [
{
"txid": "<txid>",
"vout": <vout>
},
{
"txid": "<txid>",
"vout": <vout>
},
...
]
}
Example Request
curl --location --request POST "https://api.whatsonchain.com/v1/bsv/main/utxos/spent" \
--header "Content-Type: application/json" \
--data "{\"utxos\" :[{ \"txid\" :\"87645a7c4a9a5a9b9cd1468db19cdba44129c35cc487fc57c4d8843141ad2551\", \"vout\" : 2}, {\"txid\" :\"c6647a562ac6a3cce0f46c2fb2b417cbd5daf1258f2a96d7556e6b9304f2889a\", \"vout\" : 0}]}"
Example Response
[{
"utxo": {
"txid": "87645a7c4a9a5a9b9cd1468db19cdba44129c35cc487fc57c4d8843141ad2551",
"vout": 2
},
"spentIn": {
"txid": "87645a7c4a9a5a9b9cd1468db19cdba44129c35cc487fc57c4d8843141ad2551",
"vin": 2,
"status": "confirmed"
},
"error": ""
}, {
"utxo": {
"txid": "c6647a562ac6a3cce0f46c2fb2b417cbd5daf1258f2a96d7556e6b9304f2889a",
"vout": 0
},
"spentIn": {
"txid": "c6647a562ac6a3cce0f46c2fb2b417cbd5daf1258f2a96d7556e6b9304f2889a",
"vin": 0,
"status": "unconfirmed"
},
"error": ""
}]
URL Parameters
network
Selected network: main
or test
.
Errors
400 Bad Request
If UTXO is unknown.
404 Not Found
If UTXO is known but spent details are not found, i.e., it's still unspent.
ElectrumX Wrapper for ElectrumSV (Beta)
We've created a wrapper for our UTXO service that acts exactly like an ElectrumX server that you can plug into the ElectrumSV wallet (Network - Server).
Use any of these URLs to try it out and let us know what you think in the Telegram channel:
Use either the 50001
,50002
, or 50003
port.
Last updated
Was this helpful?