Skip to main content
Version: FireSquid
Get started
Subsquid is a blockchain indexing SDK and a distributed data lake optimized for serving large volumes of historical on-chain data from over 100+ chains.

The SDK offers a highly customizable Extract-Transform-Load-Query stack for indexing events, transactions, traces and state diffs.

Indexers built with the SDK (squids) are suitable for both real-time streaming and batch data processing and don't require a high-throughput RPC endpoint to run. As the data is ingested primarily from the data lake, a typical indexing speed is up to and beyond 50,000 blocks per second.
Examples of data requests

Transactions to and from a set of 1.4M wallets

.setDataSource({ archive: lookupArchive('binance') })
// ...
if (wallets.has(txn.from)) { /* ... */ }
if (wallets.has( { /* ... */ }

USDC Transfers in real time

   topic0: [],

Real time data is fetched from a chain node RPC; a Database object with hot blocks support is required to store it (see this page for more details).

All Transfers to vitalik.eth

   topic0: [],
   topic2: [VITALIK_ETH_TOPIC],

All Transfer(address,address,uint256) will be captured, including ERC20 and ERC721 transfers and possibly events with the same signature made with other protocols.

Calls to AAVE Pool and all events they caused

   logs: true,

Including events emitted by other contracts. Get ETH value involved in each call.

All Mint events emitted anywhere on a chain

   topic0: [],
   transaction: true,

DEX trading pairs and Swap events

   topic0: [PAIR_CREATED_TOPIC],
.addLog({ topic0: [SWAP_TOPIC] })

All calls to contract functions, including internal

   type: ['call'],
   callTo: [BAYC_ADDRESS],
.addStateDiff({ address: [BAYC_ADDRESS] })

Call traces will expose any internal calls to BAYC by other contracts. Also retrieves all changes to contract storage state.

All NFT contract deployments and Transfers chain-wide

   type: ['create'],
.addLog({ topic0: [] })

All contract creations are scraped; they will be checked for ERC721 compliance in the batch handler. All ERC721 Transfer events are scraped so that they can be filtered and binned by the contract in the batch handler.


What is a squid?

A squid is a project that extracts and transforms on-chain data in order to present it as a GraphQL API. Squids are developed using the Subsquid SDK, which provides extensive tooling to define data schemas, data transfomation rules, and the shape of the resulting API.

Why should I use Subsquid?

The latency of serving app data with a squid is much lower compared to direct node access via gRPC. This means significantly better UX for your application. The flexibility of the Subsquid SDK gives developers the full power to access and manipulate historical on-chain data and build complex and responsive dApps with familiar tools. Finally, by using the Aquarium cloud service, developers no longer have to care about indexing infrastructure maintenance costs and hassle.

How much does Subsquid cost?

The Squid SDK is open source. Data access to the Subsquid Network (and Archives) is free as it is incentivized by the networks, thus for self-hosted or locally ran squids Subsquid services are free of charge. For managed squids we offer free and Premium plans. See Aquarium Pricing.

What is an Archive?

Archives ingest and store the full log of historical on-chain data in a normalized format. Designed to be data sources for squids, Archives serve on-chain data as an API that supports batching over multiple blocks.

What is Aquarium?

Aquarium is a cloud service for hosting squids. This service is managed by Subsquid Labs.  Subsquid's CLI provides a convenient way to  deploy squids to the Aquarium and manage them once they are hosted.

More questions? Check out our technical community