TriportRPC

eth_getBalance

Tron / https://triport.io/rpc/tron

Minimum tier: Free

Tron method guide

Last updated:

eth_getBalance reads the native balance associated with an EVM-form Tron address. The result is an EVM hexadecimal quantity; the method does not return an account object or token balances.

The Tron EVM state surface is current-state only. The second positional parameter must be the literal latest; historical block quantities are not supported. Use wallet getaccount when native Tron account fields, rather than only the balance quantity, are required.

Parameters

eth_getBalance parameters
NameTypeRequiredDescription
addressEVMAddressYes
blockLatestBlockTagYes

Returns

eth_getBalance return value
FieldType
balanceQuantity

Examples

curl https://triport.io/rpc/tron \
  -X POST -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <api-key>' \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_getBalance","params":["<address>","<block>"]}'
const res = await fetch("https://triport.io/rpc/tron", {
  method: "POST",
  headers: { "Content-Type": "application/json", Authorization: "Bearer <api-key>" },
  body: JSON.stringify({
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "<address>",
    "<block>"
  ]
}),
});
const data = await res.json();
import requests
resp = requests.post(
    "https://triport.io/rpc/tron",
    headers={"Authorization": "Bearer <api-key>"},
    json={"jsonrpc":"2.0","id":1,"method":"eth_getBalance","params":["<address>","<block>"]},
)
print(resp.json())

Usage

  1. Transport: HTTP (JSON-RPC).
  2. Chain: Tron.
  3. Clusters: mainnet.
  4. Credit cost: 1 per call.

FAQ

What does eth_getBalance do?
Returns the current TRX balance of a 20-byte EVM address.
How many credits does eth_getBalance cost?
eth_getBalance costs 1 credit(s) per call on Triport by default.
Is eth_getBalance available over WebSocket?
eth_getBalance is an HTTP JSON-RPC method.