---
title: "TRON RPC Endpoint Documentation"
description: "Use ERPC as your TRON RPC endpoint for HTTP JSON-RPC requests and the TRON HTTP API."
canonical: "https://erpc.global/en/doc/tron-rpc/general/"
locale: "en"
---

# TRON RPC Endpoint Documentation

## TRON RPC Endpoint Documentation

Use ERPC as your TRON RPC endpoint for HTTP JSON-RPC requests and the TRON HTTP API. TRON RPC is part of ERPC's RPC APIs within our Global Edge Blockchain Infrastructure, and the API key can be managed from the ERPC Web Dashboard.

You can use the same RPC key as Solana, Ethereum, and Avalanche.

Pass your API key in the `api-key` query parameter, or send it as `Authorization: Bearer <YOUR_API_KEY>`. When both are present, the query parameter is used.

### Endpoints

Send JSON-RPC 2.0 requests as HTTP POST to:

```text
https://edge.erpc.global/tron?api-key=<YOUR_API_KEY>
```

or the dedicated host:

```text
https://tron.erpc.global?api-key=<YOUR_API_KEY>
```

On the dedicated host, `/` and `/jsonrpc` reach the same JSON-RPC endpoint, and the TRON HTTP API is served under `/wallet/<name>` and `/walletsolidity/<name>`. On `edge.erpc.global`, the same paths follow the `/tron` prefix: `/tron`, `/tron/jsonrpc`, `/tron/wallet/<name>`, and `/tron/walletsolidity/<name>`. The TRON HTTP API POST body must be a JSON object. Other paths are answered with HTTP `400`.

### Examples

Here is an HTTP request example with the API key in the query parameter.

```bash
curl 'https://edge.erpc.global/tron?api-key=<YOUR_API_KEY>' --header 'Content-Type: application/json' --data '{
  "jsonrpc":"2.0","id":1,
  "method":"eth_blockNumber"
}'
```

Here is the same request with the API key in the `Authorization` header.

```bash
curl 'https://edge.erpc.global/tron' --header 'Content-Type: application/json' --header 'Authorization: Bearer <YOUR_API_KEY>' --data '{
  "jsonrpc":"2.0","id":1,
  "method":"eth_blockNumber"
}'
```

Here is a TRON HTTP API example.

```bash
curl 'https://edge.erpc.global/tron/wallet/getnowblock?api-key=<YOUR_API_KEY>' --header 'Content-Type: application/json' --data '{}'
```

You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en)

### Batch Requests

JSON-RPC batches of 1 to 100 calls per HTTP request are supported. Every call needs its own `id`, and `id` values must not repeat within a batch. Each call in a batch is metered as its own call. The request body can be up to 1 MiB. Batches are sent to `/jsonrpc`. A TRON HTTP API request carries one call and is metered as one call.

### Usage Metering

Usage is metered in tokens, and the token rate can differ by method. Each call in an HTTP batch is metered separately. Each TRON HTTP API request is metered as one call.

### Free Plan Limits

On the Free plan, your account can send one request per 10 seconds. The limit is counted per account, not per endpoint, so a request to another chain can also count toward it. A request sent sooner is answered with HTTP `429`, and the `retry-after` header gives the wait in seconds.

On the Free plan, a request that carries two or more JSON-RPC calls is answered with HTTP `429`, and none of its calls is sent: each call gets a JSON-RPC error with code `-32041`. Send these calls one at a time instead.

### Supported Methods

The endpoint serves these 38 methods. The `eth_*`, `net_*`, and `web3_*` methods are JSON-RPC calls sent to `/` or `/jsonrpc`. The `/wallet/*` and `/walletsolidity/*` entries are TRON HTTP API paths, called with a JSON object as the POST body.

- `eth_*` (19): `eth_blockNumber`, `eth_call`, `eth_chainId`, `eth_estimateGas`, `eth_gasPrice`, `eth_getBalance`, `eth_getBlockByHash`, `eth_getBlockByNumber`, `eth_getBlockReceipts`, `eth_getBlockTransactionCountByHash`, `eth_getBlockTransactionCountByNumber`, `eth_getCode`, `eth_getLogs`, `eth_getStorageAt`, `eth_getTransactionByBlockHashAndIndex`, `eth_getTransactionByBlockNumberAndIndex`, `eth_getTransactionByHash`, `eth_getTransactionReceipt`, `eth_syncing`
- `net_*` (3): `net_listening`, `net_peerCount`, `net_version`
- `web3_*` (2): `web3_clientVersion`, `web3_sha3`
- `/wallet/*` (9): `/wallet/broadcasthex`, `/wallet/broadcasttransaction`, `/wallet/estimateenergy`, `/wallet/getaccount`, `/wallet/getblockbynum`, `/wallet/getnowblock`, `/wallet/gettransactionbyid`, `/wallet/gettransactioninfobyid`, `/wallet/triggerconstantcontract`
- `/walletsolidity/*` (5): `/walletsolidity/getaccount`, `/walletsolidity/getblockbynum`, `/walletsolidity/getnowblock`, `/walletsolidity/gettransactionbyid`, `/walletsolidity/gettransactioninfobyid`

A method or path that is not listed is answered with HTTP `400`.

### Response Status Codes

| HTTP status | Meaning |
| --- | --- |
| 200 | Upstream JSON-RPC response. A JSON-RPC error is also returned with HTTP `200`: it keeps the request `id` and `error.code`, its `error.message` is `ERPC upstream error`, and `error.data` is not returned. |
| 400 | A method or path outside the Supported Methods list, an invalid JSON-RPC request, an empty batch or a batch over 100 calls, a duplicate `id` in a batch, or a body over 1 MiB. |
| 401 | Missing or invalid API key, or an IP or Origin restriction on the key is not met. |
| 405 | A request method other than POST. |
| 426 | A WebSocket Upgrade was requested. The endpoint is HTTP only. |
| 429 | Rate limited, including the Free plan limits above: more than one request per 10 seconds, or two or more calls in one request. If a `retry-after` header is present, wait that many seconds. |
| 502 | The upstream request could not be completed: a failed upstream response, a response over 8 MiB, or no answer within 30 seconds. A TRON HTTP API response that reports a failure is also answered with `502`. |
| 503 | The service is temporarily unavailable. |

### TRON RPC Methods and Documentation

For the full list of standard methods, parameters, and specifications, please refer to the official documentation.

[https://developers.tron.network/reference/full-node-api-overview](https://developers.tron.network/reference/full-node-api-overview)
