eth_syncing - Base

Example code for the eth_syncing JSON-RPC method. Complete guide on how to use eth_syncing JSON-RPC in GetBlock Web3 documentation.

The eth_syncing method returns an object with data about the sync status or false if the node is fully synced. This is used to check if a node is still synchronizing with the network.

Parameters

  • None

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_syncing",
    "params": [],
    "id": "getblock.io"
}'

Response (Synced)

{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": false
}

Response Parameters

Parameter
Type
Description

result

boolean/object

false if synced, otherwise sync status object

Sync Status Object

Field
Type
Description

startingBlock

string

Block where sync started (hex)

currentBlock

string

Current sync progress block (hex)

highestBlock

string

Estimated highest block (hex)

Use Cases

  • Health Checks: Verify node is fully synced before operations.

  • Sync Monitoring: Track synchronization progress.

  • Load Balancing: Route requests only to synced nodes.

  • Application Startup: Wait for node sync before processing.

  • Alerting: Detect nodes falling behind.

Error Handling

Error Code
Message
Description

-32603

Internal error

Node internal failure

Web3 Integration

Last updated

Was this helpful?