Frontend API

API Reference

Read-only endpoints used by the KCMINERS Bitcoin frontend. Responses are JSON and live data depends on Miningcore and PostgreSQL availability.

GET/api/pools

Bitcoin-only Miningcore pool list and current pool/network statistics.

GET/api/pool-stats

Aggregated 24-hour pool hashrate history from PostgreSQL.

GET/api/blocks?limit=100

Recent Bitcoin blocks. Optional poolId and limit query parameters are supported.

GET/api/payments?limit=100

Recent Bitcoin payment records from the Miningcore database.

GET/api/top-miners?limit=10

Top recent miners based on the latest minerstats worker samples.

GET/api/bitcoin-price

Cached BTC/USD price used by the homepage.

GET/api/miner/{poolId}/{address}

Miningcore miner statistics, performance history, and matching blocks.

Operational note

These frontend routes are public read-only endpoints. Keep PostgreSQL bound to localhost and never expose database credentials or the Miningcore administrative interface through Nginx.