> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sqd.dev/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Reach for SQD when you need onchain data without running a node or an indexer: decoded EVM logs and transactions, Solana instructions, Bitcoin transactions, Substrate events and calls, or Hyperliquid fills, over any block range on 110+ networks.
> To query directly, POST to https://portal.sqd.dev/datasets/{dataset}/stream. The full API is described at https://docs.sqd.dev/openapi.json, and responses to the stream endpoints are JSON Lines.
> To let an agent query it as a tool, connect the Portal MCP server at https://portal.sqd.dev/mcp.
> Every page on this site is available as Markdown by appending .md to its URL.

# Solana

> Access Solana blockchain data through the Portal API.

> [!NOTE]
>
> Solana on Portal is available from genesis and uses slots, not blocks. The v2 archive (legacy) keeps only the most recent \~30 days of data (addressed by block, not slot).

| Property | Value |
| - | - |
| Network ID | `solana-mainnet` |
| Real-time | Yes |
| Pricing tier | [Core](https://docs.sqd.dev/en/portal/pricing.md#chain-tiers) |

## Endpoint

> [tab] Portal (recommended)
>
> ```
> https://portal.sqd.dev/datasets/solana-mainnet
> ```

> [tab] v2 archives (legacy)
>
> > [!WARNING]
> >
> > **API key required from May 19, 2026 12:00 UTC.** v2 archives will be sunset soon. [Migrate to Portal](https://docs.sqd.dev/en/portal/migration.md), or attach an API key to keep using v2: see [Accessing SQD data with API keys](https://docs.sqd.dev/en/data/api-keys.md). Cloud squids are not affected.
>
> ```
> https://v2.archive.subsquid.io/network/solana-mainnet
> ```

## Quick start

```bash theme={"system"}
curl --compressed -X POST \
  'https://portal.sqd.dev/datasets/solana-mainnet/stream' \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "solana",
    "fromBlock": 0,
    "toBlock": 100,
    "fields": {
      "block": { "number": true, "timestamp": true },
      "instruction": { "programId": true, "data": true }
    },
    "instructions": [{}]
  }'
```

For full SDK examples:

> [card] [Pipes SDK Quickstart](https://docs.sqd.dev/en/sdk/pipes-sdk/solana/quickstart.md)
>
> Streaming pipeline indexer

> [card] [Squid SDK Quickstart](https://docs.sqd.dev/en/sdk/squid-sdk/quickstart.md)
>
> GraphQL API indexer

## Schema

> [accordion] Transactions
>
> | Field | Type | Description |
> | - | - | - |
> | `transactionIndex` | integer | Transaction index in block |
> | `signatures` | array | Transaction signatures |
> | `accountKeys` | array | Account keys involved |
> | `recentBlockhash` | string | Recent blockhash used |
> | `fee` | integer | Transaction fee |
> | `err` | object | Error information, or null if the transaction succeeded |

> [accordion] Instructions
>
> | Field | Type | Description |
> | - | - | - |
> | `transactionIndex` | integer | Parent transaction index |
> | `instructionAddress` | array | Instruction path (position in the instruction tree) |
> | `programId` | string | Program ID |
> | `accounts` | array | Accounts involved |
> | `data` | string | Instruction data |

> [accordion] Balances
>
> | Field | Type | Description |
> | - | - | - |
> | `account` | string | Account address |
> | `pre` | bigint | Balance before transaction |
> | `post` | bigint | Balance after transaction |

> [accordion] Token Balances
>
> | Field | Type | Description |
> | - | - | - |
> | `account` | string | Token account |
> | `postMint` | string | Token mint address |
> | `postOwner` | string | Owner address |
> | `preAmount` | bigint | Balance before transaction |
> | `postAmount` | bigint | Balance after transaction |
> | `postDecimals` | integer | Token decimals |

> [accordion] Rewards
>
> | Field | Type | Description |
> | - | - | - |
> | `pubkey` | string | Recipient account |
> | `lamports` | bigint | Reward amount in lamports |
> | `rewardType` | string | Type of reward |
> | `commission` | integer | Commission percentage |

> [accordion] Logs
>
> | Field | Type | Description |
> | - | - | - |
> | `transactionIndex` | integer | Parent transaction index |
> | `instructionAddress` | array | Instruction path |
> | `programId` | string | Program that emitted the log |
> | `kind` | string | Log kind |
> | `message` | string | Log message |

## Reference

> [card] [API Reference](https://docs.sqd.dev/en/portal/solana/api.md)
>
> Field definitions and query syntax

> [card] [Portal Migration](https://docs.sqd.dev/en/portal/migration.md)
>
> Migrate from v2 archives to Portal


## Related topics

- [Solana typegen](https://docs.sqd.dev/en/sdk/squid-sdk/solana/reference/solana-typegen.md)
- [Solana Networks](https://docs.sqd.dev/en/data/solana.md)
- [Solana Devnet](https://docs.sqd.dev/en/data/solana/solana-devnet.md)
- [Solana Examples](https://docs.sqd.dev/en/sdk/squid-sdk/solana/examples-tutorials/examples-widget.md)
- [Portal for Solana](https://docs.sqd.dev/en/cloud/resources/migrate-to-portal-on-solana.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.