TriportRPC

getTime

POSThttps://triport.io/rpc/ton

Returns the current Unix time reported by the selected TON liteserver.

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

getTime returns the current time reported by the selected liteserver. The result is a Unix timestamp in the now field and represents that server's clock at the time of the response.

Use it for liteserver diagnostics or coarse clock comparison. It is not a TON block position and must not replace masterchain seqno or transaction logical time (lt) when ordering chain data.

This direct liteserver method has no separate HTTP-gateway compatibility promise. The Triport JSON-RPC facade calls the ADNL liteserver pool.

Parameters

JSON-RPC params is an empty by-name object.

Params: object (by-name).

optional
This method has no parameters; send params: {}.

Response

Response fields

FieldTypeDescription
jsonrpcstringJSON-RPC protocol version.
idnumber or stringCorrelates the response with the request.
resultobjectLiteserver time result.
result.nowintegerUnix timestamp reported by the selected liteserver.

The response is copied from the accepted live fixture.

Errors

See TON errors for the shared envelope.

CodeMeaningWhen it happens
-32602Invalid paramsThe parameter structure is malformed or positional.
-32601Method not foundThe method is outside the published read-only catalog.
401UnauthorizedThe API key is missing or invalid.
429Rate limitedThe ton_read_rpc 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: "clock", method: "getTime", params: {} }),
});
const { result: serverTime } = await response.json();

Notes

  • now is diagnostic server time, not consensus time, block seqno, or transaction lt.
  • Calls use named params. When batched, correlate results by JSON-RPC id.
  • Poll this method if needed; TON WebSocket subscriptions are not published. Public HTTP gateways are not used as upstreams.
  • Related methods: getVersion and getMasterchainInfo.