TriportRPC

eth_syncing

POSThttps://api.triport.io/polygon

Reports whether the Polygon node serving your request is still catching up to the chain head, or fully synced.

Polygonpolygon_read_rpcFree and above — Free 15 rps, Basic 20 rps, Pro 100 rps, Business 250 rps (per-second with burst; see [Rate Limits](../../rate-limits-and-tiers.md))

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.

optional
params 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 | object
false when the node is at the chain head; otherwise a sync-progress object.
result.startingBlockstring (hex)
Block number at which the current sync run began.
result.currentBlockstring (hex)
Block number the node has imported so far.
result.highestBlockstring (hex)
Estimated chain-head block number the node is syncing toward.

Errors

CodeMeaningWhen it happens
-32001trial_expiredThe API key's trial period has ended.
-32002tier_insufficientThe key's tier is below the level required for this category. (eth_syncing is Free-tier, so this is rare here.)
-32003rate_limitedYou 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.
-32004subscription_expiredThe key's paid subscription has lapsed.
-32005unauthorizedThe key is missing, invalid, or lacks the polygon_read_rpc scope.
-32601method_unknownThe 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 treating result as a progress object — false and 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 false response confirms the chosen backend reports itself synced — not that it is necessarily at the absolute tip. For real-time work, combine with eth_blockNumber and compare against expected Polygon block time (~2s).
  • Related methods. Other standard network-state reads on this surface include eth_blockNumber, net_listening, and net_peerCount — all in the same polygon_read_rpc category and Free tier.