Links
Comment on page

(Un)Spent Transaction Outputs

These endpoints cover spent and unspent transaction outputs.

Get Unconfirmed UTXOs by Address (Beta)

This endpoint retrieves an ordered list of unconfirmed UTXOs for a given address. Returns up to 100k results in one request.
HTTP Request
GET https://api.whatsonchain.com/v1/bsv/<network>/address/<address>/unconfirmed/unspent
cURL
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/address/1Dbj1LUxTqtuZ1U52KZiZChLPHkTAMiD6h/unconfirmed/unspent"
Response JSON structure
{
"result": [
{
"tx_pos": 1,
"tx_hash": "93d8ae93a9e074c555d80e86c130b6cd4d5c7efa2795f91b2aea285c546512c6",
"value": 181724,
"hex": "76a9148a32b77e8f9bce47179fe03b6894e3d37003099888ac"
}
]
}
URL Parameters
Parameter
Description
network
The selected network: main or test.
address
The address

Bulk Unconfirmed UTXOs by Address (Beta)

This endpoint retrieves an ordered list of unconfirmed UTXOs for a given set of addresses - max 20 addresses per request. Returns up to 100 items in one request.
HTTP Request
GET https://api.whatsonchain.com/v1/bsv/<network>/addresses/unconfirmed/unspent
cURL
curl --location --request POST "https://api.whatsonchain.com/v1/bsv/main/addresses/unconfirmed/unspent" \
--header "Content-Type: application/json" \
--data "{\"addresses\" : [\"16ZBEb7pp6mx5EAGrdeKivztd5eRJFuvYP\",\"1KGHhLTQaPr4LErrvbAuGE62yPpDoRwrob\" ] }"
Request body JSON structure
{
"addresses":
[
"16ZBEb7pp6mx5EAGrdeKivztd5eRJFuvYP",
"1KGHhLTQaPr4LErrvbAuGE62yPpDoRwrob"
]
}
Response JSON structure
[
{
"address": "16ZBEb7pp6mx5EAGrdeKivztd5eRJFuvYP",
"unspent": [
{
"height": 657540,
"tx_pos": 1,
"tx_hash": "d75485c2329a533fd06b5f55a3f21644741c0258f2974d5d989e946a0bb4357f",
"value": 25000000
},
{
"height": 657542,
"tx_pos": 1,
"tx_hash": "55a656d50327ec3237fa6e821ab62294695cfd508d631dc9b04dc3a395cf0a37",
"value": 25000000
}
],
"error": ""
},
{
"address": "1KGHhLTQaPr4LErrvbAuGE62yPpDoRwrob",
"unspent": [
{
"height": 658133,
"tx_pos": 1,
"tx_hash": "7ae43aac97396bc99616d8273c6cd9b57f017d6d49aca742fbc8c214fee49fa7",
"value": 25000000
},
{
"height": 658134,
"tx_pos": 1,
"tx_hash": "5b25a56bbb959f9cf4b3e48dbbe412bf5cc85e655d27f87c3bfb07aa6aa01518",
"value": 25000000
}
],
"error": ""
}
]
URL Parameters
Parameter
Description
network
The selected network: main or test.

Get Confirmed UTXOs by Address (Beta)

This endpoint retrieves an ordered list of confirmed UTXOs for a given address. Pagination is available using the provided next-page token.
HTTP Request
GET https://api.whatsonchain.com/v1/bsv/<network>/address/<address>/confirmed/unspent
cURL
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/address/1Dbj1LUxTqtuZ1U52KZiZChLPHkTAMiD6h/confirmed/unspent"
Response JSON structure
{
"result": [
{
"height": 797518,
"tx_pos": 0,
"tx_hash": "6cc9631ef3dad77eb0141134167f20469d0b4e61405de57fe6a9ac71b943bb9f",
"value": 181827
}
]
}
URL Parameters
Parameter
Description
network
The selected network: main or test.
address
The address
limit
Between 1 and 10000; default is 10000.
token
Provided next page token.

Bulk Confirmed UTXOs by Address (Beta)

