How to retrieve transaction amount via command line? Seems gettransaction
return hash which contains only some inputs outputs info without any amount.
gettransaction('TXID')
deserialize('Serialized Hex')
Example output for second command:
{
"inputs": [
{
"coinbase": false,
"nsequence": 4294967293,
"prevout_hash": "c12ed68e512aa68dbf88878902efba20446024b645f5254f4b9411db2c6e684c",
"prevout_n": 0,
"scriptSig": "",
"witness": "0247304402205c37067a6677463dc61251645de37e4f80c41dfd09350e80e1f603b756c5a5e20220164a6890be2d0495b1899616712d86fcad64e154ceadf472bad73a9c0f76941e0121020d46ac63ff392d6536d14016e35bfa2ddcb8a21dfa792cf24a55871435cd03e4"
}
],
"locktime": 1807798,
"outputs": [
{
"address": "2MsceuMFj99x82UmTBgsXN6iiiphtWipGoC",
"scriptpubkey": "a914040d887b939576a6718c2da094999075f59d54fc87",
"value_sats": 1000000
},
{
"address": "tb1qh7ncmmc3flp6pfcsqzvdnp9el87l28d87d0tz9",
"scriptpubkey": "0014bfa78def114fc3a0a7100098d984b9f9fdf51da7",
"value_sats": 1699000
}
],
"version": 2
}
... | electrum deserialize -
– RedGrittyBrick Aug 26 '20 at 14:20