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

# Tron portal stream

> API reference for tronPortalStream().

`tronPortalStream()` reads Tron blocks from an SQD Portal dataset and applies one or more query outputs.

```ts theme={"system"}
import { tronPortalStream, tronQuery } from '@subsquid/pipes/tron'

const stream = tronPortalStream({
  id: 'tron-transfers',
  portal: 'https://portal.sqd.dev/datasets/tron-mainnet',
  outputs: tronQuery()
    .addFields({ block: { number: true }, transaction: { hash: true } })
    .addTransferTransactionRequest({
      range: { from: 'latest' },
      request: {},
    }),
})
```

## Options

| Option | Required | Description |
| - | - | - |
| `id` | Yes | Stable, non-empty pipe identifier. Targets use it as the default cursor key. |
| `portal` | Yes | Dataset URL or a `PortalClientOptions` object. |
| `outputs` | Yes | A `TronQueryBuilder`, transformer, or record of named outputs. |
| `cache` | No | Portal response cache. |
| `logger` | No | Pino-compatible logger, log level, `false`, or `null`. |
| `metrics` | No | Metrics server instance. |
| `profiler` | No | `boolean` or profiler span hooks. |
| `progress` | No | Progress callbacks and reporting interval. |

When `portal` is an object, it accepts `url`, `finalized`, `http`, `maxBytes`, `maxIdleTimeMs`, `maxWaitTimeMs`, and `headPollIntervalMs`.

```ts theme={"system"}
const finalizedStream = tronPortalStream({
  id: 'finalized-tron-transfers',
  portal: {
    url: 'https://portal.sqd.dev/datasets/tron-mainnet',
    finalized: true,
  },
  outputs: tronQuery().addRange({ from: 'latest' }),
})
```

Use `for await` to consume batches, `.pipe()` to add a whole-stream transformer, or `.pipeTo()` to connect a target.

See the [query builder reference](./query-builder) for typed fields and filters.


## Related topics

- [Portal stream](/en/sdk/pipes-sdk/solana/reference/basic-components/source.md)
- [EVM Portal stream](/en/sdk/squid-sdk/evm/reference/evm-stream.md)
- [Bitcoin portal stream](/en/sdk/pipes-sdk/bitcoin/reference/basic-components/source.md)
- [Hyperliquid fills portal stream](/en/sdk/pipes-sdk/hyperliquid/reference/basic-components/source.md)
- [Stream Blocks](/en/api/tron/stream.md)


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