Skip to Content
TRON HTTP API

TRON HTTP API

TRON Mainnet and Nile expose a native HTTP API in addition to JSON-RPC. Other chains and networks do not have a generic HTTP API entry point.

Accelerator applies only to selected JSON-RPC methods, not to the TRON HTTP API. Native HTTP API calls always require a matching http_api Endpoint and route.

The dashboard currently configures JSON-RPC routes only. Before using TRON HTTP API, confirm that a platform administrator has created an http_api Endpoint and attached it to the target Gateway HTTP API route. Otherwise, calls return 503 No available Endpoint.

URL and authentication

Mainnet uses tron-httpapi.<gateway-domain> and Nile uses tron-testnet-httpapi.<gateway-domain>. Prefer the complete URL shown in the dashboard.

Path Key:

https://tron-httpapi.<gateway-domain>/<app_api_key>/wallet/getnowblock

Bearer authentication omits the Key from the path:

curl -X POST 'https://tron-httpapi.<gateway-domain>/wallet/getnowblock' \ -H 'Authorization: Bearer <app_api_key>' \ -H 'Content-Type: application/json' \ --data '{}'

If both credentials are supplied, they must match. Do not send the Gateway key in query parameters, cookies, or other headers.

Requests

The Gateway accepts GET and POST only, for these path families:

Path familyPurpose
/wallet/*FullNode HTTP API
/walletsolidity/*SolidityNode HTTP API
/v1/*TronGrid API; v1 is part of the official TRON path
curl -X POST 'https://tron-httpapi.<gateway-domain>/<app_api_key>/wallet/getnowblock' \ -H 'Content-Type: application/json' -d '{}' curl -X POST 'https://tron-httpapi.<gateway-domain>/<app_api_key>/walletsolidity/getnowblock' \ -H 'Content-Type: application/json' -d '{}' curl 'https://tron-httpapi.<gateway-domain>/<app_api_key>/v1/accounts/<address>/transactions?limit=20'

Each family requires at least one following path segment. /walletpbft/*, other path families, and DELETE/PUT/PATCH are not supported.

The request body and ordered, repeated query parameters are forwarded unchanged. Only Accept and Content-Type request headers are forwarded upstream. Provider credentials come from Endpoint authentication configuration.

Responses and errors

Upstream status codes and bodies are preserved. Responses pass through only Content-Type, Cache-Control, ETag, Last-Modified, Expires, and Retry-After.

Gateway-generated Wallet/Solidity errors use:

{"Error":"Rate limit exceeded."}

TronGrid v1 errors use:

{"Success":false,"Error":"Rate limit exceeded.","StatusCode":429}

Status codes are 400 invalid request, 401 authentication failure, 404 missing Gateway or path, 405 method not allowed, 408 body read timeout, 413 request too large, 429 rate limited, 502 Endpoint attempts failed, 503 disabled Gateway or no Endpoint, and 500 internal error. A 429 response includes Retry-After.

Rate limits and failover

HTTP API limits are independent from JSON-RPC capacity. The default safe_only route fails over for connection or configuration failures, 3xx, and upstream 401, 403, or 429 responses without replaying an ambiguous TRON POST. Configure idempotent only when retries after 408, 425, 5xx, interrupted responses, and timeouts are safe.

TRON HTTP API does not use the JSON-RPC cache.

Last updated on