API Reference
OpenScan REST API ยท Base URL: http://localhost:4000/api/v1
Response Format
{
"items": [...], // array of results
"total": 12345, // total count
"page": 1, // current page
"limit": 25, // items per page
"next_page_params": { ... } // cursor for next page
}Blocks
| GET | /api/v1/blocks | List latest blocks | Try โ |
| GET | /api/v1/blocks/:number | Get block by number | Try โ |
| GET | /api/v1/blocks/:number/transactions | Transactions in block | Try โ |
Transactions
| GET | /api/v1/transactions | List transactions | Try โ |
| GET | /api/v1/txs/:hash | Transaction detail | Try โ |
| GET | /api/v1/txs/internal | Internal transactions | Try โ |
| GET | /api/v1/txs/pending | Pending (mempool) | Try โ |
Addresses
| GET | /api/v1/address/:hash | Address info + balance | Try โ |
| GET | /api/v1/address/:hash/transactions | Address tx history | Try โ |
| GET | /api/v1/address/:hash/tokens | Token holdings | Try โ |
| GET | /api/v1/address/:hash/logs | Event logs | Try โ |
Tokens
| GET | /api/v1/tokens | Token list with market data | Try โ |
| GET | /api/v1/tokens/:address | Token detail | Try โ |
| GET | /api/v1/tokens/:address/holders | Holder list | Try โ |
| GET | /api/v1/tokens/:address/transfers | Token transfers | Try โ |
| GET | /api/v1/token-transfers | All token transfers | Try โ |
| GET | /api/v1/stats/tokens | Token market stats | Try โ |
Contracts
| GET | /api/v1/contracts | Verified contracts | Try โ |
| GET | /api/v1/contracts/:address | Contract + ABI | Try โ |
| GET | /api/v1/contracts/:address/proxy | Detect proxy pattern (EIP-1967 etc) | Try โ |
| GET | /api/v1/contracts/:address/verify | Verification status | Try โ |
| POST | /api/v1/contracts/verify | Submit contract source for verification | Try โ |
Gas
| GET | /api/v1/gas | Gas oracle + USD cost estimates | Try โ |
| GET | /api/v1/gas/history | Gas price history | Try โ |
Decode / Tools
| GET | /api/v1/decode/input/:data | Decode method signature (4byte) | Try โ |
| GET | /api/v1/decode/event/:topic0 | Decode event topic | Try โ |
| POST | /api/v1/decode/batch | Batch decode inputs | Try โ |
Masternodes
| GET | /api/v1/masternodes | Masternode list + epoch info | Try โ |
Analytics
| GET | /api/v1/stats | Network stats (price, tps, blocks) | Try โ |
| GET | /api/v1/charts/tps | TPS time series (ClickHouse) | Try โ |
| GET | /api/v1/charts/gas | Gas utilization trend | Try โ |
Portfolio
| POST | /api/v1/portfolio | Create multi-address portfolio | Try โ |
| GET | /api/v1/portfolio/:id | Portfolio with balances | Try โ |
| GET | /api/v1/portfolio/:id/activity | Aggregated activity feed | Try โ |
| GET | /api/v1/portfolios | List all portfolios (session) | Try โ |
WebSocket โ Real-time Feed
// Connect
ws://localhost:4000/api/v1/ws/live
// Server sends
{ "type": "block", "data": { "number": 12345, ... } }
{ "type": "transaction", "data": { "hash": "0x...", ... } }
{ "type": "log", "data": { "address": "0x...", ... } }
// Subscribe to address
{ "action": "subscribe", "address": "0x..." }๐
100 req/min
Public Rate Limit
๐
1,000 req/min
API Key Rate Limit
๐
Unlimited
WebSocket Connections