API Documentation
Complete documentation for the ABC4Win Explorer API endpoints
Base URL
http://localhost:3000/api
Blocks API
GET /api/blocks/latest
Get the latest blocks
Query Parameters:
limit (optional, default: 10)
GET /api/blocks/:id
Get block by number or hash
Parameters:
id (block number or hash)
Transactions API
GET /api/transactions/latest
Get the latest transactions
Query Parameters:
limit (optional, default: 10)
GET /api/transactions/:hash
Get transaction by hash
Parameters:
hash (transaction hash)
Search API
GET /api/search
Search by block number, transaction hash, or address
Query Parameters:
q (search query)
Response Format
All API responses are returned in JSON format with the following structure:
{
"success": true,
"data": {...},
"message": "Success"
}
In case of errors, the response will include an error message and appropriate HTTP status code.