TriportRPC

eth_syncing

POSThttps://triport.io/rpc/bsc

Return node sync progress or false.

BNB Smart Chainbsc:rpcbsc_read_rpc - 15 / 20 / 100 / 250 RPS (free / basic / pro / business) (default, unmeasured); enterprise unlimited

eth_syncing reports whether the selected BNB Smart Chain node is synchronizing.

A fully synchronized node returns the boolean false. A synchronizing node returns an object containing starting, current, and highest block quantities.

Use it for node-state diagnostics, not as the chain's canonical block height. eth_blockNumber returns the selected node's current head and net_peerCount reports its peer count.

Parameters

JSON-RPC params must be an empty array: [].

Response

The response below is the checked fixture for this method; it is reproduced without changing its fields or values.

resultboolean or object
false when synchronized, otherwise a sync progress object.
result.startingBlockstring
Starting block as a hex quantity when syncing.
result.currentBlockstring
Current block as a hex quantity when syncing.
result.highestBlockstring
Highest target block as a hex quantity when syncing.

Errors

Errors use the standard JSON-RPC error envelope. See BSC errors for network-specific classification and the linked shared reference.

CodeMeaningWhen it happens
-32602Invalid paramsA required positional parameter is missing or a value does not match the OpenRPC schema.
401UnauthorizedThe x-token API key is missing or invalid.
429Rate limitedThe request exceeds the configured category RPS for the caller's tier.

Examples

JavaScript (fetch)

const response = await fetch("https://triport.io/rpc/bsc", {
  method: "POST",
  headers: {
    "x-token": process.env.TRIPORT_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_syncing",
    "params": []
  }),
});


const payload = await response.json();
console.log(payload.result);

Notes