Script

Get Script Usage Status

This endpoint serves as a usage status flag for a given script.

HTTP Request
GET https://api.whatsonchain.com/v1/<chain>/<network>/script/<scriptHash>/used

Example Request

curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/script/3a9b9e2285ae40de7679e48efcef7d029a46a7b3120063a6d24347ce4452e6ee/used"

Example Response

false

URL Parameters

Parameter
Description

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.

Get Unconfirmed Script History

This endpoint retrieves the history of unconfirmed transactions for a given script.

circle-info

Returns up to 100k results in one request.

HTTP Request
GET https://api.whatsonchain.com/v1/bsv/<network>/script/<scriptHash>/unconfirmed/history

Example Request

Example Response

URL Parameters

Parameter
Description

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 Script History

This endpoint retrieves the history of unconfirmed transactions for a given set of scripts.

circle-info
  • Max 20 script hashes per request.

  • Max 100 items returned per request.

Example Request

Example Response

URL Parameters

Parameter
Description

network

Selected network: main or test.

Get Confirmed Script History

This endpoint retrieves the history of confirmed transactions for a given script.

circle-info

Pagination is available using the provided next-page token.

Example Request

Example Response

URL Parameters

Parameter
Description

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.

order

Ordering: asc or desc (default).

limit (optional)

Between 1 and 1000; default is 100.

height (optional)

Starting block height for history; default is 0.

token

Provided next-page token.

Bulk Confirmed Script History

This endpoint retrieves the history of confirmed transactions for a given set of scripts.

circle-info
  • Max 20 script hashes per request.

  • Max 20 items returned per request.

Example Request

Example Response

URL Parameters

Parameter
Description

chain

Desired blockchain: bsv or btc.

network

Selected network: main or test.

Last updated

Was this helpful?