Polygon
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Polygon
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
eth_syncing reports whether a Polygon PoS node is still catching up to the chain head. It returns false when the node is fully synced and serving current data, or an object with startingBlock, currentBlock, and highestBlock while it is still importing blocks. Because Polygon produces a block roughly every 2 seconds, a node that has fallen behind can lag by a large number of blocks quickly, so this check matters before you trust any balance or MATIC transaction it returns. Query it against the Polygon mainnet endpoint at https://polygon.therpc.io/YOUR_API_KEY (chain ID 137, 0x89) to confirm the node backing your requests is current.
currentBlock and highestBlock to drive a node-monitoring dashboard.currentBlock over time — on a healthy Polygon node it should advance by roughly one block every 2 seconds.Este método no acepta parámetros. Pasa un array vacío [].
| Tipo | Descripción |
|---|---|
| boolean | object | false when the node is fully synced. When syncing, returns an object with at minimum: startingBlock (hex), currentBlock (hex), highestBlock (hex). Additional fields vary by client (e.g. Geth includes snap-sync progress counters; Erigon includes syncStage/syncProgress). |
Try it live in the Polygon playground.
| Código | Mensaje | Causa |
|---|---|---|
-32603 | Internal error | Node cannot determine sync state (e.g. no peers connected). |
false during specific sync phases even when not fully caught up — do not treat false as an absolute guarantee; cross-check currentBlock against the expected head if correctness is critical.