API Reference
Access real-time and historical cryptocurrency market data, mining statistics, and live price feeds through our REST API and WebSocket connections.
Base URL
https://horizonforecast.com/apiFormat
JSON responses, REST endpointsRate Limit
100 requests per minuteGetting Started
All API endpoints are available under the /api prefix. No authentication is required for public endpoints. Responses are returned in JSON format.
Example Request
curl https://horizonforecast.com/api/market/price/BTCJavaScript / TypeScript
const response = await fetch("/api/market/price/BTC");
const data = await response.json();
console.log(data.price); // 97432.15Market Data
Real-time and historical cryptocurrency market data.
Mining Data
Bitcoin mining statistics including hash rate, difficulty, and miner revenue.
WebSocket
Real-time price updates via Socket.IO WebSocket connection.
Error Handling
The API uses standard HTTP status codes. Errors include a descriptive message in the response body.
200Success400Bad Request — invalid parameters404Not Found — unknown symbol or endpoint429Too Many Requests — rate limit exceeded500Internal Server Error