{"openapi":"3.1.0","info":{"title":"B2 Network API","version":"1.0.0","description":"Real-time on-chain data for B² Network (B-Squared, chain-id 223) — the Bitcoin Layer-2 ZK-rollup that commits its proofs back to Bitcoin, EVM-compatible and using BTC as its native gas token. Query live network status (latest block height, network id, client version), fetch any block by height or the latest one (timestamp, transaction count, gas used / limit, base fee, miner), read the current gas price in wei and gwei, and look up the native BTC balance and transaction count of any address. A keyless, no-account JSON wrapper over the canonical B² Network JSON-RPC node — decoded from hex into plain decimals and human-readable BTC so you do not have to. Ideal for explorers, wallets, dashboards, gas estimators and analytics on the B² Network Bitcoin L2.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/bsquared-api","description":"oanor gateway"}],"tags":[{"name":"Network"},{"name":"Blocks"},{"name":"Gas"},{"name":"Accounts"},{"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/status":{"get":{"operationId":"get_v1_status","tags":["Network"],"summary":"Network status (latest block, chain id, client version)","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"chain":"B2 Network","chain_id":223,"network_id":223,"rpc_healthy":true,"latest_block":34179142,"native_symbol":"BTC","client_version":"Geth/v1.101315.2-stable-7c281983/linux-amd64/go1.21.11"},"meta":{"timestamp":"2026-06-15T11:14:34.605Z","request_id":"13e8024f-0d92-4e13-95b5-99ec3f209e61"},"status":"ok","message":"Chain status retrieved successfully","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":["Blocks"],"summary":"Block by height (or latest)","description":"","parameters":[{"name":"number","in":"query","required":false,"description":"Block height (decimal or 0x-hex), or \"latest\"","schema":{"type":"string"},"example":"10000000"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"hash":"0x97e6f50bc03601d18ba7f690cf6b23eaa2e6057b3acc3b3f3ad52b1b4fa3ded1","miner":"0x4200000000000000000000000000000000000011","number":10000000,"gas_used":206331,"gas_limit":30000000,"timestamp":1733163786,"size_bytes":1101,"parent_hash":"0x2742b67e4be02079d1364ec512659066fd9fa090e10abc5f70b7d028c636f84b","timestamp_iso":"2024-12-02T18:23:06.000Z","transaction_count":3,"base_fee_per_gas_wei":"252"},"meta":{"timestamp":"2026-06-15T11:14:34.898Z","request_id":"674098d9-8d77-43c5-8a6c-2e689cf99cd8"},"status":"ok","message":"Block retrieved successfully","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":["Gas"],"summary":"Current gas price (wei + gwei)","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"at_block":34179143,"gas_price_wei":"1000252","native_symbol":"BTC","gas_price_gwei":0.001},"meta":{"timestamp":"2026-06-15T11:14:35.210Z","request_id":"c7821b16-547f-46e8-9436-e1971e765822"},"status":"ok","message":"Gas price retrieved successfully","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/balance":{"get":{"operationId":"get_v1_balance","tags":["Accounts"],"summary":"Native BTC balance and transaction count of an address","description":"","parameters":[{"name":"address","in":"query","required":true,"description":"0x-prefixed 40-hex EVM address","schema":{"type":"string"},"example":"0x000000000000000000000000000000000000dEaD"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"address":"0x000000000000000000000000000000000000dEaD","balance":"0.000041034336464663","balance_wei":"41034336464663","native_symbol":"BTC","transaction_count":0},"meta":{"timestamp":"2026-06-15T11:14:35.515Z","request_id":"7ad1132a-a8fe-4524-bef2-2f1c661a8e97"},"status":"ok","message":"Balance retrieved successfully","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":"Service metadata","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"type":"Bitcoin Layer-2 (ZK-rollup with Bitcoin commitment)","chain":"B2 Network","network":"mainnet","chain_id":223,"decimals":18,"ecosystem":"B² Network — Bitcoin-secured ZK rollup, native gas token BTC","endpoints":["/v1/status","/v1/block","/v1/gas","/v1/balance","/v1/meta"],"description":"B² Network (B-Squared) is a Bitcoin Layer-2 ZK-rollup that commits proofs back to Bitcoin, EVM-compatible and using BTC as its native gas token.","documentation":"https://bsquared-api.oanor.dev","native_symbol":"BTC"},"meta":{"timestamp":"2026-06-15T11:14:35.579Z","request_id":"c5f6b5a2-bb30-4ee6-872e-e10284db341a"},"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":4500,"rps_limit":3,"hard_limit":true},{"slug":"basic","name":"Basic","price_cents_month":1310,"monthly_call_quota":57500,"rps_limit":10,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":3590,"monthly_call_quota":219000,"rps_limit":25,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":7640,"monthly_call_quota":912000,"rps_limit":60,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/bsquared-api"}