eth_syncing
Returns an object with data about the sync status or false on Avalanche C-Chain.
Parameters#
This method accepts no parameters.
{
"jsonrpc": "2.0",
"method": "eth_syncing",
"params": [],
"id": 1
}
Returns#
Object|Boolean - An object with sync status data or FALSE, when not syncing:
startingBlock:QUANTITY- The block at which the import started (will only be reset, after the sync reached his head)currentBlock:QUANTITY- The current block, same as eth_blockNumberhighestBlock:QUANTITY- The estimated highest block
Implementation Example#
- cURL
- JavaScript
curl -X POST https://api-avalanche-mainnet-archive.n.dwellir.com/YOUR_API_KEY/ext/bc/C/rpc \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_syncing",
"params": [],
"id": 1
}'
const response = await fetch('https://api-avalanche-mainnet-archive.n.dwellir.com/YOUR_API_KEY/ext/bc/C/rpc', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
jsonrpc: '2.0',
method: 'eth_syncing',
params: [],
id: 1
})
});
const data = await response.json();
console.log(data.result);
Response Example#
When syncing#
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"startingBlock": "0x384",
"currentBlock": "0x386",
"highestBlock": "0x454"
}
}
When not syncing#
{
"id": 1,
"jsonrpc": "2.0",
"result": false
}
Note: Avalanche's fast block times mean sync status changes frequently. A false result indicates the node is fully synced.
Need help? Contact our support team or check the Avalanche documentation.