blocks, with the totals for each block, and transactions, with each transactionβs inputs and outputs held on the same row.
The Tables section below says what each table holds and lists the columns.
Chains
| Chain | chain_id | blocks | transactions | events |
|---|---|---|---|---|
| Bitcoin | bitcoin | β | β | β |
| Dogecoin | dogecoin | β | β | β |
| Litecoin | litecoin | β | β | β |
| Zcash | zcash | β | β | β |
| Stacks | stacks | β | β | β |
Tables
The schemas below are read frombitcoin, and apply to the chains listed on the Bitcoin ecosystem overview. Stacks has a different shape and is documented on its own page.
These chains do not keep account balances. Instead, coins sit in outputs, each one a chunk of value locked to whoever can unlock it. A transaction spends whole outputs as its inputs and creates new outputs, and an output that has not been spent yet is an unspent transaction output, or UTXO. Someoneβs balance is the sum of the unspent outputs they can unlock.
transactions is split by day on block_timestamp, and blocks on timestamp. Filter on that column in every query: with a filter the query reads only the days you asked for, without one it reads the whole table.
- blocks
- transactions
A block is a batch of transactions a miner added to the chain.
blocks contains one row per block, with the fee, size and unspent-output figures for that block already worked out, so you rarely have to total them yourself.| Column | Type | Description |
|---|---|---|
timestamp | TIMESTAMP | The time the block was mined. Partition column. |
height | INT64 | The block height. |
block_hash | STRING | The hash of the block. |
block_subsidy | INT64 | The block subsidy paid to the miner. |
transaction_count | INT64 | The number of transactions in the block. |
total_fee | INT64 | The total fees paid in the block. |
total_out | INT64 | The total value of all outputs in the block. |
total_size | INT64 | The block size in bytes. |
total_weight | INT64 | The block weight. |
avg_fee | INT64 | The average transaction fee. |
avg_fee_rate | INT64 | The average fee rate. |
avg_transaction_size | INT64 | The average transaction size in bytes. |
max_fee | INT64 | The highest transaction fee in the block. |
max_fee_rate | INT64 | The highest fee rate in the block. |
max_transaction_size | INT64 | The largest transaction size in the block. |
median_fee | INT64 | The median transaction fee. |
median_time | INT64 | The median time of the previous blocks. |
median_transaction_size | INT64 | The median transaction size. |
min_fee | INT64 | The lowest transaction fee in the block. |
min_fee_rate | INT64 | The lowest fee rate in the block. |
min_transaction_size | INT64 | The smallest transaction size in the block. |
segwit_total_size | INT64 | The total size of segwit transactions. |
segwit_total_weight | INT64 | The total weight of segwit transactions. |
segwit_transaction_count | INT64 | The number of segwit transactions. |
utxo_increase | INT64 | The net change in the number of unspent outputs on the chain. |
utxo_size_increase | INT64 | The net change in the storage size of those unspent outputs. |
feerate_percentiles | ARRAY<INT64> | Fee rate percentiles for the block. |
ins | INT64 | The number of inputs in the block. |
outs | INT64 | The number of outputs in the block. |
- Daily fees and output
Sum daily fees and output value from block statistics over one week.
Exceptions
One chain here is not a plain UTXO chain. Stacks sits on top of Bitcoin and runs contracts of its own, written in a language called Clarity, so its tables carry extra columns for that and it has a third table,events, for the movements of assets and tokens and the notes its contracts write. The Stacks page describes them.