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`](./eth_blockNumber.md) or [`eth_getBlockByNumber`](./eth_getBlockByNumber.md). 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://<your-endpoint>/ \
  -X POST -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_syncing","params":[]}'
const res = await fetch("https://<your-endpoint>/", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "id": 1,
  "method": "eth_syncing",
  "params": [],
  "jsonrpc": "2.0"
}),
});
const data = await res.json();
import requests
resp = requests.post("https://<your-endpoint>/", 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.