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

> Access Tron blockchain data through the Portal API.

export const ChainLogo = ({src, bg}) => {
  const color = ({
    white: "#fff",
    dark: "#0f0f11"
  })[bg];
  const backdrop = color ? `background-color:${color};padding:0.14em;` : "";
  return <style>{`#page-title{display:flex;align-items:center;gap:0.4em}#page-title::before{content:"";flex:none;width:1.1em;height:1.1em;border-radius:25%;background-image:url(${JSON.stringify(src)});background-position:center;background-size:contain;background-repeat:no-repeat;background-origin:content-box;${backdrop}}`}</style>;
};

<ChainLogo src="https://cdn.subsquid.io/img/networks/tron.svg" />

<Info>Blocks, transactions, TVM event logs, and internal transactions. Tron is the leading network for USDT (TRC-20) settlement; because the TVM is EVM-compatible, TRC-20 events share the same topic signatures as ERC-20.</Info>

| Property | Value |
| - | - |
| Network ID | `tron-mainnet` |
| Real-time | Yes |
| Pricing tier | [Frontier](/en/portal/pricing#chain-tiers) |

## Endpoint

```
https://portal.sqd.dev/datasets/tron-mainnet
```

## Quick start

Stream USDT (TRC-20) transfers — the flagship Tron query:

```bash theme={"system"}
curl --compressed -X POST \
  'https://portal.sqd.dev/datasets/tron-mainnet/stream' \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "tron",
    "fromBlock": 79257136,
    "toBlock": 79257200,
    "fields": {
      "block": { "number": true, "timestamp": true },
      "log": { "address": true, "topics": true, "data": true }
    },
    "logs": [{
      "address": ["a614f803b6fd780986a42c78ec9c7f77e6ded13c"],
      "topic0": ["ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]
    }]
  }'
```

<Info>Account and contract addresses in filters (`owner`, `to`, `contract`, `caller`, `transferTo`) use the native 41-prefixed lowercase hex form. Log addresses and addresses encoded in topics use the 20-byte EVM-style hex form (no `41` prefix). Timestamps are Unix milliseconds; resource and value fields are decimal strings.</Info>

## Schema

<AccordionGroup>
  <Accordion title="Blocks">
    | Field | Type | Description |
    | - | - | - |
    | `number` | integer | Block number |
    | `hash` | string | Block ID (hash) |
    | `parentHash` | string | Parent block ID |
    | `txTrieRoot` | string | Root hash of the transaction Merkle trie |
    | `version` | integer | Block version |
    | `timestamp` | integer | Block timestamp (Unix ms) |
    | `witnessAddress` | string | Producing witness address (41-prefixed hex) |
    | `witnessSignature` | string | Witness signature over the header |
  </Accordion>

  <Accordion title="Transactions">
    | Field | Type | Description |
    | - | - | - |
    | `transactionIndex` | integer | Index in the block |
    | `hash` | string | Transaction hash (txID) |
    | `type` | string | Contract type (e.g. `TransferContract`, `TriggerSmartContract`) |
    | `parameter` | object | Decoded contract payload (`type_url` + `value`; addresses are 41-prefixed hex) |
    | `ret` | array | Result entries (e.g. `contractRet: SUCCESS`) |
    | `result` | string | Receipt result (e.g. `SUCCESS`) |
    | `signature` | array | Authorizing signatures |
    | `contractAddress` | string | Contract invoked or created (41-prefixed hex) |
    | `contractResult` | string | Hex-encoded smart-contract return value |
    | `feeLimit` | string | Max fee for execution (SUN) |
    | `fee` | string | Total fee charged (SUN) |
    | `energyUsageTotal` | string | Total energy consumed |
    | `energyFee` | string | Fee paid for energy (SUN) |
    | `netUsage` | string | Bandwidth (net) consumed |
    | `netFee` | string | Fee paid for bandwidth (SUN) |
    | `timestamp` | integer | Transaction timestamp (Unix ms) |
    | `expiration` | integer | Expiration time (Unix ms) |
  </Accordion>

  <Accordion title="Logs">
    | Field | Type | Description |
    | - | - | - |
    | `transactionIndex` | integer | Parent transaction index |
    | `logIndex` | integer | Index in the block |
    | `address` | string | Emitting contract (20-byte EVM-style hex, no `41` prefix) |
    | `data` | string | Non-indexed log data |
    | `topics` | array | Indexed topics (`topic0` is the event signature) |
  </Accordion>

  <Accordion title="Internal transactions">
    | Field | Type | Description |
    | - | - | - |
    | `transactionIndex` | integer | Parent transaction index |
    | `internalTransactionIndex` | integer | Index within the parent transaction |
    | `hash` | string | Internal transaction hash |
    | `callerAddress` | string | Initiator (41-prefixed hex) |
    | `transferToAddress` | string | Recipient (41-prefixed hex) |
    | `callValueInfo` | array | Transferred values (`callValue` in SUN, `tokenId` for TRC-10) |
    | `note` | string | Hex-encoded note (e.g. `63616c6c` for "call") |
    | `rejected` | boolean | Whether the internal transaction was rejected |
    | `extra` | string | Optional extra data |
  </Accordion>
</AccordionGroup>

## Reference

<CardGroup cols={2}>
  <Card title="API Reference" icon="code" href="/en/api/tron/stream">
    Field definitions and query syntax
  </Card>

  <Card title="Portal Migration" icon="arrow-right" href="/en/portal/migration">
    Migrate from v2 archives to Portal
  </Card>
</CardGroup>


## Related topics

- [Tron Examples](/en/sdk/squid-sdk/tron/examples-tutorials/examples-widget.md)
- [Tron quickstart](/en/sdk/pipes-sdk/tron/quickstart.md)
- [Indexing USDT on Tron](/en/sdk/squid-sdk/tron/examples-tutorials/indexing-usdt-transfers.md)
- [Block data for Tron](/en/sdk/squid-sdk/tron/reference/tron-processor/context-interfaces.md)
- [Tron Field Selection](/en/sdk/squid-sdk/tron/reference/tron-processor/field-selection.md)


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