Skip to main content

Overview

Goldsky provides curated Bitcoin datasets for blocks and transactions, making it easy to build pipelines for Bitcoin blockchain analysis.

Quick Start

Get started with Bitcoin data - choose the dataset that fits your use case: For block data:
sources:
  bitcoin_blocks:
    type: dataset
    dataset_name: bitcoin.raw.blocks
    version: 1.0.0
    start_at: latest
For transaction data:
sources:
  bitcoin_transactions:
    type: dataset
    dataset_name: bitcoin.raw.transactions
    version: 1.0.0
    start_at: latest
Available datasets:
  • bitcoin.raw.blocks - Block data including hashes, transaction count, difficulty, and size
  • bitcoin.raw.transactions - Transaction data including inputs, outputs, and values

Guide: Track Large Bitcoin Transactions

Monitor transactions with significant BTC movement:
name: bitcoin-whale-tracker
resource_size: s

sources:
  transactions:
    type: dataset
    dataset_name: bitcoin.raw.transactions
    version: 1.0.0
    start_at: latest

transforms:
  # Filter to large transactions (>1 BTC = 100,000,000 satoshis)
  large_transactions:
    type: sql
    primary_key: txid
    sql: |
      SELECT
        txid,
        block_hash,
        block_height,
        block_timestamp,
        total_input_value,
        total_output_value,
        fee,
        _gs_op
      FROM transactions
      WHERE total_output_value > 100000000

sinks:
  postgres_whales:
    type: postgres
    from: large_transactions
    schema: public
    table: bitcoin_whale_transactions
    secret_name: MY_POSTGRES
    primary_key: txid

Guide: Monitor Block Production

Track Bitcoin block metadata for network analysis:
name: bitcoin-block-monitor
resource_size: s

sources:
  blocks:
    type: dataset
    dataset_name: bitcoin.raw.blocks
    version: 1.0.0
    start_at: latest

transforms:
  block_stats:
    type: sql
    primary_key: hash
    sql: |
      SELECT
        hash,
        height,
        timestamp,
        tx_count,
        size,
        weight,
        difficulty,
        _gs_op
      FROM blocks

sinks:
  postgres_blocks:
    type: postgres
    from: block_stats
    schema: public
    table: bitcoin_blocks
    secret_name: MY_POSTGRES
    primary_key: hash

Guide: Analyze Transaction Fees

Track Bitcoin transaction fees over time:
name: bitcoin-fee-tracker
resource_size: s

sources:
  transactions:
    type: dataset
    dataset_name: bitcoin.raw.transactions
    version: 1.0.0
    start_at: latest

transforms:
  fee_analysis:
    type: sql
    primary_key: txid
    sql: |
      SELECT
        txid,
        block_height,
        block_timestamp,
        fee,
        size,
        CAST(fee AS DOUBLE) / CAST(size AS DOUBLE) as fee_per_byte,
        _gs_op
      FROM transactions
      WHERE fee > 0

sinks:
  postgres_fees:
    type: postgres
    from: fee_analysis
    schema: public
    table: bitcoin_fee_analysis
    secret_name: MY_POSTGRES
    primary_key: txid

Performance Tips

Use the most specific dataset for your use case:
  • Block-level analysis? Use bitcoin.raw.blocks
  • Transaction analysis? Use bitcoin.raw.transactions
Apply filters in SQL as early as possible to reduce data volume:
transforms:
  filtered:
    type: sql
    sql: SELECT * FROM transactions WHERE total_output_value > 100000000
Bitcoin has moderate throughput compared to high-volume chains. Start with small or medium:
resource_size: s  # or m for historical backfills