Skip to main content
POST
eth_syncing
curl --request POST \
  --url https://rpc.testnet.tempo.xyz/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "jsonrpc": "2.0",
  "method": "eth_syncing",
  "params": [],
  "id": 1
}
'
{
  "jsonrpc": "<string>",
  "id": 123,
  "result": true
}
Tempo API method that returns the sync status of the node. Returns false if the node is fully synced, or a sync status object if syncing.

Parameters

  • none

Response

  • resultfalse if not syncing, or a sync status object:
    • startingBlock — block at which sync started
    • currentBlock — current block being synced
    • highestBlock — estimated highest block

eth_syncing code examples

const Web3 = require("web3");
const NODE_URL = "CHAINSTACK_NODE_URL";
const web3 = new Web3(NODE_URL);

async function checkSyncStatus() {
  const syncing = await web3.eth.isSyncing();
  if (syncing === false) {
    console.log("Node is fully synced");
  } else {
    console.log(`Syncing: ${syncing.currentBlock}/${syncing.highestBlock}`);
  }
}

checkSyncStatus()

Body

application/json
jsonrpc
string
default:2.0
method
string
default:eth_syncing
params
any[]
id
integer
default:1

Response

200 - application/json

Sync status

jsonrpc
string
id
integer
result

false if the node is not syncing