TriportRPC

eth_syncing

Last updated:

eth_syncing tells you whether the node serving your request is fully synchronized with the head of the Ethereum chain. When the node is caught up, it returns the boolean false. While the node is still importing blocks, it returns an object describing how far the sync has progressed.

Use this as a lightweight health probe before depending on the freshness of data from other reads such as eth_blockNumber or eth_getBlockByNumber. On the Triport platform requests are routed to synced nodes, so in normal operation you should expect false; a sync object is the signal that the node you reached is still backfilling and its latest-block data may lag the true chain head.

Note that the numeric fields are returned as hex-encoded quantity strings (e.g. "0x9e64d"), not decimal numbers — decode them before doing arithmetic.

Parameters

This method takes no parameters.

Returns

eth_syncing return value
FieldType
resultobject

Examples

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

Usage

  1. Transport: HTTP (JSON-RPC).
  2. Networks: mainnet.
  3. Credit cost: 1 per call.

FAQ

What does eth_syncing do?
Reports whether the Ethereum node is currently syncing, returning false when fully synced or a sync-progress object while catching up.
How many credits does eth_syncing cost?
eth_syncing costs 1 credit(s) per call on Triport by default.
Is eth_syncing available over WebSocket?
eth_syncing is an HTTP JSON-RPC method.