bitcoind.app
CommandsGuidesContact ↗
Home/Rawtransactions/getrawtransaction
Rawtransactions

getrawtransaction

Return the raw transaction data. By default returns hex. Use verbose for JSON.

Parameters

txidstringREQUIRED
The transaction id
verbosebooleanoptional
If true, return JSON. Default: false
blockhashstringoptional
The block to look for the transaction in

Returns

string|objectHex-encoded transaction or JSON

Code Examples

curl --user myuser --data-binary '{"jsonrpc":"1.0","id":"1","method":"getrawtransaction","params":["txid",true]}' -H 'content-type:text/plain;' http://127.0.0.1:8332/

Example Response

{
  "txid": "a1075db55d...",
  "hash": "a1075db55d...",
  "version": 2,
  "size": 225,
  "vsize": 141,
  "confirmations": 12
}
← Previous
finalizepsbt
Next →
joinpsbts

More Rawtransactions Commands

analyzepsbtcombinepsbtcombinerawtransactionconverttopsbtcreatepsbtcreaterawtransaction

bitcoind.app — Bitcoin Core RPC Reference

GuidesContact ↗