Skip to main content
Monad API method that returns an object with data about the sync status or false if the node is fully synced. This method is useful for monitoring the synchronization progress of your node.
Get you own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • none

Response

  • result — returns false if the node is not syncing, or an object with sync status data:
    • startingBlock — the block at which the import started
    • currentBlock — the current block being processed
    • highestBlock — the estimated highest block

eth_syncing code examples

const { ethers } = require("ethers");

const provider = new ethers.JsonRpcProvider("CHAINSTACK_NODE_URL");

async function checkSyncStatus() {
  const syncStatus = await provider.send("eth_syncing", []);
  if (syncStatus === false) {
    console.log("Node is fully synced");
  } else {
    console.log(`Syncing: ${parseInt(syncStatus.currentBlock, 16)} / ${parseInt(syncStatus.highestBlock, 16)}`);
  }
}

checkSyncStatus();

Use case

A practical use case for eth_syncing is implementing health checks in your application to ensure the node is fully synced before processing transactions or queries that require the latest chain state.