Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.goldsky.com/llms.txt

Use this file to discover all available pages before exploring further.

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 hash, height (number), size, weight, merkle root, timestamp, and transaction count
  • bitcoin.raw.transactions - Transaction data including inputs, outputs (as JSON strings), input/output counts and values, fee, and block metadata

Schema Reference

bitcoin.raw.blocks - primary key id
FieldTypeDescription
idSTRINGUnique row id (primary key)
hashSTRINGBlock hash
sizeLONGBlock size in bytes
stripped_sizeLONGBlock size without witness data
weightLONGBlock weight
numberLONGBlock height
versionLONGBlock version
merkle_rootSTRINGMerkle root hash
timestampLONGBlock time (Unix seconds)
nonceSTRINGBlock nonce (hex)
bitsSTRINGDifficulty target in compact form
coinbase_paramSTRINGCoinbase parameter
transaction_countLONGNumber of transactions in the block
bitcoin.raw.transactions - primary key id
FieldTypeDescription
idSTRINGUnique row id (primary key)
hashSTRINGTransaction hash (txid)
sizeLONGTransaction size in bytes
virtual_sizeLONGVirtual size (vsize)
versionLONGTransaction version
lock_timeLONGLock time
block_numberLONGBlock height containing this tx
block_hashSTRINGHash of the containing block
block_timestampLONGBlock time (Unix seconds)
is_coinbaseBOOLEANWhether this is a coinbase tx
indexLONGIndex within the block
inputsSTRINGJSON-encoded array of inputs
outputsSTRINGJSON-encoded array of outputs
input_countLONGNumber of inputs
output_countLONGNumber of outputs
input_valueLONGTotal input value in satoshis
output_valueLONGTotal output value in satoshis
feeLONGTransaction fee in satoshis
inputs and outputs are JSON-encoded strings. Use json_extract or your sink’s JSON functions to parse them downstream.

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: id
    sql: |
      SELECT
        id,
        hash,
        block_hash,
        block_number,
        block_timestamp,
        input_value,
        output_value,
        fee,
        _gs_op
      FROM transactions
      WHERE output_value > 100000000

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

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: id
    sql: |
      SELECT
        id,
        hash,
        number,
        timestamp,
        transaction_count,
        size,
        stripped_size,
        weight,
        merkle_root,
        _gs_op
      FROM blocks

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

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: id
    sql: |
      SELECT
        id,
        hash,
        block_number,
        block_timestamp,
        fee,
        size,
        virtual_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: id

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 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