eth_syncing
https://api.triport.io/polygonReports whether the Polygon node serving your request is still catching up to the chain head, or fully synced.
eth_syncing returns the synchronization status of the backend node. If the
node is at the chain head and not importing historical blocks, it returns the
boolean false. If the node is still catching up, it returns a sync-progress
object describing how far along it is: { startingBlock, currentBlock, highestBlock }.
Use it as a lightweight health indicator before relying on a node for
freshness-sensitive reads — for example, to confirm a backend is at the tip
before trusting its eth_blockNumber or balance results. It takes no parameters
and is one of the cheapest calls on the standard EVM read surface.
In practice, Triport fronts a pool of upstream Polygon providers and steers
traffic away from any node that is not at the head, so on this surface
eth_syncing almost always returns false. Treat a non-false response as the
exception — a backend that briefly fell behind — rather than the normal case. Do
not use eth_syncing as your sole liveness check: a CDN-fronted backend can
return false even when it is stale, so pair it with a tip-freshness check
(compare eth_blockNumber against expected block time, ~2s on Polygon).
Parameters
This method takes no parameters. Pass an empty array.
——optionalparams must be [].Response
When the node is fully synced (the common case):
When the node is still catching up, result is a progress object:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"startingBlock": "0x3a1f2c0",
"currentBlock": "0x3a1f380",
"highestBlock": "0x3a1f4a0"
}
}resultboolean | objectfalse when the node is at the chain head; otherwise a sync-progress object.result.startingBlockstring (hex)result.currentBlockstring (hex)result.highestBlockstring (hex)Errors
| Code | Meaning | When it happens |
|---|---|---|
-32001 | trial_expired | The API key's trial period has ended. |
-32002 | tier_insufficient | The key's tier is below the level required for this category. (eth_syncing is Free-tier, so this is rare here.) |
-32003 | rate_limited | You exceeded your tier's per-second budget (including burst) for polygon_read_rpc. Returned with HTTP 429 and a Retry-After header — back off and retry. |
-32004 | subscription_expired | The key's paid subscription has lapsed. |
-32005 | unauthorized | The key is missing, invalid, or lacks the polygon_read_rpc scope. |
-32601 | method_unknown | The method name was not recognised on the polygon chain (e.g. a typo). |
See the shared error envelope reference for the full error object shape and handling guidance.
Examples
JavaScript (fetch)
const res = await fetch("https://api.triport.io/polygon", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.TRIPORT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "eth_syncing",
params: [],
}),
});
const { result } = await res.json();
if (result === false) {
console.log("node is synced to head");
} else {
console.log(`syncing: ${parseInt(result.currentBlock, 16)} / ${parseInt(result.highestBlock, 16)}`);
}TypeScript SDK (@triport/sdk)
import { Triport } from "@triport/sdk";
const triport = new Triport({ apiKey: process.env.TRIPORT_API_KEY! });
type Syncing = false | { startingBlock: string; currentBlock: string; highestBlock: string };
const status = await triport.polygon.request<Syncing>("eth_syncing", []);
const synced = status === false;Python (triport-sdk)
import os
from triport import Triport
triport = Triport(api_key=os.environ["TRIPORT_API_KEY"])
status = triport.polygon.request("eth_syncing", [])
if status is False:
print("node is synced to head")
else:
print(f"syncing: {int(status['currentBlock'], 16)} / {int(status['highestBlock'], 16)}")Notes
- Boolean vs object. Always branch on
result === false(strict) before treatingresultas a progress object —falseand the object are the only two shapes returned. Block numbers inside the object are hex strings. - Not a freshness guarantee. Because traffic is routed across pooled
upstreams, a
falseresponse confirms the chosen backend reports itself synced — not that it is necessarily at the absolute tip. For real-time work, combine witheth_blockNumberand compare against expected Polygon block time (~2s). - Related methods. Other standard network-state reads on this surface include
eth_blockNumber,net_listening, andnet_peerCount— all in the samepolygon_read_rpccategory and Free tier.