Public API

Everything the site shows is available as JSON from the same read-only API. No key is needed.

https://api.hashlak.com/api/v1

  • Money is always a string, never a float: display it, do not compute with it in JavaScript.
  • Rate limit: 60 requests per minute per IP (429 above that).
  • Responses are cached for 30–60 seconds; cached_for_seconds tells you how long.
  • CORS is open for hashlak.com; from other origins call the API from your server.
  • Errors are JSON with a message field; unknown pool or invalid address = 404.
  • explorer_url is a link to the public block explorer of the coin's current network; it is null only on a private test network (no public explorer exists).

GET /pools

Every pool with live stats, totals, luck and 24 h sparkline samples.

{"data":[{"id":"zeph1","ticker":"ZEPH","stats":{"pool_hashrate":3311,"connected_miners":2,"network_height":2224},"blocks":{"confirmed":51,"pending":1},"payouts":{"count":2,"total_paid":"662.95"},"luck":{"luck_percent":112.4},"samples_24h":[…]}]}

GET /pools/{pool}

One pool.

{"data":{"id":"zeph1", …same as above… }}

GET /pools/{pool}/stats?range=24h|7d

Averaged samples for charts: 10-minute buckets over 24 h, hourly over 7 d.

{"data":[{"at":"2026-11-01T09:00:00+00:00","pool_hashrate":3400.5,"network_hashrate":1400,"connected_miners":2,"network_difficulty":165000}],"range":"24h"}

GET /pools/{pool}/blocks?page=1&page_size=25

Blocks found, newest first, with confirmation progress and explorer links.

{"data":[{"height":9713145,"status":"confirmed","reward":"0.30546944","effort":0.92,"miner":"xel:psqe…","hash":"5244be8a…","explorer_url":"https://explorer.xelis.io/block/5244be8a…","found_at":"…"}],"meta":{"current_page":1,"last_page":3,"per_page":25,"total":52}}

GET /pools/{pool}/payments?page=1

Payouts, newest first, with the transaction hash.

{"data":[{"address":"xel:psqe…","amount":"0.51234567","tx_hash":"409e72c8…","explorer_url":"https://explorer.xelis.io/tx/409e72c8…","paid_at":"…"}],"meta":{…}}

GET /pools/{pool}/miners/{address}

A wallet on a pool: pending balance, paid totals, workers, 24 h hashrate.

{"data":{"pending_balance":"25.560180721352","total_paid":"637.384843661221","paid_last_24h":"0","payout_count":1,"workers":[{"worker":"rig1","hashrate":1250,"last_seen":"…"}],"hashrate_24h":[…],"blocks_found":3}}

GET /pools/{pool}/miners/{address}/payments · /blocks

That wallet's payouts and blocks, paged.

same shapes as the pool lists, filtered to the address

GET /coins

The coin registry: ports (plain and TLS), fees, minimum payouts, miner commands, contact meta.

{"data":[{"id":"rvn1","ports":[{"port":3301,"tls":false},{"port":3501,"tls":true}],"miners":[{"software":"T-Rex (NVIDIA)","command":"t-rex -a kawpow -o stratum+tcp://stratum.hashlak.com:3301 -u {wallet}.{worker} -p x"}]}],"meta":{"telegram_bot_username":"…"}}

GET /economics

Calculator inputs per pool: block reward (median of recent confirmed mainnet blocks, else the nominal value), latest network hashrate, USD quote from CoinGecko with its date and a stale flag. Cached 5 minutes.

{"data":[{"id":"xel","ticker":"XEL","network":"mainnet","algorithm":"XelisHash v3","block_time_seconds":5,"fee_percent":"0","block_reward":"0.3057","block_reward_source":"observed","network_hashrate":62400000,"sampled_at":"…","price_usd":"0.309481","price_updated_at":"…","price_source":"coingecko","price_stale":false}],"cached_for_seconds":300,"disclaimer":"Estimates …"}

GET /health

Database reachable and stats fresh — for monitoring.

{"status":"ok","database":"ok","newest_sample_age_seconds":114}   (503 when degraded)