---
name: getrawtransaction
btcversion: 28.0.0
btcgroup: rawtransactions
permalink: en/doc/28.0.0/rpc/rawtransactions/getrawtransaction/
---

getrawtransaction "txid" ( verbosity "blockhash" )

By default, this call only returns a transaction if it is in the mempool. If -txindex is enabled
and no blockhash argument is passed, it will return the transaction if it is in the mempool or any block.
If a blockhash argument is passed, it will return the transaction if
the specified block is available and the trans