bb_getTx - Bitcoin Cash
Example code for the bb_getTx JSON-RPC method. Complete guide on how to use the bb_getTx JSON-RPC method in the GetBlock Web3 documentation.
Parameters
Parameter
Type
Required
Description
Request
curl --location --request GET 'https://go.getblock.io/<ACCESS-TOKEN>/api/v2/tx/10b54fd708ab2e5703979b4ba27ca0339882abc2062e77fbe51e625203a49642'curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "bb_getTx",
"params": [
"10b54fd708ab2e5703979b4ba27ca0339882abc2062e77fbe51e625203a49642"
],
"id": "getblock.io"
}'const response = await fetch(
'https://go.getblock.io/<ACCESS-TOKEN>/api/v2/tx/10b54fd708ab2e5703979b4ba27ca0339882abc2062e77fbe51e625203a49642'
);
console.log(await response.json());import requests
response = requests.get('https://go.getblock.io/<ACCESS-TOKEN>/api/v2/tx/10b54fd708ab2e5703979b4ba27ca0339882abc2062e77fbe51e625203a49642')
print(response.json())Response
{
"txid": "10b54fd708ab2e5703979b4ba27ca0339882abc2062e77fbe51e625203a49642",
"version": 1,
"vin": [
{
"txid": "780791bb2d5a8ccda4b5a707967a8e15b412814852c58c77299e85579bb65587",
"vout": 1,
"sequence": 4294967295,
"n": 0,
"addresses": [
"bitcoincash:qpm2qsznhks23z7629mms6s4cwef74vcwvy22gdx6a"
],
"isAddress": true,
"value": "12345970"
}
],
"vout": [
{
"value": "9407625",
"n": 0,
"spent": false,
"addresses": [
"bitcoincash:qpm2qsznhks23z7629mms6s4cwef74vcwvy22gdx6a"
],
"isAddress": true,
"type": "pubkeyhash"
}
],
"blockHash": "0000000000000000023a561e1ea370153aac5d1504726d1a039032831c05fcfc",
"blockHeight": 684634,
"confirmations": 1197,
"blockTime": 1617180599,
"size": 226,
"value": "9407625",
"valueIn": "12345970",
"fees": "2938345"
}Response Parameters
Field
Type
Description
Use Cases
Error Handling
Error Code
Message
Description
Was this helpful?