TWOLEGEND Mainnet API

Active
Chain ID: 22022

TWOLEGEND Blockchain API

REST API for blockchain data and operations

Version

2.0.0

Endpoints

12+

Network

TWOLEGEND

Status

Active

Quick Start

Base URL

https://mainnet-api.twolegend.com

Example Request

curl https://mainnet-api.twolegend.com/health

API Endpoints

GET /health

Health check endpoint - Returns server and blockchain status

Returns: status, blockNumber, nodeInfo, timestamp
GET /api/info

API information and available endpoints

Returns: name, version, network, chainId, description, endpoints
GET /api/network

Network information and current status

Returns: chainId, networkName, blockNumber, gasPrice, peerCount, consensus
GET /api/stats

Comprehensive network statistics

Returns: totalBlocks, totalTransactions, activeValidators, avgBlockTime
GET /api/recent-blocks

Get recent blocks with transaction counts

Query: ?limit=10 (max 50) • Returns: blocks[], total, limit
GET /api/recent-transactions

Get recent transactions from the blockchain

Query: ?limit=10 (max 50) • Returns: transactions[], total, limit
GET /api/block/:blockId

Get block by number or 'latest'

Params: blockId (number|'latest') • Returns: full block data with transactions
GET /api/transaction/:hash

Get transaction details by hash

Params: hash (0x...) • Returns: transaction data and receipt
GET /api/balance/:address

Get wallet balance for an address

Params: address (0x...) • Returns: address, balanceWei, balanceTWO
GET /api/search

Universal search for blocks, transactions, or addresses

Query: ?q= • Returns: type, result (auto-detected)