{"openapi":"3.1.0","info":{"title":"Towns API","version":"1.0.0","description":"Live EVM on-chain data for Towns (chain id 550) — an OP-Stack Layer-2 that powers decentralised group chat and on-chain social spaces, with gas paid in ETH — served directly from the public Towns JSON-RPC with server-side resilience. The status endpoint returns the chain and network id, the latest block height and the node client version. The block endpoint returns a block by number (or the latest) with its hash, parent hash, timestamp, transaction count, gas used and gas limit, miner and size. The gas endpoint returns the current gas price in both wei and gwei. The balance endpoint returns the ETH balance and outgoing transaction count for any address, converted from base wei (18 decimals) into whole ETH with exact big-integer scaling. Every figure is read live from the chain over JSON-RPC — nothing bundled or modelled — behind a short server-side cache with keep-warm so the feed stays fast and fresh. Ideal for explorers, wallet and dashboard tooling, gas trackers, address monitors and analytics apps across the Towns social ecosystem. Live keyless upstream. 5 endpoints.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/towns-api","description":"oanor gateway"}],"tags":[{"name":"Towns"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/balance":{"get":{"operationId":"get_v1_balance","tags":["Towns"],"summary":"Address balance & tx count","description":"","parameters":[{"name":"address","in":"query","required":false,"description":"EVM address (0x + 40 hex)","schema":{"type":"string"},"example":"0x000000000000000000000000000000000000dEaD"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"chain":"Towns","symbol":"ETH","address":"0x000000000000000000000000000000000000dEaD","balance":0,"tx_count":0,"balance_wei":"0"},"meta":{"timestamp":"2026-06-15T20:40:12.022Z","request_id":"4e2f191f-601c-4778-b8c6-6bb23e0819a2"},"status":"ok","message":"Towns balance retrieved","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/block":{"get":{"operationId":"get_v1_block","tags":["Towns"],"summary":"Block by number (or latest)","description":"","parameters":[{"name":"number","in":"query","required":false,"description":"Block number; omit for latest","schema":{"type":"string"},"example":"5000000"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"hash":"0x59e3f80952b9326cd20b316a17350e4074f37e040eef6936ca8f1ddd95fbc058","chain":"Towns","miner":"0x4200000000000000000000000000000000000011","number":5000000,"gas_used":43779,"tx_count":1,"gas_limit":30000000,"timestamp":1726138071,"size_bytes":839,"parent_hash":"0x12c4072d3325c82c4dbc3769403dd26a6151bc567c53c0c48878ade4120edb80","timestamp_iso":"2024-09-12T10:47:51.000Z"},"meta":{"timestamp":"2026-06-15T20:40:12.306Z","request_id":"3ae12d97-0e21-4b8c-98b5-b35748f73286"},"status":"ok","message":"Towns block retrieved","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/gas":{"get":{"operationId":"get_v1_gas","tags":["Towns"],"summary":"Current gas price","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"chain":"Towns","source":"eth_gasPrice","symbol":"ETH","gas_price_wei":1000252,"gas_price_gwei":0.001000252},"meta":{"timestamp":"2026-06-15T20:40:12.581Z","request_id":"774bfa9e-c3a3-4985-b90e-52c41809112e"},"status":"ok","message":"Towns gas retrieved","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/status":{"get":{"operationId":"get_v1_status","tags":["Towns"],"summary":"Chain status","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"chain":"Towns","source":"Towns L2 RPC","symbol":"ETH","chain_id":550,"network_id":550,"latest_block":32708970,"client_version":"reth/v2.2.0-7680d6d/x86_64-unknown-linux-gnu"},"meta":{"timestamp":"2026-06-15T20:40:13.240Z","request_id":"e7e23906-e20e-4fe4-b0fb-cbf87aca8271"},"status":"ok","message":"Towns status retrieved","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"api":"Towns API","chain":"Towns","source":"Towns L2 JSON-RPC nodes","symbol":"ETH","chain_id":550,"endpoints":["/v1/status","/v1/block","/v1/gas","/v1/balance","/v1/meta"],"description":"Live EVM on-chain data for Towns — an OP-Stack Layer-2 powering decentralised group chat and social spaces, gas paid in ETH.","documentation":"https://towns-api.oanor.dev"},"meta":{"timestamp":"2026-06-15T20:40:13.315Z","request_id":"3c001f5c-1593-4d16-a68c-8ba329c8247f"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":330,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":1310,"monthly_call_quota":15700,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":3640,"monthly_call_quota":84000,"rps_limit":16,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":8540,"monthly_call_quota":330000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/towns-api"}