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

getrawtransaction "txid" ( verbose "blockhash" )

NOTE: By default this function only works for mempool transactions. If the -txindex option is
enabled, it also works for blockchain transactions. If the block which contains the transaction
is known, its hash can be provided even for nodes without -txindex. Note that if a blockhash is
provided, only that block will be 