← Sonic overview
Sonic · eth
eth_syncing
Returns an object with data about the sync status or false.
Result
Syncing status
Schema
{
"title": "Syncing status",
"oneOf": [
{
"type": "object",
"title": "Syncing progress",
"properties": {
"currentBlock": {
"type": "string",
"title": "Current block",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"highestBlock": {
"type": "string",
"title": "Highest block",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"startingBlock": {
"type": "string",
"title": "Starting block",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
}
}
},
{
"type": "boolean",
"title": "Not syncing",
"description": "Should always return false if not syncing."
}
]
}Example request
Endpoint: https://your-sonic-node.azxa.io
JSON-RPC
{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_syncing",
"params": []
}Example response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"currentBlock": "0x1518",
"highestBlock": "0x9567a3",
"startingBlock": "0x0"
}
}Test fixture
Fixture: check-syncing
Request
{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_syncing"
}Response
{
"jsonrpc": "2.0",
"id": 1,
"result": false
}cURL
curl -X POST https://your-sonic-node.azxa.io \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_syncing","params":[]}'