Explorer

API

Introduction

REST API for Cyberyen Explorer. Schema is loaded from /api/v1/openapi.json. Prefer the branded docs here; interactive (Swagger) is also available.

Base URL
/api/v1
Network path parameter
Most routes are under /api/v1/{network}/.... Allowed values: mainnet, testnet (and regtest when configured). Unknown networks return 404 problem+json.
Amounts
Monetary fields are JSON strings with exactly 8 decimal places (never floats), e.g. "1.50000000".
Errors
Failures use RFC 7807 application/problem+json:
{
  "type": "about:blank",
  "title": "Not Found",
  "status": 404,
  "detail": "…"
}
Server-sent events
Live tip and mempool updates over SSE (not fully typed in OpenAPI). Events: tip ({height,hash,time}), mempool ({count,vsize}). Heartbeat comments every ~15s.
const es = new EventSource("/api/v1/mainnet/events");
es.addEventListener("tip", (e) => {
  console.log(JSON.parse(e.data));
});
es.addEventListener("mempool", (e) => {
  console.log(JSON.parse(e.data));
});

Loading OpenAPI schema…

Legacy /api/*

deprecated

Cyberyen.work-compatible adapters on the default network. Prefer v1. Many logical errors still return HTTP 200 with an error envelope.

GET/api/addressbalance/{addr}Address balance

{"error":"ok","message":"<8dp>"} or invalid-address envelope

GET/api/receivedbyaddress/{addr}Total received by address

{"error":"ok","message":"<8dp>"} or invalid-address envelope

GET/api/sentbyaddress/{addr}Total sent by address

{"error":"ok","message":"<8dp>"} or invalid-address envelope

GET/api/validateaddress/{addr}Validate address via RPC

{"error":"ok","message":"valid"} or invalid envelope

GET/api/rawtx/{txid}Raw transaction (RPC getrawtransaction verbosity 1)

full RPC JSON object, or invalid-tx envelope

GET/api/block/getbestblockhashTip block hash

bare JSON string "<hash>", or 404-style envelope

GET/api/block/getblockcountTip height

{"error":"ok","message":"<height>"}

GET/api/block/{hash}Block via RPC (getblock verbosity 2)

full RPC JSON object, or invalid envelope

GET/api/getsummaryCirculating supply (coinbase sum − fees)

{"error":"ok","message":"<8dp supply>"}

GET/api/totaltransactionsIndexed transaction count

{"error":"ok","message":"<count>"}

GET/api/confirmations/{height}Confirmations for a height (tip − height + 1)

{"error":"ok","message":"<n>"}

GET/api/lastdifficultyTip block difficulty

{"error":"ok","message":"<8dp>"}