TriportRPC

getTime

TON / https://triport.io/rpc/ton

Minimum tier: Free

TON method guide

Last updated:

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

This method takes no parameters.

Returns

getTime return value
FieldType
resultServerTime

Examples

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

Usage

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

FAQ

What does getTime do?
Returns the current Unix time reported by the selected TON liteserver.
How many credits does getTime cost?
getTime costs 1 credit(s) per call on Triport by default.
Is getTime available over WebSocket?
getTime is an HTTP JSON-RPC method.