Public API

Free access to cryptocurrency and Bitcoin blockchain data

Please note that this API is public and offered for free. Be kind and don't abuse this free service or else we automatically ban your IP address. Do not query API endpoints more often than once per minute.

Bitcoin Block Height

Returns the latest Bitcoin block height as a plain text number.

GET /api/bitcoin/height
Example Response
840000

Content-Type: text/plain

Bitcoin Last Block

Returns the last mined Bitcoin block number and timestamp.

GET /api/bitcoin-last-block
Example Response
{
  "hash": "0000000000000000000...",
  "height": 840000,
  "time": 1713484800
}
Crypto Exchange Rates

Returns cryptocurrency exchange rates for all supported fiat currencies.

GET /api/crypto-exchange-rates
Parameters
Name Required Description
fiat Optional Filter by fiat currency (USD, CAD, EUR, GBP)
Example Request
/api/crypto-exchange-rates?fiat=USD
Example Response
{
  "USD": {
    "BTC": {"rate": 72194.33, "trend": "up"},
    "ETH": {"rate": 2215.97, "trend": "down"}
  }
}
Bitcoin Block WebSocket

Real-time notifications when a new Bitcoin block is mined. Connect via WebSocket to receive push updates.

WS ws://kryptotracker.net/ws
Connection Example
const ws = new WebSocket("ws://kryptotracker.net/ws");
ws.onmessage = (event) => {
  const data = JSON.parse(event.data);
  console.log(data);
};
Example Message
{
  "type": "new_block",
  "block": 840000,
  "hash": "0000000000000000000...",
  "time": 1713484800
}