bb_getTx RPC Method - Blockbook
Please note that this RPC method requires the Blockbook RPC add-on enabled on your QuickNode endpoint.
Parameters
txid
string
REQUIRED
Loading...
Returns
result
object
Loading...
txid
Loading...
version
Loading...
vin
Loading...
txid
Loading...
vout
Loading...
sequence
Loading...
n
Loading...
addresses
Loading...
isAddress
Loading...
value
Loading...
vout
Loading...
value
Loading...
n
Loading...
spent
Loading...
hex
Loading...
addresses
Loading...
isAddress
Loading...
blockHash
Loading...
blockHeight
Loading...
confirmations
Loading...
blockTime
Loading...
size
Loading...
vsize
Loading...
value
Loading...
valueIn
Loading...
fees
Loading...
hex
Loading...
Request
curl https://docs-demo.btc.quiknode.pro/ \ -X POST \ -H "Content-Type: application/json" \ --data '{"id": 1, "jsonrpc": "2.0", "method": "bb_getTx", "params": ["8970770f2069d60d6ff0f8f405a702b0caac03ce418061fd4af7326ba2e67810"]}'
var myHeaders = new Headers(); myHeaders.append("Content-Type", "application/json"); var raw = JSON.stringify({ "id": 1, "jsonrpc": "2.0", "method": "bb_getTx", "params": [ "8970770f2069d60d6ff0f8f405a702b0caac03ce418061fd4af7326ba2e67810" ] }); var requestOptions = { method: 'POST', headers: myHeaders, body: raw, redirect: 'follow' }; fetch("https://docs-demo.btc.quiknode.pro/", requestOptions) .then(response => response.text()) .then(result => console.log(result)) .catch(error => console.log('error', error));
import requests import json url = "https://docs-demo.btc.quiknode.pro/" payload = json.dumps({ "id": 1, "jsonrpc": "2.0", "method": "bb_getTx", "params": [ "8970770f2069d60d6ff0f8f405a702b0caac03ce418061fd4af7326ba2e67810" ] }) headers = { 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
require "uri" require "json" require "net/http" url = URI("https://docs-demo.btc.quiknode.pro/") https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request["Content-Type"] = "application/json" request.body = JSON.dump({ id: 1, jsonrpc: "2.0", method: "bb_getTx", params: [ "8970770f2069d60d6ff0f8f405a702b0caac03ce418061fd4af7326ba2e67810" ] }) response = https.request(request) puts response.read_body
Response
{ "id": null, "result": { "txid": "8970770f2069d60d6ff0f8f405a702b0caac03ce418061fd4af7326ba2e67810", "version": 1, "vin": [ { "txid": "c04f05026cd92d1f569e8aa84611740ec39f907ba9fe80ac538c1c2dc459df8b", "vout": 2, "sequence": 4294967295, "n": 0, "addresses": [ "bc1qwqdg6squsna38e46795at95yu9atm8azzmyvckulcc7kytlcckxswvvzej" ], "isAddress": true, "value": "173863715" } ], "vout": [ { "value": "1300000", "n": 0, "spent": true, "hex": "0014c9994201826e9d65b2b93b03da694ee19e565d95", "addresses": [ "bc1qexv5yqvzd6wktv4e8vpa562wux09vhv46dpan6" ], "isAddress": true }, { "value": "2500000", "n": 1, "spent": true, "hex": "a9142a24c16ea7aa21ee310ab8493e360b1e4ab9e94487", "addresses": [ "35XrLRZ1EMvsDReqsrCj6L4W8fR38Z2D2V" ], "isAddress": true }, { "value": "3754300", "n": 2, "spent": true, "hex": "0014496d2d9d711be23c2c0e893606aa026eea1f438b", "addresses": [ "bc1qf9kjm8t3r03rctqw3ymqd2szdm4p7suteums5d" ], "isAddress": true }, { "value": "2500000", "n": 3, "spent": true, "hex": "a914225e51a9f423bad92151f18c6b6dec25feece18287", "addresses": [ "34pjtTvPrXZNA24EdJSuZiAz9p7z93TcjB" ], "isAddress": true }, { "value": "163792375", "n": 4, "spent": true, "hex": "0020701a8d401c84fb13e6baf169d59684e17abd9fa216c8cc5b9fc63d622ff8c58d", "addresses": [ "bc1qwqdg6squsna38e46795at95yu9atm8azzmyvckulcc7kytlcckxswvvzej" ], "isAddress": true } ], "blockHash": "00000000000000000004b0aeba2178792400bbb39881cac64edd6cffb85bfb0d", "blockHeight": 807346, "confirmations": 86856, "blockTime": 1694526109, "size": 474, "vsize": 284, "value": "173846675", "valueIn": "173863715", "fees": "17040", "hex": "010000000001018bdf59c42d1c8c53ac80fea97b909fc30e741146a88a9e561f2dd96c02054fc00200000000ffffffff0520d6130000000000160014c9994201826e9d65b2b93b03da694ee19e565d95a02526000000000017a9142a24c16ea7aa21ee310ab8493e360b1e4ab9e944873c49390000000000160014496d2d9d711be23c2c0e893606aa026eea1f438ba02526000000000017a914225e51a9f423bad92151f18c6b6dec25feece18287f745c30900000000220020701a8d401c84fb13e6baf169d59684e17abd9fa216c8cc5b9fc63d622ff8c58d040047304402203c83b73cd2648d992c810a3c4615bc102dfce0e7c778db87e47b980c511f56ab022056ca36439d76b5ba5a188834eb094f1b78b6eb33826c925e450e3ad41511f038014730440220584520eb6aba9b3140c45464f52e76eb22f25fe5718ccff04e1dee3d6f49ecf4022028196ad261d1df76f27edad10f7bf687aeb9a2e83476c17e7c690c6a5184b137016952210375e00eb72e29da82b89367947f29ef34afb75e8654f6ea368e0acdfd92976b7c2103a1b26313f430c4b15bb1fdce663207659d8cac749a0e53d70eff01874496feff2103c96d495bfdd5ba4145e3e046fee45e84a8a48ad05bd8dbb395c011a32cf9f88053ae00000000" }, "jsonrpc": "2.0" }
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free