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/blocksList latest blocksTry โ†—
GET/api/v1/blocks/:numberGet block by numberTry โ†—
GET/api/v1/blocks/:number/transactionsTransactions in blockTry โ†—
Transactions
GET/api/v1/transactionsList transactionsTry โ†—
GET/api/v1/txs/:hashTransaction detailTry โ†—
GET/api/v1/txs/internalInternal transactionsTry โ†—
GET/api/v1/txs/pendingPending (mempool)Try โ†—
Addresses
GET/api/v1/address/:hashAddress info + balanceTry โ†—
GET/api/v1/address/:hash/transactionsAddress tx historyTry โ†—
GET/api/v1/address/:hash/tokensToken holdingsTry โ†—
GET/api/v1/address/:hash/logsEvent logsTry โ†—
Tokens
GET/api/v1/tokensToken list with market dataTry โ†—
GET/api/v1/tokens/:addressToken detailTry โ†—
GET/api/v1/tokens/:address/holdersHolder listTry โ†—
GET/api/v1/tokens/:address/transfersToken transfersTry โ†—
GET/api/v1/token-transfersAll token transfersTry โ†—
GET/api/v1/stats/tokensToken market statsTry โ†—
Contracts
GET/api/v1/contractsVerified contractsTry โ†—
GET/api/v1/contracts/:addressContract + ABITry โ†—
GET/api/v1/contracts/:address/proxyDetect proxy pattern (EIP-1967 etc)Try โ†—
GET/api/v1/contracts/:address/verifyVerification statusTry โ†—
POST/api/v1/contracts/verifySubmit contract source for verificationTry โ†—
Gas
GET/api/v1/gasGas oracle + USD cost estimatesTry โ†—
GET/api/v1/gas/historyGas price historyTry โ†—
Decode / Tools
GET/api/v1/decode/input/:dataDecode method signature (4byte)Try โ†—
GET/api/v1/decode/event/:topic0Decode event topicTry โ†—
POST/api/v1/decode/batchBatch decode inputsTry โ†—
Masternodes
GET/api/v1/masternodesMasternode list + epoch infoTry โ†—
Analytics
GET/api/v1/statsNetwork stats (price, tps, blocks)Try โ†—
GET/api/v1/charts/tpsTPS time series (ClickHouse)Try โ†—
GET/api/v1/charts/gasGas utilization trendTry โ†—
Portfolio
POST/api/v1/portfolioCreate multi-address portfolioTry โ†—
GET/api/v1/portfolio/:idPortfolio with balancesTry โ†—
GET/api/v1/portfolio/:id/activityAggregated activity feedTry โ†—
GET/api/v1/portfoliosList all portfolios (session)Try โ†—
GraphQL
POST/api/v1/graphqlGraphQL API (Apollo Server)Try โ†—
GET/api/v1/graphql/playgroundGraphQL playgroundTry โ†—
Etherscan Compat
GET/api?module=account&action=txlistAccount transactionsTry โ†—
GET/api?module=block&action=getblockrewardBlock rewardTry โ†—
GET/api?module=gastracker&action=gasoracleGas oracleTry โ†—
GET/api?module=stats&action=ethsupplyXDC supplyTry โ†—

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