Docs
Docs
Home
Getting Started
Agent Tooling
CLI
Supported Chains
Acala
Aptos
Arbitrum
Arc
Asset Hub
Astar
Avalanche
Base
Berachain
Bifrost
Binance Smart Chain
Bittensor
Blast
Boba Network
Bridge Hub
Celo
Centrifuge
Chiliz
Cronos
Enjin
Ethereum
Etherlink
Flow EVM Gateway
Gnosis
Hydration
Hyperliquid
Immutable
Ink
IoTeX
Kusama
Linea
LISK
Manta Atlantic
Manta Pacific
Mantle
MegaETH
Monad
Movement
Neuroweb
opBNB
Optimism
Plasma
Polkadot
Polygon
Pulsechain
Robinhood
Ronin
Scroll
Sonic
Starknet
Taiko
Tempo
Sui
TRON
Unichain
Viction
World Chain
XDC Network
XX Network
Zetachain
zkSync Era
Zora
Supported ChainsTRONTRON HTTP API

wallet/getblockbylatestnum - Get Recent TRON Bl...

Get multiple recent TRON blocks by specifying a range from the latest block via Dwellir's high-performance RPC endpoint.

TRON RPC endpoint: endpoint URLs, plans and pricing.

Get a range of recent blocks counting backwards from the latest block.

Endpoint

Text
POST /wallet/getblockbylatestnum
cURL request
# Get last 5 blocks
    curl -X POST https://api-tron-mainnet.n.dwellir.com/YOUR_API_KEY/wallet/getblockbylatestnum \
      -H "Content-Type: application/json" \
      -d '{
        "num": 5
      }'

    # Get last 20 blocks
    curl -X POST https://api-tron-mainnet.n.dwellir.com/YOUR_API_KEY/wallet/getblockbylatestnum \
      -H "Content-Type: application/json" \
      -d '{
        "num": 20
      }'

    # Get maximum allowed (99 blocks)
    curl -X POST https://api-tron-mainnet.n.dwellir.com/YOUR_API_KEY/wallet/getblockbylatestnum \
      -H "Content-Type: application/json" \
      -d '{
        "num": 99
      }'

Implementation Examples

Use Cases

  • Real-time Monitoring: Track latest blockchain activity
  • Transaction Confirmation: Check recent blocks for transaction inclusion
  • Network Health: Monitor block production rate and consistency
  • Statistical Analysis: Analyze recent blockchain metrics
  • Block Explorer: Display recent blocks on explorer homepage

Related Methods

  • wallet/getnowblock - Get single latest block
  • wallet/getblockbynum - Get specific block by height
  • wallet/getblockbyid - Get block by hash ID
  • wallet/gettransactionbyid - Get transaction details

wallet/getblockbyid

Get TRON block information by block hash ID including transactions and block header via Dwellir's optimized RPC endpoint.

wallet/triggersmartcontract

Execute TRON smart contract functions, read contract state, and interact with TRC20 tokens via Dwellir's optimized smart contract RPC endpoints.

On this page

EndpointImplementation ExamplesUse CasesRelated Methods