{{#layout}}

HTTP API – Docs & Tester (BCH)

Endpoints esposti dal backend BCH (/api/*) con esempi ed esecuzione live.
Note generali
/api/sharesCurrentRound
Stato “live” del round corrente BCH: per-worker e totali di pool.
Output include: round, workers{}, pool_hashrate_hs, _pool_span_s, ecc.
Verifica hashrate (BCH): metodo vecchio vs nuovo
Confronta:
  • sum_hs_new = Σ per-worker hashrate_hs (se presente) altrimenti diff_valid_window · 2^32 / _pool_span_s
  • api_pool = pool_hashrate_hs restituito da /api/sharesCurrentRound
Usa gli stessi parametri del backend (span reale); niente più finestre discordanti.
Pool Health — Live per-worker BCH (NEW vs OLD + efficienza)
Legge /api/sharesCurrentRound e calcola GH/s ed efficienza per ciascun worker.
Worker Snapshot (ultimi N round)
Legge /api/workerRounds e aggrega GH/s ed efficienza.
|
GH/s = Σ(diff_valid_round)·2^32 / Σ(duration). Eff = Σvalid / (Σvalid+Σinvalid).
/api/roundMarkers
Marcatori round BCH: current e last_closed.
/api/poolSummary
Media tempo-pesata su ultimi N round BCH (default 200). Filtra round corti/zero.
Esempio: /api/poolSummary?limit=100
/api/workersKnown
Elenco workers visti negli ultimi N round BCH.
Esempio: /api/workersKnown?limit=200
/api/workerRounds
Storico per worker (per-round): hashrate, efficiency, diff_valid, durata.
|
Esempio: /api/workerRounds?wid=bitaxe1&limit=50
/api/workerExplain
Spiegazione calcolo live per un worker nel round corrente (inputs + metodo usato).
Esempio: /api/workerExplain?wid=bitaxe1
/api/roundHistory
Snapshot ultimi N round (height, ts, pool_hashes, duration).
Esempio: /api/roundHistory?limit=200
/api/roundSummary
Riepilogo per un round: per-worker valid/invalid, dv/ds, efficiency, hashrate per durata round.
Esempio: /api/roundSummary?height=928665
/api/liveDiff
Mappa diagnostica diff init/live per worker (se abilitata in backend).
/api/refresh_stats
Forza refresh del blocco statistiche globali lato server.
/api/live_stats (SSE)
Server-Sent Events: stream continuo di aggiornamenti live.
disconnected
Nota: questo endpoint è diverso dagli altri (non è JSON “one-shot”, ma un flusso di eventi).
{{/layout}}