> ## 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 120+ 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.

# Finalized and recent data

> Choose between Portal streams with recent or finalized blocks.

Portal treats finalized and recent blocks differently:

* A **finalized block** has met the finality rule used by the dataset.
* A **recent block** may not have met that rule. A chain reorganization can
  replace it and any later blocks built on it.

Portal provides two stream operations:

| Operation | Data returned | Reorg handling |
| - | - | - |
| `POST /datasets/{dataset}/stream` | Finalized history and, when available, recent unfinalized blocks | Send `parentBlockHash` when resuming and handle HTTP 409 |
| `POST /datasets/{dataset}/finalized-stream` | Finalized blocks only | The stream does not include unfinalized blocks |

Use `/stream` when the client needs blocks close to the chain head. Because
those blocks can change, clients that continue a standard stream must account
for chain reorganizations.

Use `/finalized-stream` when the client does not need the latest unfinalized
blocks. It returns less recent data because finalization happens after a block
is first produced.

The head operations report the latest block visible through each view:

```http theme={"system"}
GET /datasets/{dataset}/head
GET /datasets/{dataset}/finalized-head
```

For the meaning of a reorganization and links to the chain-specific recovery
procedures, continue with [Blockchain
forks](/en/portal/introduction/blockchain-forks). The complete endpoint details
are in the [EVM API guide](/en/portal/evm/api#core-endpoints) and [Solana API
guide](/en/portal/solana/api#core-endpoints).


## Related topics

- [How Portal serves data](/en/portal/introduction/how-portal-serves-data.md)
- [How real-time data is served](/en/network/introduction/how-real-time-data-is-served.md)
- [Portal API introduction](/en/portal/introduction/portal-api.md)
- [Developer resources](/developers.md)
- [Finalized Dataset Head](/en/api/substrate/finalized-head.md)


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