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

# How Portal serves data

> How one Portal stream reads finalized history and recent blocks.

Portal can read different parts of one requested block range from two source
types:

* **Archival data** supplies finalized history. It can lag the chain head,
  meaning the latest available block, by several hours.
* **Recent data** can supply blocks closer to the chain head. These blocks may
  not be finalized and can be replaced after a chain reorganization.

Portal selects the source for each part of the range. The client uses the same
dataset URL when the source changes.

```mermaid theme={"system"}
flowchart LR
  archive["Archival data<br/>finalized history"] --> portal["Portal<br/>dataset endpoint"]
  recent["Recent data<br/>unfinalized chain head"] --> portal
  portal --> client["Client"]
```

For example, this endpoint can return historical blocks first and recent blocks
when the request reaches the chain head:

```http theme={"system"}
POST /datasets/ethereum-mainnet/stream
```

Changing sources does not change the JSON Lines response format. The source can
affect which blocks are currently available and whether a response includes
blocks near the chain head.

To choose between standard and finalized streams, see [Finalized and recent
data](/en/portal/introduction/finalized-and-recent-data). For the request loop
used to read a range, see [EVM stream
continuation](/en/portal/evm/api#stream-continuation) or [Solana stream
continuation](/en/portal/solana/api#stream-continuation).


## Related topics

- [How it works](/en/sdk/squid-sdk/evm/how-it-works.md)
- [FAQ](/en/sdk/squid-sdk/solana/faq.md)
- [Getting started with Portal](/en/portal/migration.md)
