API Documentation
Learn how to use the Cyberyen Explorer API to fetch blockchain data
Rate Limiting
All API endpoints are rate-limited to 10 requests per minute per IP address. Rate limit information is included in response headers:
X-RateLimit-Remaining: Number of requests remaining- If rate limit is exceeded, a 429 status code is returned with
Retry-Afterheader
Get Block
Fetch block data by height or hash.
GET /api/block?height=123&network=mainnetGET /api/block?hash=abc123...&network=mainnetParameters
height(optional): Block height (integer)hash(optional): Block hash (64 hex characters)network(optional): Network type - mainnet, testnet, or mweb (default: mainnet)
Response
{
"height": 123,
"hash": "abc123...",
"prev_hash": "def456...",
"merkle_root": "ghi789...",
"timestamp": 1234567890,
"size": 1234567,
"tx_count": 42,
"hasMweb": false,
"mwebHeader": { ... }
}Get Transaction
Fetch transaction data by hash.
GET /api/tx?hash=abc123...&network=mainnet&verbose=trueParameters
hash(required): Transaction hash (64 hex characters)network(optional): Network type (default: mainnet)verbose(optional): Return detailed transaction data (default: false)
Response
{
"txid": "abc123...",
"hash": "abc123...",
"version": 1,
"size": 250,
"vsize": 250,
"weight": 1000,
"locktime": 0,
"inputs": [ ... ],
"outputs": [ ... ],
"fee": 1000,
"isMweb": false,
"mwebExtension": { ... }
}Get Address
Fetch address balance and transaction history.
GET /api/address?address=CYb...&network=mainnetParameters
address(required): Cyberyen addressnetwork(optional): Network type (default: mainnet)
Response
{
"address": "CYb...",
"balance": 100000000,
"confirmed": 100000000,
"unconfirmed": 0,
"history": [ ... ]
}Network Stats
Get current network statistics.
GET /api/network-stats?network=mainnetResponse
{
"network": "mainnet",
"blockHeight": 123456,
"blockHash": "abc123...",
"difficulty": 1234567.89,
"hashrate": 1234567890,
"mwebUsagePercentage": 15.5,
"timestamp": 1234567890123
}Latest Blocks
Get the most recent blocks.
GET /api/latest-blocks?network=mainnet&limit=11Latest Transactions
Get the most recent transactions.
GET /api/latest-transactions?network=mainnet&limit=11