Skip to main content
tronQuery() returns a typed TronQueryBuilder. Add the fields you need, then add one or more range-scoped requests.

Methods

addFields() narrows both the TypeScript output and the fields requested from Portal. The stream always adds block.number and block.hash for cursor handling.

Field groups

Request filters

Values inside a filter list are ORed. Different fields in one request are ANDed. Separate request clauses are combined across their ranges. The asset filter uses the bare-hex value stored by Portal, not the decimal TRC-10 token ID. Encode the ASCII digits before filtering. For example, token ID 1005157 is 31303035313537:

Ranges

Request ranges accept block numbers, formatted block-number strings, ISO dates, Date objects, and 'latest' for from.
Dates are resolved through the dataset’s timestamp endpoint before streaming. Resolution is at Portal chunk granularity, so a date is a coarse starting point rather than an exact timestamp boundary. Use numeric block bounds when the range must be precise. If from is 'latest', to must be a block number.

Tron-specific formats

  • Hex strings do not have a 0x prefix.
  • Transaction-level addresses use the 21-byte 41... form.
  • Log addresses use the 20-byte form without 41.
  • Large signed integer fields are returned as bigint.
See Handling Tron data for decoding examples.