This endpoint serves as a usage status flag for a given script.
HTTP Request
GET https://api.whatsonchain.com/v1/bsv/<network>/script/<scriptHash>/used
cURL
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/script/3a9b9e2285ae40de7679e48efcef7d029a46a7b3120063a6d24347ce4452e6ee/used"
Response JSON structure
false
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.
Get Unconfirmed Script History
This endpoint retrieves the history of unconfirmed transactions 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/history
cURL
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/script/0374d9ee2df8e5d7c5fd8359f33456996f2a1a9c76d9c783d2f8d5ee05ba5832/unconfirmed/history"
This endpoint retrieves the history of confirmed transactions 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/history
cURL
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/script/0374d9ee2df8e5d7c5fd8359f33456996f2a1a9c76d9c783d2f8d5ee05ba5832/confirmed/history"
This endpoint is powered by ElectrumX and is planned for deprecation in the near future.
This endpoint retrieves both the confirmed and unconfirmed transactions for a given script.
HTTP Request
GET https://api.whatsonchain.com/v1/bsv/<network>/script/<scriptHash>/history
cURL
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/script/995ea8d0f752f41cdd99bb9d54cb004709e04c7dc4088bcbbbb9ea5c390a43c3/history"
Returns a response as long as the response message is less than 1MB in size.