This endpoint retrieves an ordered list of confirmed UTXOs for a given set of addresses - max 20 addresses per request. Returns up to 20 items in one request.
HTTP Request
GET https://api.whatsonchain.com/v1/bsv/<network>/addresses/confirmed/unspent
cURL
curl --location --request POST "https://api.whatsonchain.com/v1/bsv/main/addresses/
confirmed/unspent" \
--header "Content-Type: application/json" \
--data "{\"addresses\" : [\"16ZBEb7pp6mx5EAGrdeKivztd5eRJFuvYP\",\"1KGHhLTQaPr4LErrvbAuGE62yPpDoRwrob\" ] }"
Request body JSON structure
{
"addresses":
[
"16ZBEb7pp6mx5EAGrdeKivztd5eRJFuvYP",
"1KGHhLTQaPr4LErrvbAuGE62yPpDoRwrob"
]
}
Response JSON structure
[
{
"address": "16ZBEb7pp6mx5EAGrdeKivztd5eRJFuvYP",
"unspent": [
{
"height": 657540,
"tx_pos": 1,
"tx_hash": "d75485c2329a533fd06b5f55a3f21644741c0258f2974d5d989e946a0bb4357f",
"value": 25000000
},
{
"height": 657542,
"tx_pos": 1,
"tx_hash": "55a656d50327ec3237fa6e821ab62294695cfd508d631dc9b04dc3a395cf0a37",
"value": 25000000
}
],
"error": ""
},
{
"address": "1KGHhLTQaPr4LErrvbAuGE62yPpDoRwrob",
"unspent": [
{
"height": 658133,
"tx_pos": 1,
"tx_hash": "7ae43aac97396bc99616d8273c6cd9b57f017d6d49aca742fbc8c214fee49fa7",
"value": 25000000
},
{
"height": 658134,
"tx_pos": 1,
"tx_hash": "5b25a56bbb959f9cf4b3e48dbbe412bf5cc85e655d27f87c3bfb07aa6aa01518",
"value": 25000000
}
],
"error": ""
}
]
URL Parameters
Parameter
Description
network
The selected network: main or test.

(Planned for deprecation) Get UTXOs by Address

This endpoint is powered by ElectrumX and is planned for deprecation in the near future.
This endpoint retrieves an ordered list of UTXOs for a given address.
HTTP Request
GET https://api.whatsonchain.com/v1/bsv/<network>/address/<address>/unspent
cURL
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/address/1GJ3x5bcEnKMnzNFPPELDfXUCwKEaLHM5H/unspent"
Returns a response as long as the response message is less than 1MB in size.
Response JSON structure
[
{
"height": 578325,
"tx_pos": 0,
"tx_hash": "62824e3af3d01113e9bce8b73576b833990d231357bd718385958c21d50bbddd",
"value": 1250020815
},
{
"height": 578326,
"tx_pos": 0,
"tx_hash": "4b008a10eebcf70f384442e4e3147bc76c6e4f764b516b208e148d700b965deb",
"value": 1251827826
},
...
]
URL Parameters
Parameter
Description
network
The selected network: main or test.
address
The address

(Planned for deprecation) Bulk UTXOs by Address

This endpoint is powered by ElectrumX and is planned for deprecation in the near future.
This endpoint retrieves a list of UTXOs for multiple addresses in a single request.
  • Max 20 addresses per request.
HTTP Request
POST https://api.whatsonchain.com/v1/bsv/<network>/addresses/unspent
cURL
curl --location --request POST "https://api.whatsonchain.com/v1/bsv/main/addresses/unspent" \
--header "Content-Type: application/json" \
--data "{\"addresses\" : [\"16ZBEb7pp6mx5EAGrdeKivztd5eRJFuvYP\",\"1KGHhLTQaPr4LErrvbAuGE62yPpDoRwrob\" ] }"
The JSON structure for the above post request:
JSON structure
{
"addresses":
[
"16ZBEb7pp6mx5EAGrdeKivztd5eRJFuvYP",
"1KGHhLTQaPr4LErrvbAuGE62yPpDoRwrob"
]
}
Response JSON structure
[
{
"address": "16ZBEb7pp6mx5EAGrdeKivztd5eRJFuvYP",
"unspent": [
{
"height": 657540,
"tx_pos": 1,
"tx_hash": "d75485c2329a533fd06b5f55a3f21644741c0258f2974d5d989e946a0bb4357f",
"value": 25000000
},
{
"height": 657542,
"tx_pos": 1,
"tx_hash": "55a656d50327ec3237fa6e821ab62294695cfd508d631dc9b04dc3a395cf0a37",
"value": 25000000
}
],
"error": ""
},
{
"address": "1KGHhLTQaPr4LErrvbAuGE62yPpDoRwrob",
"unspent": [
{
"height": 658133,
"tx_pos": 1,
"tx_hash": "7ae43aac97396bc99616d8273c6cd9b57f017d6d49aca742fbc8c214fee49fa7",
"value": 25000000
},
{
"height": 658134,
"tx_pos": 1,
"tx_hash": "5b25a56bbb959f9cf4b3e48dbbe412bf5cc85e655d27f87c3bfb07aa6aa01518",
"value": 25000000
}
],
"error": ""
}
]
URL Parameters
Parameter
Description
network
The selected network: main, test, or stn.

Get Unconfirmed UTXOs by Script (Beta)

This endpoint retrieves the ordered list of unconfirmed UTXOs for a given script. Returns up to 100k results in one request.
HTTP Request
GET https://api.whatsonchain.com/v1/bsv/<network>/script/<scriptHash>/unconfirmed/unspent
cURL
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/script/0374d9ee2df8e5d7c5fd8359f33456996f2a1a9c76d9c783d2f8d5ee05ba5832/unconfirmed/unspent"
Response JSON structure
{
"result": [
{
"tx_pos": 1,
"tx_hash": "93d8ae93a9e074c555d80e86c130b6cd4d5c7efa2795f91b2aea285c546512c6",
"value": 181724,
"hex": "76a9148a32b77e8f9bce47179fe03b6894e3d37003099888ac"
}
]
}
URL Parameters
Parameter
Description
network
The selected network: main or test.
scriptHash
The script hash: Sha256 hash of the binary bytes of the locking script (ScriptPubKey), expressed as a hexadecimal string.

Bulk Unconfirmed UTXOs by Script (Beta)

This endpoint retrieves an ordered list of unconfirmed UTXOs for a given set of scripthashes - max 20 scripthashes per request. Returns up to 20 items in one request.
HTTP Request
GET https://api.whatsonchain.com/v1/bsv/<network>/scripts/unconfirmed/unspent
cURL
curl --location --request POST "https://api.whatsonchain.com/v1/bsv/main/scripts/unconfirmed/unspent" \
--header "Content-Type: application/json" \
--data "{\"scripts\" : [\"f814a7c3a40164aacc440871e8b7b14eb6a45f0ca7dcbeaea709edc83274c5e7\",\"995ea8d0f752f41cdd99bb9d54cb004709e04c7dc4088bcbbbb9ea5c390a43c3\" ] }"
Request body JSON structure
{
"scripts": [
"f814a7c3a40164aacc440871e8b7b14eb6a45f0ca7dcbeaea709edc83274c5e7",
"995ea8d0f752f41cdd99bb9d54cb004709e04c7dc4088bcbbbb9ea5c390a43c3"
]
}
Response JSON structure
[
{
"script": "f814a7c3a40164aacc440871e8b7b14eb6a45f0ca7dcbeaea709edc83274c5e7",
"unspent": [
{
"height": 620539,
"tx_pos": 0,
"tx_hash": "4ec3b63d764558303eda720e8e51f69bbcfe81376075657313fb587306f8a9b0",
"value": 450000
}
],
"error": ""
},
{
"script": "995ea8d0f752f41cdd99bb9d54cb004709e04c7dc4088bcbbbb9ea5c390a43c3",
"unspent": [],
"error": ""
}
]
URL Parameters
Parameter
Description
network
The selected network: main or test.

Get Confirmed UTXOs by Script (Beta)

This endpoint retrieves the ordered list of confirmed UTXOs for a given script. Pagination is available using the provided next-page token.
HTTP Request
GET https://api.whatsonchain.com/v1/bsv/<network>/script/<scriptHash>/confirmed/unspent
cURL
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/script/0374d9ee2df8e5d7c5fd8359f33456996f2a1a9c76d9c783d2f8d5ee05ba5832/confirmed/unspent"
Response JSON structure
{
"result": [
{
"height": 797518,
"tx_pos": 0,
"tx_hash": "6cc9631ef3dad77eb0141134167f20469d0b4e61405de57fe6a9ac71b943bb9f",
"value": 181827
}
]
}
URL Parameters
Parameter
Description
network
The selected network: main or test.
scriptHash
The script hash: Sha256 hash of the binary bytes of the locking script (ScriptPubKey), expressed as a hexadecimal string.
limit
Between 1 and 10000; default is 10000.
token
Provided next page token.

Bulk Confirmed UTXOs by Script (Beta)

This endpoint retrieves an ordered list of confirmed UTXOs for a given set of scripthashes - max 20 scripthashes per request. Returns up to 20 items in one request.
HTTP Request
GET https://api.whatsonchain.com/v1/bsv/<network>/scripts/confirmed/unspent
cURL
curl --location --request POST "https://api.whatsonchain.com/v1/bsv/main/scripts/confirmed/unspent" \
--header "Content-Type: application/json" \
--data "{\"scripts\" : [\"f814a7c3a40164aacc440871e8b7b14eb6a45f0ca7dcbeaea709edc83274c5e7\",\"995ea8d0f752f41cdd99bb9d54cb004709e04c7dc4088bcbbbb9ea5c390a43c3\" ] }"
Request body JSON structure
{
"scripts": [
"f814a7c3a40164aacc440871e8b7b14eb6a45f0ca7dcbeaea709edc83274c5e7",
"995ea8d0f752f41cdd99bb9d54cb004709e04c7dc4088bcbbbb9ea5c390a43c3"
]
}
Response JSON structure
[
{
"script": "f814a7c3a40164aacc440871e8b7b14eb6a45f0ca7dcbeaea709edc83274c5e7",
"unspent": [
{
"height": 620539,
"tx_pos": 0,
"tx_hash": "4ec3b63d764558303eda720e8e51f69bbcfe81376075657313fb587306f8a9b0",
"value": 450000
}
],
"error": ""
},
{
"script": "995ea8d0f752f41cdd99bb9d54cb004709e04c7dc4088bcbbbb9ea5c390a43c3",
"unspent": [],
"error": ""
}
]
URL Parameters
Parameter
Description
network
The selected network: main or test.

(Planned for deprecation) Get UTXOs by Script

This endpoint is powered by ElectrumX and is planned for deprecation in the near future.
This endpoint retrieves the ordered list of UTXOs for a given script.
HTTP Request
GET https://api.whatsonchain.com/v1/bsv/<network>/script/<scriptHash>/unspent
cURL
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/script/995ea8d0f752f41cdd99bb9d54cb004709e04c7dc4088bcbbbb9ea5c390a43c3/unspent"
Returns a response as long as the response message is less than 1MB in size.
Response JSON structure
[
{
"height": 578325,
"tx_pos": 0,
"tx_hash": "62824e3af3d01113e9bce8b73576b833990d231357bd718385958c21d50bbddd",
"value": 1250020815
},
{
"height": 578326,
"tx_pos": 0,
"tx_hash": "4b008a10eebcf70f384442e4e3147bc76c6e4f764b516b208e148d700b965deb",
"value": 1251827826
},
...
]
URL Parameters
Parameter
Description
network
The selected network: main or test.
scriptHash
The script hash: Sha256 hash of the binary bytes of the locking script (ScriptPubKey), expressed as a hexadecimal string.

(Planned for deprecation) Bulk UTXOs by Script

This endpoint is powered by ElectrumX and is planned for deprecation in the near future.
This endpoint retrieves a list of UTXOs for multiple scripts in a single request.
  • Max 20 scripts per request.
HTTP Request
POST https://api.whatsonchain.com/v1/bsv/<network>/scripts/unspent
cURL
curl --location --request POST "https://api.whatsonchain.com/v1/bsv/main/scripts/unspent" \
--header "Content-Type: application/json" \
--data "{\"scripts\" : [\"f814a7c3a40164aacc440871e8b7b14eb6a45f0ca7dcbeaea709edc83274c5e7\",\"995ea8d0f752f41cdd99bb9d54cb004709e04c7dc4088bcbbbb9ea5c390a43c3\" ] }"
The JSON structure for the above post request:
JSON structure
{
"scripts": [
"f814a7c3a40164aacc440871e8b7b14eb6a45f0ca7dcbeaea709edc83274c5e7",
"995ea8d0f752f41cdd99bb9d54cb004709e04c7dc4088bcbbbb9ea5c390a43c3"
]
}
Response JSON structure
[
{
"script": "f814a7c3a40164aacc440871e8b7b14eb6a45f0ca7dcbeaea709edc83274c5e7",
"unspent": [
{
"height": 620539,
"tx_pos": 0,
"tx_hash": "4ec3b63d764558303eda720e8e51f69bbcfe81376075657313fb587306f8a9b0",
"value": 450000
}
],
"error": ""
},
{
"script": "995ea8d0f752f41cdd99bb9d54cb004709e04c7dc4088bcbbbb9ea5c390a43c3",
"unspent": [],
"error": ""
}
]
URL Parameters
Parameter
Description
network
The selected network: main, test, or stn.

Get Unconfirmed Spent Tx Output (Beta)

This endpoint retrieves where the specified unconfirmed transaction output was spent.
HTTP Request
GET https://api.whatsonchain.com/v1/bsv/<network>/tx/<txid>/<voutIndex>/unconfirmed/spent
cURL
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/tx/d2d9231b0d3cc19f1b9cfe798b8e68eaf8db3cd803128779c8aabaaea9cba4ea/1/unconfirmed/spent"
Response JSON structure
{
"txid": "b905857a36586e68b8186be1e7b1ac56de196f5257536f019d7071cbdb0608a7",
"vin": 0
}
URL Parameters
Parameter
Description
network
The selected network: main or test.
txid
The transaction ID.
voutIndex
The specific output index.

Get Confirmed Spent Tx Output (Beta)

This endpoint retrieves where the specified confirmed transaction output was spent.
HTTP Request
GET https://api.whatsonchain.com/v1/bsv/<network>/tx/<txid>/<voutIndex>/confirmed/spent
cURL
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/tx/17d533c6a215223a62eef389707f77bef1601a18e4e994805a7846c3f3d50870/2/confirmed/spent"
Response JSON structure
{
"txid": "87645a7c4a9a5a9b9cd1468db19cdba44129c35cc487fc57c4d8843141ad2551",
"vin": 2
}
URL Parameters
Parameter
Description
network
The selected network: main or test.
txid
The transaction ID.
voutIndex
The specific output index.

Get Spent Transaction Output (Beta)

This endpoint retrieves where the specified transaction output was spent, checking both confirmed and unconfirmed in a single call.
HTTP Request
GET https://api.whatsonchain.com/v1/bsv/<network>/tx/<txid>/<voutIndex>/spent
cURL
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/tx/17d533c6a215223a62eef389707f77bef1601a18e4e994805a7846c3f3d50870/2/spent"
Response JSON structure
{
"txid": "87645a7c4a9a5a9b9cd1468db19cdba44129c35cc487fc57c4d8843141ad2551",
"vin": 2
}
URL Parameters
Parameter
Description
network
The selected network: main or test.
txid
The transaction ID.
voutIndex
The specific output index.

Bulk Spent Transaction Outputs (Beta)

This endpoint retrieves where the specified transaction outputs were spent, checking both confirmed and unconfirmed in a single call.
  • Max 20 transaction outputs per request.
HTTP Request
POST https://api.whatsonchain.com/v1/bsv/<network>/utxos/spent
cURL
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\" :\"e05de19075bc8205d702036a53d3e21ff6a2964f1e9941b913921e1e83d82c91\", \"vout\" : 0}]}"
Request body JSON structure
{
"utxos":
[
{
"txid": "87645a7c4a9a5a9b9cd1468db19cdba44129c35cc487fc57c4d8843141ad2551",
"vout": 2
},
{
"txid": "e05de19075bc8205d702036a53d3e21ff6a2964f1e9941b913921e1e83d82c91",
"vout": 0
}
]
}
Response JSON structure
[
{
"utxo": {
"txid": "87645a7c4a9a5a9b9cd1468db19cdba44129c35cc487fc57c4d8843141ad2551",
"vout": 2
},
"spentIn": {
"txid": "88d8ce011179fac0dc466a1c5fcb734a91b076d15354aee4f7186ea3f5921533",
"vin": 93,
"status": "confirmed"
},
"error": ""
},
{
"utxo": {
"txid": "e05de19075bc8205d702036a53d3e21ff6a2964f1e9941b913921e1e83d82c91",
"vout": 0
},
"spentIn": {
"txid": "81f4ffcdc8ac15a9f360196f95f8e4e32c2e2c4fb78fdca64e52856820d3ed3d",
"vin": 0,
"status": "unconfirmed"
},
"error": ""
}
]
URL Parameters
Parameter
Description
network
The selected network: main or test.
Last modified 16d ago