getrawtransaction | Bitcoin

The getrawtransaction method retrieves a transaction by its ID. It can return either the hex-encoded transaction data or a detailed, decoded transaction object.


Get you own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.

You can sign up with your GitHub, X, Google, or Microsoft account.


  • txid (required): The transaction ID.
  • verbose (optional): A boolean indicating whether to return a detailed, decoded transaction object instead of the hex-encoded data. Defaults to false.


  • result — depending on the verbose parameter, this is either a string containing the hex-encoded transaction or an object containing the decoded transaction details.
  • error — an object containing an error message if an error occurred, otherwise null.
  • id — an integer representing the ID of the request.

Use case

The getrawtransaction method is essential for retrieving transaction data for analysis, debugging, or verification purposes. It allows users to access detailed information about a transaction, including its inputs, outputs, and metadata.

Try the getrawtransaction RPC method yourself

Click Try It! to start a request and see the response here!