|
| 1 | +# Transactions |
| 2 | + |
| 3 | +## `bitcoin.transactions` |
| 4 | + |
| 5 | +|Column name |Type |Description | |
| 6 | +|-------------------|------|-----------------------------------------------------------------------------------------------------------------------------------------| |
| 7 | +|block_time |timestamp|The block time | |
| 8 | +|block_date |date |The block date | |
| 9 | +|block_height |bigint|The block number | |
| 10 | +|block_hash |string|The hash of the block that contains this transaction | |
| 11 | +|index |int |The number of the transaction in the block. | |
| 12 | +|id |string|The id (hash) of this transaction | |
| 13 | +|input_value |double|Total value of inputs in the transaction | |
| 14 | +|output_value |double|Total value of outputs in the transaction | |
| 15 | +|fee |double|The transaction fee paid to the miner. = output_value - input_value | |
| 16 | +|input_count |int |The number of inputs in the transaction | |
| 17 | +|output_count |int |The number of outputs in the transaction | |
| 18 | +|size |bigint|The size of this transaction in bytes | |
| 19 | +|virtual_size |bigint|The virtual transaction size (differs from size for witness transactions) | |
| 20 | +|is_coinbase |boolean|The transaction is a coinbase transaction, which is the first transaction in a block | |
| 21 | +|coinbase |string|If the transaction is a coinbase transaction, contains the coinbase data. Otherwise, null. | |
| 22 | +|input |struct|Transaction inputs | |
| 23 | +|output |struct|Transaction outputs. See outputs table. | |
| 24 | +|lock_time |bigint|Earliest time that miners can include the transaction in their hashing of the Merkle root to attach it in the latest block of the blockchain| |
| 25 | +|hex |string|The transaction encoded as hexadecimal | |
| 26 | + |
| 27 | +### Struct definitions |
| 28 | + |
| 29 | +Within several of these columns is a data type of STRUCT which allows for representing nested hierarchical data and has key-value pairs. It's similar to a dictionary in python and can be used to group fields together to make them more accessible. |
| 30 | + |
| 31 | +**input** |
| 32 | + |
| 33 | +| Field | Data type | Description | |
| 34 | +|-------------------|------|-----------------------------------------------------------------------------------------------------------------------------------------| |
| 35 | +|value |double|The number of Satoshis attached to this output | |
| 36 | +|height |bigint|The height of the output | |
| 37 | +|tx_id |string|The transaction id of the output that is here used as input | |
| 38 | +|output_number|bigint|The number (index) of the output in transaction `tx_id`'s outputs | |
| 39 | +|coinbase |string|The data specified in this transaction, if it was a coinbase transaction | |
| 40 | +|sequence |bigint|Sequence number | |
| 41 | +|witness_data |array<string>|Array of hex encoded witness data | |
| 42 | +|script_signature|struct|The script signature | |
| 43 | +|script_pub_key|struct|The script public key | |
| 44 | + |
| 45 | +*** |
| 46 | + |
| 47 | +**input.script_signature** |
| 48 | +| Field | Data type | Description | |
| 49 | +|---------|-----------|--------------| |
| 50 | +|hex|string|The transaction's script operations, in hex | |
| 51 | +|asm|string|The transaction's script operations, in symbolic representation | |
| 52 | + |
| 53 | +*** |
| 54 | + |
| 55 | +**input.script_pub_key** |
| 56 | + |
| 57 | +| Field | Data type | Description | |
| 58 | +|---------|-----------|--------------| |
| 59 | +|asm|string|The transaction's script operations, in symbolic representation | |
| 60 | +|desc|string|The transaction's script operations, in symbolic representation | |
| 61 | +|address|string|The transaction's script operations, in symbolic representation | |
| 62 | +|hex|string|The transaction's script operations, in hex | |
| 63 | +|type|string|The address type of the output | |
| 64 | + |
| 65 | +*** |
| 66 | + |
| 67 | +**output** |
| 68 | + |
| 69 | +| Field | Data type | Description | |
| 70 | +|-------------------|------|-----------------------------------------------------------------------------------------------------------------------------------------| |
| 71 | +|index |bigint|0-indexed number of an output within a transaction used by a later transaction to refer to that specific output | |
| 72 | +|value |double|The number of Satoshis attached to this output | |
| 73 | +|script_pub_key|struct|The public key | |
| 74 | + |
| 75 | +*** |
| 76 | + |
| 77 | +**output.script_pub_key** |
| 78 | +| Field | Data type | Description | |
| 79 | +| ------- | --------- | -------------| |
| 80 | +|asm|string|The transaction's script operations, in symbolic representation | |
| 81 | +|hex|string|The transaction's script operations, in hex | |
| 82 | +|address|string|The address the BTC came from | |
| 83 | +|type|string|The address type of the output | |
0 commit comments