TriportRPC

lookupBlock

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

Minimum tier: Pro

TON method guide

Last updated:

lookupBlock finds a block within a specified workchain and shard. Select the target by exactly one of block sequence number, logical time, or Unix time. The result is the complete cryptographic block ID.

Use it when a caller has a position or time but still needs root_hash and file_hash before calling getBlock or getBlockHeader. It differs from getMasterchainInfo, which returns only the current masterchain reference.

Historical resolution follows the selected liteserver's retention window. A missing old block is surfaced as a retention boundary rather than a fabricated empty result.

Parameters

lookupBlock parameters
NameTypeRequiredDescription
workchainintegerYes
shardShardYes
seqnoSeqnoNo
ltLogicalTimeNo
unixtimeintegerNo

Returns

lookupBlock return value
FieldType
resultBlockId

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":"lookupBlock","params":["<workchain>","<shard>","<seqno>","<lt>","<unixtime>"]}'
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": "lookupBlock",
  "params": [
    "<workchain>",
    "<shard>",
    "<seqno>",
    "<lt>",
    "<unixtime>"
  ]
}),
});
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":"lookupBlock","params":["<workchain>","<shard>","<seqno>","<lt>","<unixtime>"]},
)
print(resp.json())

Usage

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

FAQ

What does lookupBlock do?
Resolves one TON block by sequence number, logical time, or Unix time.
How many credits does lookupBlock cost?
lookupBlock costs 5 credit(s) per call on Triport by default.
Is lookupBlock available over WebSocket?
lookupBlock is an HTTP JSON-RPC method.