eth_syncing
Returns an object with data about the sync status or false
.
Parameters
This method accepts no parameters.
{
"jsonrpc": "2.0",
"method": "eth_syncing",
"params": [],
"id": 1
}
Returns
Object|Boolean
- Sync status object or false
when not syncing.
Implementation Examples
- cURL
- JavaScript
curl -X POST https://api-tron-jsonrpc.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_syncing",
"params": [],
"id": 1
}'
const syncStatus = await provider.send('eth_syncing', []);
if (syncStatus === false) {
console.log('Node is fully synced');
} else {
console.log('Syncing:', syncStatus);
}