> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tronrental.com/llms.txt
> Use this file to discover all available pages before exploring further.

# History and Events

> Address and contract history, TRC-20 transfers, and transaction and block events under /v1

## What it is

On the same host and with the same key as the node methods, Node API answers the history and events
paths of the common TRON `/v1` format. A client written for that format works after you change the
host and the key.

| Path | What it returns |
| - | - |
| `GET /v1/accounts/{address}/transactions/trc20` | TRC-20 transfers from and to an address |
| `GET /v1/accounts/{address}/transactions` | Transactions of an address: the ones it sent and the ones sent to it |
| `GET /v1/contracts/{address}/transactions` | Transactions sent to a contract — its calls |
| `GET /v1/transactions/{id}/events` | Events (logs) of a transaction |
| `GET /v1/blocks/{number}/events` | Events of a block |
| `GET /v1/blocks/latest/events` | Events of the latest block |

* Only `GET`; other HTTP methods get `405 method_not_allowed`.
* `{address}` is base58 (`T…`) or hex (`41…`, `0x41…`).
* The key goes in the `TRON-PRO-API-KEY` header or in the path, as for every method:
  `https://node.tronrental.com/<YOUR_KEY>/v1/accounts/{address}/transactions`.
* Other `/v1/...` paths — for example `/v1/accounts/{address}` or `/v1/contracts/{address}/events` —
  are not served and get `404 not_found`.
* `GET /healthcheck` answers `200 {"ok": true}` without a key: TronWeb's `isConnected()` calls it.

```bash theme={null}
curl -s 'https://node.tronrental.com/v1/accounts/TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t/transactions/trc20?limit=20&only_to=true' \
  -H 'TRON-PRO-API-KEY: <YOUR_KEY>' --compressed
```

## How far back

| Data | Available from |
| - | - |
| Outgoing transactions and outgoing TRC-20 transfers of an address | The start of the network |
| Incoming transactions of an address, calls of a contract | 2026-05-01 00:00 UTC |
| Incoming TRC-20 transfers of an address | 2026-06-01 00:00 UTC |
| Pages of `…/transactions` with a contract call that has internal transactions | 2026-10-08 07:32:42 UTC (block 86,924,000) |
| Events of a transaction or block | Any block |

History newer than each date is served as usual; the last page above the date still carries a
`fingerprint`, and the call that would read below it gets a `400` saying what to pass:

```json theme={null}
{
  "success": false,
  "error": "incoming transfers before 2026-06-01 are not available yet: pass only_from=true, or min_timestamp >= 1780272000000",
  "statusCode": 400
}
```

* With `only_from=true` an address's outgoing side is read to the start of the network.
* Contract calls before 2026-10-08 that may have moved TRX or tokens on (internal transactions) are
  refused rather than shown without them. Calls of the USDT contract are always answered: it calls no
  other contract.

## Parameters

History — the three `…/transactions` paths:

| Parameter | Meaning |
| - | - |
| `limit` | Items per page, 1–200. Default 20 |
| `fingerprint` | Where the next page starts: `meta.fingerprint` of the previous page |
| `order_by` | `block_timestamp,desc` (default, newest first) or `block_timestamp,asc` |
| `min_timestamp`, `max_timestamp` | Bounds in milliseconds. `0` means no bound |
| `only_confirmed`, `only_unconfirmed` | `true` — only solidified blocks, or only blocks above them. Not both |
| `only_to`, `only_from` | Accounts only: incoming only, or outgoing only |
| `contract_address` | TRC-20 history only: transfers of one token |

`search_internal` is accepted and has no effect. A contract's `…/transactions` has one side — what was
sent to it — so `only_to` and `only_from` do not apply there.

Events: `limit` (1–200, default 20), `fingerprint`, `only_confirmed` or `only_unconfirmed`.

## Pagination

A page with more after it carries `meta.fingerprint` and `meta.links.next` — the same URL with the new
`fingerprint` (and your key, if you put it in the path). The last page has neither.

One history call reads a bounded part of the index. A page can therefore come back shorter than
`limit`, or even empty, and still carry `next`. Keep following `next` until it is gone; an empty page
with `next` is not the end.

```python theme={null}
import requests

URL = "https://node.tronrental.com/v1/accounts/{}/transactions/trc20"
HEADERS = {"TRON-PRO-API-KEY": "<YOUR_KEY>"}

def incoming_usdt(address, since_ms):
    url = URL.format(address)
    params = {"only_to": "true", "min_timestamp": since_ms, "limit": 200,
              "contract_address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"}
    while url:
        page = requests.get(url, params=params, headers=HEADERS).json()
        yield from page["data"]
        url, params = page.get("meta", {}).get("links", {}).get("next"), None
```

## Answers

### TRC-20 transfers

