Bitcoin
Bitcoin
Bitcoin
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
gettxout looks up a single unspent transaction output — a UTXO — in Bitcoin's UTXO set, the collection of spendable coins that the chain tracks instead of account balances. Given a transaction id and an output index, it returns the output's value (in BTC), its scriptPubKey, the number of confirmations, and whether it came from a coinbase; if that output has already been spent or never existed, it returns null. This is the core read for confirming a coin is still live before you spend it. Send the txid and vout index to https://bitcoin.therpc.io/YOUR_API_KEY.
value and scriptPubKey to drive coin selection and fee planning.include_mempool true to catch outputs already spent by an unconfirmed mempool transaction — those return null.| # | Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|---|
| 1 | txid | string | Ja | Transaction id holding the output. |
| 2 | n | number | Ja | Output (vout) index. |
| 3 | include_mempool | boolean | Nein | Include the mempool; if true, an output spent in mempool returns null.Standard: true |
| Typ | Beschreibung |
|---|---|
| object | null if spent or not found, else: bestblock, confirmations, value (BTC), scriptPubKey {asm, hex, type, address}, coinbase. |
| Code | Meldung | Ursache |
|---|---|---|
-8 | Invalid parameter | A parameter is out of range or the wrong shape — check verbosity levels, conf_target bounds, and required fields. |
getrawtransaction instead.value field here is denominated in BTC, unlike getblockstats, which returns amounts in satoshis — do not mix the two scales.