TriportRPC

getAddressInformation

POSThttps://triport.io/rpc/ton

Returns an account's balance, state, code, data, and last-transaction reference.

TON mainnetton:rpcfree+; ton_read_rpc_heavy: 15 / 20 / 100 / 250 RPS (free / basic / pro / business; default, unmeasured)

getAddressInformation reads the state of one TON account. It returns the balance as a decimal string, the account state, the last transaction ID, and, when present, the account code, data, and block reference.

Use this method when an application needs the full account-state summary. A raw workchain:hex address and a user-friendly base64url address are both accepted. To read transactions instead of current state, use getTransactions; to execute a contract getter, use runGetMethod.

The optional seqno asks for state at a masterchain block. That makes the request retention-sensitive: the selected liteserver must have state for that point, and a successful genesis block lookup does not by itself prove continuous historical state.

Parameters

JSON-RPC params is a by-name object.

Params: object (by-name).

addressstringrequired
TON account in raw workchain:hex or user-friendly base64url form.
seqnointegeroptional
Non-negative masterchain sequence number at which to read state.

Response

Response fields

FieldTypeDescription
jsonrpcstringJSON-RPC protocol version.
idnumber or stringCorrelates the response with the request.
resultobjectAccount-state result.
result.balancestringAccount balance encoded as unsigned decimal text in TON's smallest unit.
result.statestringuninitialized, active, or frozen.
result.last_transaction_idobjectLast transaction's logical time and hash.
result.last_transaction_id.ltstringUnsigned logical time as decimal text.
result.last_transaction_id.hashstringTransaction hash.
result.block_idobjectBlock used for the state read when returned.
result.codestringOptional serialized account code.
result.datastringOptional serialized account data.

The JSON is copied from the accepted live fixture. Its sanitizer provenance lists account code and data among redacted fields, so their absence here must not be interpreted as a promise that they are always absent from live responses.

Errors

See TON errors for the shared envelope and retention handling.

CodeMeaningWhen it happens
-32602Invalid paramsaddress is missing or malformed, seqno is invalid, or params is positional.
beyond_retentionState unavailableThe requested seqno is below the selected liteserver's state window.
-32601Method not foundThe method is outside the published read-only catalog.
401UnauthorizedThe API key is missing or invalid.
429Rate limitedThe ton_read_rpc_heavy budget is exceeded.

Examples

const response = await fetch("https://triport.io/rpc/ton", {
  method: "POST",
  headers: { "x-token": process.env.TRIPORT_API_KEY, "Content-Type": "application/json" },
  body: JSON.stringify({
    jsonrpc: "2.0",
    id: "account-state",
    method: "getAddressInformation",
    params: { address: "EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs" },
  }),
});
const { result } = await response.json();

Notes

  • Named parameters are required. In a JSON-RPC batch, match each response by id; response order is not guaranteed.
  • Pruned liteservers had a measured masterchain floor of 86 860 000. Two nodes answered from genesis, but only one had confirmed continuous history; ls-17 had a measured gap.
  • Triport does not use public HTTP gateways as upstreams and does not publish TON write methods or WebSocket subscriptions.
  • Related methods: getTransactions, runGetMethod, and getMasterchainInfo.