This guide explains Bitcoin Core gettransaction RPC in plain English. It shows what the command does, what its result means and what it cannot prove.
TL;DR
- What it is: Bitcoin Core 0.16.0 gettransaction returned the wallet’s detailed view of one in-wallet transaction. It included net wallet amount, a negative fee for sends, confirmations, block placement and times, BIP 125 replaceability, per-address send or receive details, deprecated account and label data, abandoned state and raw hex.
- Why it matters: gettransaction is the authoritative historical wallet record only within its wallet context. Safe reconciliation preserves amount and fee signs, watch-only scope, replaceability and changing active-chain state.
- Current position: Replaceability is policy context, not proof that replacement will happen or that a transaction is final.
Bitcoin Core gettransaction RPC in simple English
Bitcoin Core gettransaction RPC: The txid must be relevant to the queried wallet. A blockchain transaction absent from this wallet belongs in raw-transaction or indexed-chain workflows.
Simple example
A miner is checking Bitcoin Core gettransaction RPC. Verify wallet identity and chain before interpreting amounts or labels. Include_watchonly changes balance calculation and details when the wallet monitors scripts without spending keys.
Key terms in plain English
- BIP:
- Bitcoin Improvement Proposal: a document describing a proposed rule, standard or process. Its status must be checked separately.
- Bitcoin Core:
- Widely used software that validates Bitcoin and can provide wallet, network and operator tools.
- RPC:
- A command that software sends to a node to request information or a local action.
- Mempool:
- A node’s changing local collection of valid, unconfirmed transactions.
- Node:
- A computer running Bitcoin software that checks data and communicates with other peers.
Wallet membership
The txid must be relevant to the queried wallet. A blockchain transaction absent from this wallet belongs in raw-transaction or indexed-chain workflows. Verify wallet identity and chain before interpreting amounts or labels.
Amount and fee signs
amount is the wallet-relative net transaction amount, not necessarily total outputs. Fee is negative and only present for sending. Sum per-detail fields carefully in satoshis and keep fees separate so sign conventions do not double-count cost.
Watch-only option
include_watchonly changes balance calculation and details when the wallet monitors scripts without spending keys. Watch-only funds are not spendable custody. Reports must label inclusion and distinguish observed, solvable and signable state.
Confirmations and block context
blockhash, block index and block time appear for confirmed records, while confirmations can change under reorganisation. Anchor each observation to the active tip and recompute financial state when block membership changes.
BIP125 status
The historical field reports yes, no or unknown. Unknown can occur when an unconfirmed transaction is absent from the mempool. Replaceability is policy context, not proof that replacement will happen or that a transaction is final.
Details and abandonment
Each detail carries deprecated account, address, send or receive category, amount, label and vout; sends can include fee and abandoned. Abandonment makes wallet inputs reusable locally but does not erase a transaction that another node may still relay.
How specialists test it
Operators test the command on a non-production node first. They check a normal reply, an invalid request, a timeout and a restart. This shows what the response means and prevents one local result from being mistaken for a network-wide outcome.
Frequently asked questions
What is the main point of Bitcoin Core gettransaction RPC?
Bitcoin Core gettransaction RPC: The txid must be relevant to the queried wallet. A blockchain transaction absent from this wallet belongs in raw-transaction or indexed-chain workflows.
For Bitcoin Core gettransaction RPC, what should a beginner know about wallet membership?
The txid must be relevant to the queried wallet. A blockchain transaction absent from this wallet belongs in raw-transaction or indexed-chain workflows.
For Bitcoin Core gettransaction RPC, what should a beginner know about amount and fee signs?
amount is the wallet-relative net transaction amount, not necessarily total outputs.
For Bitcoin Core gettransaction RPC, what should a beginner know about watch-only option?
include_watchonly changes balance calculation and details when the wallet monitors scripts without spending keys.
Conclusion
gettransaction is the authoritative historical wallet record only within its wallet context. Safe reconciliation preserves amount and fee signs, watch-only scope, replaceability and changing active-chain state.
Primary sources
Check the current specification status and the documentation for the exact implementation you operate before moving production funds or changing a mining node.
Join the ASIC Mining Discussion
Members can read and join the discussion
Log in to read comments from other miners. Create a free account if you would like to ask a question or share your experience.
Membership helps us protect the discussion from spam and keep answers useful.