```json theme={null}
{
  "data": [
    {
      "transaction_id": "8f0c…",
      "token_info": {
        "symbol": "USDT",
        "address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
        "decimals": 6,
        "name": "Tether USD"
      },
      "block_timestamp": 1796149026000,
      "from": "TXa…",
      "to": "TQb…",
      "type": "Transfer",
      "value": "1500000"
    }
  ],
  "success": true,
  "meta": {
    "at": 1796282340623,
    "page_size": 1,
    "fingerprint": "…",
    "links": { "next": "https://node.tronrental.com/v1/accounts/…/transactions/trc20?fingerprint=…" }
  }
}
```

* Only `Transfer` events; `Approval` is not in this history.
* `value` is a string in the token's smallest units; divide by `10^decimals`.
* `block_timestamp` and `meta.at` are in milliseconds. Addresses are base58.

### Transactions

Each item is the transaction as the node stores it — `txID`, `raw_data`, `raw_data_hex`,
`signature`, `ret` — plus fields from its receipt: `blockNumber`, `block_timestamp` (ms),
`net_usage`, `net_fee`, `energy_usage`, `energy_fee`, `energy_usage_total`, `internal_transactions`,
and the fee in `ret[0].fee`. Addresses inside `raw_data` are hex, as the node gives them.

* Failed transactions (`REVERT`, `OUT_OF_ENERGY`) are included.
* In `/v1/contracts/{address}/transactions`, `blockNumber` and `block_timestamp` are strings and
  `ret[0]` has no `fee`, as clients of this format expect.
* An internal transaction: `internal_tx_id`, `from_address`, `to_address`, and
  `data` with `note`, `rejected` and `call_value` (TRX under `_`, a TRC-10 token under its id; present
  only when a value moved).

### Events

```json theme={null}
{
  "block_number": 78000000,
  "block_timestamp": 1764000000000,
  "caller_contract_address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
  "contract_address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
  "event_index": 0,
  "event_name": "Transfer",
  "event": "Transfer(address indexed from, address indexed to, uint256 value)",
  "result": { "0": "0x…", "1": "0x…", "2": "1500000", "from": "0x…", "to": "0x…", "value": "1500000" },
  "result_type": { "from": "address", "to": "address", "value": "uint256" },
  "transaction_id": "8f0c…"
}
```

* Newest first: the last transaction of the block, and within it the last log.
* `_unconfirmed: true` marks an event above the solidified head.
* An unknown transaction, a block without events, or a block not produced yet: `200` with an empty
  `data`.
* Logs are decoded with the contract's ABI from the chain. For a contract without one, common events
  (`Transfer`, `Approval`, `Swap`, `Sync` and others) are decoded by their standard signature; a log
  that cannot be named comes with `event_name: ""` and an empty `result`.

With TronWeb, set only `fullHost` and the key: its event methods call these paths on the same host.

```javascript theme={null}
const { TronWeb } = require('tronweb');

const tronWeb = new TronWeb({
  fullHost: 'https://node.tronrental.com',
  headers: { 'TRON-PRO-API-KEY': '<YOUR_KEY>' },
});

const events = await tronWeb.event.getEventsByTransactionID(txId);
```

## Cost and limits

| Call | WU | Per-second limit |
| - | - | - |
| TRC-20 history | 1 WU per 100 MB of index read, at least the size of the answer — usually a few WU, at most 20 | Read (WU/s) |
| Transactions of an address or contract | The index read plus, for each transaction, what `gettransactionbyid` and `gettransactioninfobyid` would cost you — a page of 20 is about 40 WU and up | Read (WU/s) |
| Events of a transaction | As `gettransactioninfobyid` — by the size of the receipt | Read (WU/s) |
| Events of a block | As `gettransactioninfobyblocknum`: a fresh block (within 20 of the head) 2 WU, an older one by size | Block calls |

The `X-Node-API-WU` header tells the cost of each call. A `400` for bad parameters costs at most 1 WU.
See [Quota units](https://docs.tronrental.com/node-api/quota-units.md).

## Errors

| Status | Body or `code` | Meaning | What to do |
| - | - | - | - |
| `400` | `{"success": false, "error": "…", "statusCode": 400}` | A bad parameter, a `fingerprint` from another query, or a date the history does not reach yet | Read `error` and fix the request |
| `503` | `index_unavailable` | The index is busy, catching up with the chain, or the address is too busy for one call (narrow `min_timestamp`/`max_timestamp`) | Retry in a few seconds |
| `503` | `node_behind` | Transactions: the node has not reached a block of the page yet | Retry |
| `503` | `degraded` | History and events of older blocks are not served in degraded mode | Retry later |
| `502` | `node_error` | The node did not answer while the page was being built | Retry |

Every other refusal — the key, the plan, the limits — is the same as for the node methods: see
[Limits and errors](https://docs.tronrental.com/node-api/errors.md).


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