getAddressInformation
https://triport.io/rpc/tonReturns an account's balance, state, code, data, and last-transaction reference.
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).
addressstringrequiredworkchain:hex or user-friendly base64url form.seqnointegeroptionalResponse
Response fields
| Field | Type | Description |
|---|---|---|
jsonrpc | string | JSON-RPC protocol version. |
id | number or string | Correlates the response with the request. |
result | object | Account-state result. |
result.balance | string | Account balance encoded as unsigned decimal text in TON's smallest unit. |
result.state | string | uninitialized, active, or frozen. |
result.last_transaction_id | object | Last transaction's logical time and hash. |
result.last_transaction_id.lt | string | Unsigned logical time as decimal text. |
result.last_transaction_id.hash | string | Transaction hash. |
result.block_id | object | Block used for the state read when returned. |
result.code | string | Optional serialized account code. |
result.data | string | Optional 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.
| Code | Meaning | When it happens |
|---|---|---|
-32602 | Invalid params | address is missing or malformed, seqno is invalid, or params is positional. |
beyond_retention | State unavailable | The requested seqno is below the selected liteserver's state window. |
-32601 | Method not found | The method is outside the published read-only catalog. |
401 | Unauthorized | The API key is missing or invalid. |
429 | Rate limited | The 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-17had 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, andgetMasterchainInfo.