SonarX

Indexed StacksBlockchain Data

Stacks is a Bitcoin layer whose consensus is bound to Bitcoin: miners bid in BTC, the winning bid commits the next Stacks block, and contracts are Clarity source published on chain.

Stacks logo

How to query Stacks data with SonarX

Instant Data Share

Available today

Snowflake, and file dumps to your object storage

Query Stacks blockchain data with plain SQL from a live database inside your own Snowflake account, populated with the indexed chain dataset. There is no pipeline to build and no second copy to store. The same dataset ships as file dumps to your own object storage for lakes and warehouses that are not Snowflake.

  • Full history as a Snowflake data-share
  • File dumps to S3 or your own object storage
  • Real-time delivery, current to chain tip — on request

Used for:

  • Analytics teams already on Snowflake that want Stacks data beside their existing tables
  • Fund accounting and treasury reporting that reconciles against a fixed history
  • Cross-chain questions answered in one SQL statement instead of one query per chain
  • Loading Stacks history into BigQuery, Databricks, Redshift or a Spark lake
  • Replacing a self-hosted indexer and the engineering time that keeps it running
  • Serving one governed dataset to several desks without copying it per team

Curated Datasets

Available today

Purpose-built tables

Protocol-level Stacks datasets modelled for one job, so the decoding and the joins are done before the data reaches you.

  • Staking

Used for:

  • Position-level Stacks lending, swap and liquidity analysis
  • Reward, delegation and validator reporting without rebuilding the model
  • Token distribution, holder and payment-flow reporting
  • Risk and exposure work that needs protocol state, not raw logs
  • Skipping the decoding layer an in-house team would have to maintain
  • Extending an existing Stacks share with a modelled slice

Realtime API

Enabled on request

REST over the indexed dataset

Query indexed Stacks records over REST, reading the same dataset the share reads, with no warehouse in the path.

Used for:

  • Applications that need one answer rather than a table scan
  • Customer-facing screens where query latency is visible to a user
  • Services that have no data warehouse and do not want to run one
  • Prototyping against production data before committing to a share
  • Backend checks that run per request instead of per batch
  • Teams that want indexed Stacks data behind their own API layer

Stacks data: frequently asked questions

What is Stacks?

Stacks has produced mainnet blocks since 14 January 2021, when the network relaunched around Proof of Transfer. Consensus is bound to Bitcoin: miners compete by spending BTC, the winning bid carries a commitment to the next Stacks block inside a Bitcoin transaction, and the STX holders who lock tokens in the protocol’s stacking contract receive those BTC commitments as reward. Contracts are written in Clarity, an interpreted language published on chain as source, decidable by design, with no loops and the ability to read Bitcoin state directly. The native asset is STX, divisible into a million micro-units, and mainnet addresses are c32-encoded, beginning SP for a single signer and SM for a multisig. Reward cycles are counted in Bitcoin blocks rather than in Stacks blocks. The Nakamoto release of October 2024 changed block production so several blocks are made within one tenure, and a BTC-backed asset, sBTC, followed that December.

Stacks data on SonarX

SonarX indexes blocks and the Bitcoin heights they are anchored to, transactions, contract deployments with their Clarity source, contract calls and the events they emit, fungible and non-fungible asset movements, stacking operations, and account balances. The same normalized model covers every network SonarX indexes, so Stacks records and Bitcoin records can be joined in one query instead of assembled from two pipelines.

Full historical coverage is available today as a data-share or a file delivery. Real-time delivery is enabled on request.

How SonarX indexes Stacks

This chain has two clocks. A block’s place in history is fixed by the Bitcoin transaction that commits it, so ordering and finality depend on a height that lives on another network, and the indexed records carry both. Clarity removes one common problem and adds another: there is no ABI to resolve and no proxy indirection, because source is on chain, but call arguments and post-conditions are typed in the language’s own representation and have to be decoded from it rather than from an event signature. Stacking is the third piece, since the reward leg is a Bitcoin payment and appears nowhere in this chain’s transaction list.

What teams build with Stacks data

Yield accounting is the workload that defines this chain. Stating what a stacking participant earned means pairing the STX they locked, the cycle it covered and the reward address they nominated with the BTC that actually arrived, which is an accounting exercise across two ledgers rather than a balance read. Bridged-supply tracking is the second, following sBTC issuance and redemption against the Bitcoin held behind it. Contract-level analysis is the third and reads unlike its EVM equivalent, since Clarity source is on chain and asset movements are protocol-level events rather than log entries to decode. Miner economics is a fourth: BTC committed against STX won is a public series on both sides. DeFi analytics is the solution area this work sits in across chains, and Babylon is the usual comparison when the question is about earning on BTC.

Getting Stacks data from SonarX

Tell us the delivery target, how far back you need and how fresh it has to be, and the share is scoped against that. Stacks history is available now, and streaming is provisioned on request. Say whether Bitcoin records are in scope too, because the stacking and mining sides of this protocol are only half visible without them. The published coverage matrix for every network SonarX indexes lives in the data documentation, and the rest of the catalogue is at all indexed chains.

Is there a Stacks data API?

APIs over indexed Stacks data are enabled on request: the same indexed dataset the Snowflake share reads, served over REST once provisioned. Tell us the lookup pattern you need.

How do I get Stacks data into Snowflake?

SonarX provisions a data-share into your own Snowflake account. The share appears as a database you query with SQL, so there is no pipeline to build and no second copy to store, and it stays current as SonarX advances the indexing pipeline.

How far back does Stacks coverage go?

The historical data-share and file delivery cover the chain's recorded history from the January 2021 mainnet launch forward, and are available today. Block production changed shape in 2024, so blocks per Bitcoin anchor is not constant across the run and anything measured per block should be normalized by time. Real-time delivery keeps the same dataset current to chain tip and is enabled on request.

Is Stacks a rollup on Bitcoin?

No, and the distinction matters for the data. Stacks has its own consensus, Proof of Transfer, in which miners bid by spending BTC and each block commitment is recorded in a Bitcoin transaction. There is no fraud proof, no validity proof and no sequencer posting batches, so nothing here resembles the settlement records a rollup on Ethereum produces.

Does Stacks run EVM contracts?

No. Contracts are written in Clarity and published on chain as readable source rather than compiled to bytecode, which means there is no ABI to resolve and no bytecode to disassemble before a call can be understood. Clarity is also decidable and has no loops, and it can read Bitcoin state directly, so contract patterns ported from Solidity rarely translate line for line.

How do PoX reward cycles show up in Stacks data?

Half on each chain. Locking STX, the cycle it applies to and the reward address a participant nominates are all Stacks records. The BTC that miners commit, and that lockers ultimately receive, moves on Bitcoin, so a yield figure is only complete once Stacks locking records are joined to Bitcoin payments over the same cycle, and cycles are measured in Bitcoin blocks rather than in days.

Stacks logo

Get Stacks data from SonarX