Guides

Get the latest block height

Start every integration by reading the chain tip. Method names differ by family — use the examples below, then open the family guide for full blocks and transactions.

eth_blockNumbergetSlotgetblockcount

← All guides

Steps

  1. Pick the network slug that matches your endpoint (ethereum, base, solana, bitcoin, tron, …).
  2. Call the tip method for that family (table in sections below).
  3. Parse the result (hex quantity on EVM, number/string elsewhere).
  4. Use that height/slot/hash as input to get-block / get-transaction guides.

EVM — eth_blockNumber (curl)

curl

curl https://holy-burned-sky-ethereum-mainnet.rpcnode.dev/7c9e6679-7425-40de-944b-e07fc1f90ae7 \
  -X POST \
  -H 'content-type: application/json' \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber",
  "params": []
}'

EVM — eth_blockNumber (JavaScript)

fetch

const response = await fetch('https://holy-burned-sky-ethereum-mainnet.rpcnode.dev/7c9e6679-7425-40de-944b-e07fc1f90ae7', {
  method: 'POST',
  headers: { 'content-type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    id: 1,
    method: 'eth_blockNumber',
    params: [],
  }),
});

const data = await response.json();
console.log(data);

Solana — getSlot (curl)

curl

curl https://holy-burned-sky-solana-mainnet.rpcnode.dev/7c9e6679-7425-40de-944b-e07fc1f90ae7 \
  -X POST \
  -H 'content-type: application/json' \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getSlot",
  "params": []
}'

Solana — getSlot (JavaScript)

fetch

const response = await fetch('https://holy-burned-sky-solana-mainnet.rpcnode.dev/7c9e6679-7425-40de-944b-e07fc1f90ae7', {
  method: 'POST',
  headers: { 'content-type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    id: 1,
    method: 'getSlot',
    params: [],
  }),
});

const data = await response.json();
console.log(data);

Bitcoin — getblockcount (curl)

curl

curl https://holy-burned-sky-bitcoin-mainnet.rpcnode.dev/7c9e6679-7425-40de-944b-e07fc1f90ae7 \
  -X POST \
  -H 'content-type: application/json' \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblockcount",
  "params": []
}'

Bitcoin — getblockcount (JavaScript)

fetch

const response = await fetch('https://holy-burned-sky-bitcoin-mainnet.rpcnode.dev/7c9e6679-7425-40de-944b-e07fc1f90ae7', {
  method: 'POST',
  headers: { 'content-type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    id: 1,
    method: 'getblockcount',
    params: [],
  }),
});

const data = await response.json();
console.log(data);

Tips

  • EVM quantities are hex strings (0x…). Convert with parseInt(hex, 16) in JS.
  • L2s (Base, Arbitrum, Optimism, Polygon, BSC, Hyperliquid) use the same eth_* tip methods as Ethereum.
  • TRON often uses wallet/* HTTP-style methods in addition to eth_* — see the TRON guide.

Tip methods by family

EVM / Hyperliquid: eth_blockNumber, eth_getBlockByNumber("latest", false).

Solana: getSlot, getLatestBlockhash.

Bitcoin & forks: getblockcount, getbestblockhash.

TRON: wallet/getnowblock or eth_blockNumber when enabled.

NEAR: status or block with finality final.

Cosmos SDK: tendermint status / GET /cosmos/base/tendermint/v1beta1/blocks/latest depending on gateway mode — see Cosmos guide.

Aptos: GET /v1 — ledger version in response. Sui: sui_getLatestCheckpointSequenceNumber.

TRON tip (wallet API)

Many TRON clients call wallet/getnowblock. On RpcNode this is still a JSON-RPC-style POST with method wallet/getnowblock (or the eth_* alias when your plan exposes it).

Example

curl https://holy-burned-sky-tron-mainnet.rpcnode.dev/7c9e6679-7425-40de-944b-e07fc1f90ae7 \
  -X POST \
  -H 'content-type: application/json' \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "wallet/getnowblock",
  "params": []
}'

Related