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
POST /wallet/getblockbylatestnum# 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.