Practical overview
When it fits
Use it when you need a code-level example of an indexing pipeline from Solana swap data through decoding and PostgreSQL storage, or want to study a pattern for a possible adaptation to another Solana program.
Who it is for
- Developers learning to build blockchain data indexers with Subsquid SDK.
- Solana developers who want a concrete Orca swap indexing pattern to study or adapt.
Documented uses
- Index Orca USDC-SOL swap data from Solana.
- Store decoded swap records in PostgreSQL and query fields such as slot, token pair and amounts.
- Define typed Borsh codecs for Solana data structures.
Requirements & limits
- This is a developer project built with Subsquid SDK, not a hosted indexing app.
- The documented setup requires Node.js 20 or later and Docker.
- The README describes Solana support as beta.
- The shown dataset is Orca Exchange USDC-SOL swaps; indexing another program requires replacing the data source and matching decoding definitions.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Run the Orca swap indexer and query its records
Set up the example’s documented pipeline and inspect indexed swap rows in PostgreSQL.
Before you start
- Node.js version 20 or later
- Docker
Steps
Install project dependencies with npm i and compile with npx tsc.
Start the PostgreSQL service using docker compose up -d.
Apply the database migrations with npx squid-typeorm-migration apply.
Launch the indexer with node -r dotenv/config lib/main.js, then use the README’s psql query example to inspect exchange rows.
Expected outcome
The example is configured to index Orca USDC-SOL swaps into PostgreSQL, where the documented query selects slots, token pairs and amounts.
Guide limitations
- The README identifies Solana support as beta.
- The repository demonstrates Orca USDC-SOL swaps; it does not demonstrate adapting the indexer to another program.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 17 October 2026
- Original website title
- subsquid-labs/solana-example · Official homepage title · retained in its source language

