Skip to main content
SOON integrates with SQD to provide powerful data indexing capabilities. This guide will walk you through using SQD’s Solana API to index and query data from SOON’s networks.

Available Networks

SOON’s data is accessible through these Subsquid archives:

Understanding SQD Architecture

SQD uses a distributed worker system to efficiently serve blockchain data. Each worker handles a specific range of blocks, and queries are routed to appropriate workers through a central gateway.

Core Concepts

  1. Router: The main entry point that directs queries to specific workers
  2. Workers: Distributed nodes that store and serve blockchain data
  3. Block Ranges: Each worker handles a specific range of blocks
  4. Archive Height: The latest block available in the archive

Query Flow

1. Check Archive Height

First, verify the current height of the archive:

2. Get Worker Assignment

Request a worker URL for your desired block range:

3. Query Data

Make your data request to the assigned worker:
Example Response:

Additional Resources

For more advanced SQD features, configurations, and detailed API references, check out the SQD documentation. The official docs cover topics like:
  • Advanced query patterns and optimizations
  • Custom data transformations
  • Real-time subscriptions and webhooks
  • Performance tuning and monitoring
  • Integration with popular frameworks

Query Options

Instruction Queries

Filter and fetch specific instruction data:

Transaction Queries

Get full transaction details:

Log Queries

Fetch program logs:

Best Practices

Handling Pagination

For large datasets, implement pagination:

Error Handling

Implement robust error handling:

Common Use Cases

Track Program Interactions

Monitor specific program activities:

Monitor Account Activity

Track account changes and interactions:

Rate Limits and Performance

  • Keep block ranges reasonable (suggested: ≤1000 blocks per query)
  • Cache worker URLs when querying consecutive blocks
  • Implement exponential backoff for retries
  • Consider using webhooks for real-time updates

TypeScript Support

SQD provides TypeScript typings for better developer experience: