curl '172.21.0.3:8545' -X POST -H 'Content-Type: application/json' --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":83}'
result
{ "id":83, "jsonrpc": "2.0", "result": "0x4b7" }
curl '172.21.0.3:8545' -X POST -H 'Content-Type: application/json' --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}'
Result
{ "id":1, "jsonrpc": "2.0", "result": { startingBlock: '0x384', currentBlock: '0x386', highestBlock: '0x454' } }
Or when not syncing
{ "id":1, "jsonrpc": "2.0", "result": false }
curl --data '{"method":"txpool_status","id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST '172.21.0.3:8545'
result
{"jsonrpc":"2.0","id":1,"result":{"pending":"0x0","queued":"0x0"}}
curl --location --request POST 'https://main-light.eth.linkpool.io' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc":"2.0",
"method":"eth_getBalance",
"params":[
"0x62168f743A1eA7eD583eB7F5Fb35e2409f409361",
"latest"
],
"id":1
}'
{"jsonrpc":"2.0","id":1,"result":"0x382c0adc13151b0"}
result
{"jsonrpc":"2.0","id":1,"result":"0x382c0adc13151b0"}
reference
https://documenter.getpostman.com/view/4117254/ethereum-json-rpc/RVu7CT5J
https://eth.wiki/json-rpc/API#eth_blockNumber