Cygnus Explorer API
RESTful API for accessing Cygnus blockchain data
Rate Limiting
All API endpoints are rate limited to 30 requests per minute per IP address. No API key required.
Base URL
http://explorer.cygnuschain.com/api/
Network Statistics
GET
/api/stats
Get current network statistics including latest block, hashrate, gas price, and block time.
Response Example:
{
"latest_block": 23965,
"network_hashrate": 1500000000000,
"avg_gas_price": 2000000000,
"avg_block_time": 10.4,
"total_transactions": 45678
}
Blocks
GET
/api/blocks
Get latest blocks (default: 10 blocks)
Query Parameters:
limit
- Number of blocks to return (max: 100)offset
- Number of blocks to skip
GET
/api/block/{block_number}
Get specific block by number
Response Example:
{
"number": 23965,
"hash": "0x1234...abcd",
"parent_hash": "0x5678...efgh",
"miner": "0x9abc...def0",
"timestamp": "2025-08-22T15:45:16",
"gas_used": 21000,
"gas_limit": 8000000,
"transaction_count": 1,
"transactions": [...]
}
Transactions
GET
/api/transactions
Get latest transactions (default: 10 transactions)
Query Parameters:
limit
- Number of transactions to return (max: 100)offset
- Number of transactions to skip
GET
/api/transaction/{tx_hash}
Get specific transaction by hash
Response Example:
{
"hash": "0x1234...abcd",
"block_number": 23965,
"from_address": "0x5678...efgh",
"to_address": "0x9abc...def0",
"value": "1000000000000000000",
"gas_used": 21000,
"gas_price": "2000000000",
"timestamp": "2025-08-22T15:45:16",
"status": "success"
}
Addresses
GET
/api/address/{address}
Get address information including balance and transaction history
Query Parameters:
tx_limit
- Number of transactions to include (max: 100)
Response Example:
{
"address": "0x1234...abcd",
"balance": "5000000000000000000",
"transaction_count": 25,
"label": "Mining Pool Alpha",
"transactions": [...]
}
Search
GET
/api/search/{query}
Search for blocks, transactions, or addresses
Response Example:
{
"type": "transaction",
"result": {
"hash": "0x1234...abcd",
"block_number": 23965,
...
}
}
Error Responses
Rate Limit Exceeded (429):
{
"error": "Rate limit exceeded",
"message": "Too many requests. Limit: 30 per minute"
}
Not Found (404):
{
"error": "Not found",
"message": "Block/Transaction/Address not found"
}