Skip to content

Script

Get Script History

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

HTTP Request

GET https://api.turingbitchain.io/api/tbc/history/scriptpubkeyhash/{scriptpubkeyhash}/start/{start}/end/{end}

Example Request

shell
curl --location --request GET 'https://api.turingbitchain.io/api/tbc/history/scriptpubkeyhash/ac0513bbad194865c98858e802f9c9125b2080c0f14fe2d0b0296c0b7b337c18/start/0/end/10'

Example Response

json
{
    "code": "200",
    "message": "OK",
    "data": {
        "history_count": 2,
        "history_list": [
            {
                "txid": "cb31d4fa5e20ebfbe8e00b837bb32476177491c8a274ec1f9c321f46dd42a65d",
                "height": 904937,
                "vin": [
                    {
                        "address": "1JsAsC3teUirQ1jMH6haMv6smdpmAZULs1",
                        "value": 997999760
                    }
                ],
                "vout": [
                    {
                        "address": "18peAZi1ue7M4abbRVSFcAEw9GKX7pHQ6K",
                        "value": 997950000
                    },
                    {
                        "address": "1JsAsC3teUirQ1jMH6haMv6smdpmAZULs1",
                        "value": 49680
                    }
                ],
                "fee": 80,
                "confirmations": 5075,
                "time": 1755104200
            },
            {
                "txid": "f611c966d6a05a476c38f80b7b4ff145daf1d35b1a550db327050109d61d1124",
                "height": 895574,
                "vin": [
                    {
                        "address": "1LMsRY32UtokxYQ9j56sL7FwutoZMQ6Da",
                        "value": 997999840
                    }
                ],
                "vout": [
                    {
                        "address": "1JsAsC3teUirQ1jMH6haMv6smdpmAZULs1",
                        "value": 997999760
                    }
                ],
                "fee": 80,
                "confirmations": 14438,
                "time": 1749472977
            }
        ]
    }
}

URL Parameters

ParameterDescription
scriptpubkeyhashScript hash: Sha256 hash of the binary bytes of the locking script (ScriptPubKey), expressed as a hexadecimal string.
startStarting position or offset (integer).
endEnding position or offset (integer).