⚡ Test Our Private Nodes of 40+ Blockchains just for $50!

coins coins coins coins
/

Nervos Network (CKB)

ckb
Nervos Network (CKB)

Method: POST get_transaction

dropdown

# get_transaction example for Nervos Network (CKB)

POST get_transaction

Returns the information about a transaction requested by transaction hash.

Parameters

tx_hash - string

hash of a transaction

verbosity - integer

result format which allows 0 and 2. (Optional, the default is 2.)

Request

curl --location --request POST 'https://ckb.getblock.io/mainnet/' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "get_transaction",
"params": ["0xe8a106be755bdb9fa0b452297edb5785f6d901f8a3b5f74044ab2f5d8cfb0ed1", null],
"id": "getblock.io"}'


Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": {
        "transaction": {
            "cell_deps": [],
            "hash": "0xe8a106be755bdb9fa0b452297edb5785f6d901f8a3b5f74044ab2f5d8cfb0ed1",
            "header_deps": [],
            "inputs": [
                {
                    "previous_output": {
                        "index": "0xffffffff",
                        "tx_hash": "0x0000000000000000000000000000000000000000000000000000000000000000"
                    },
                    "since": "0x75a843"
                }
            ],
            "outputs": [
                {
                    "capacity": "0x25df894304",
                    "lock": {
                        "args": "0xdde7801c073dfb3464c7b1f05b806bb2bbb84e99",
                        "code_hash": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
                        "hash_type": "type"
                    },
                    "type": null
                }
            ],
            "outputs_data": [
                "0x"
            ],
            "version": "0x0",
            "witnesses": [
                "0x800000000c00000055000000490000001000000030000000310000009bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce80114000000dde7801c073dfb3464c7b1f05b806bb2bbb84e9927000000302e3130332e302028353161383134612d646972747920323032322d30342d3230292000000000"
            ]
        },
        "tx_status": {
            "block_hash": "0xe8038094a1e2c82c45401e2089ec28f0f99b0b71eb385307e4f3c3a54c643294",
            "reason": null,
            "status": "committed"
        }
    }
}