What does the Bitcoin Core RPC command getrawtransaction do?
Answer: Retrieves a transaction when it is available through the mempool, index or supplied block.
Category: Rawtransactions RPC.
Operational classification: Read-only or diagnostic.
Inspect the exact syntax:
bitcoin-cli help getrawtransaction
Important: Results may depend on optional indexes and available transaction or block data. On a pruned node, older block data may be unavailable; check the node’s pruning state before relying on historical scans. Without txindex, access is usually limited to transactions in the mempool or a known block.
Documentation:
Bitcoin Core RPC reference (choose your deployed release):
https://bitcoincore.org/en/doc/
Related guide:
https://thamer.org/docs/
