April 2020
Intermediate to advanced
244 pages
7h 20m
English
In the following example, we will print the transaction output associated with a specific transaction, identified by a specific transaction ID:
from bloxplorer import bitcoin_testnet_explorer transaction_id = '6d0139c3d0f529dda57496f1eabf0b32c9296c93b49b7a4965fa5ad91be4f216' transaction = bitcoin_testnet_explorer.tx.get(transaction_id) print("Transaction output: ", transaction.data['vout'])
Running the script returns the following output:
{ 'scriptpubkey': 'a914e0725ef08b0046fd2df3c58d5fefc5580e1f59de87', 'scriptpubkey_asm': 'OP_HASH160 OP_PUSHBYTES_20 e0725ef08b0046fd2df3c58d5fefc5580e1f59de OP_EQUAL', 'scriptpubkey_type': 'p2sh', 'scriptpubkey_address': '2NDhzMt2D9ZxXapbuq567WGeWP7NuDN81cg', 'value': 39218600 }
Read now
Unlock full access