API
·REST & WebSocket endpoints for market data
Overview
The Jaax Terminal API provides real-time cryptocurrency and traditional market data through both REST and WebSocket interfaces. All endpoints are rate-limited to 60 requests per minute per IP address to ensure fair usage and system stability.
REST Endpoints
Health Check
Get server status and cache statistics
Response Example:
curl https://jaax.io/api/health
{
"status": "ok",
"timestamp": 1716374400000,
"cache": {
"news": 127
}
}Get Current Prices
Retrieve current prices for all or specific symbols
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
| symbols | string | Optional: Comma-separated symbols (e.g., BTC,ETH) |
Curl Examples:
# Get all prices curl https://jaax.io/api/prices # Get specific symbols curl "https://jaax.io/api/prices?symbols=BTC,ETH,SOL"
Response Example:
[
{
"symbol": "BTC",
"price": 67250.50,
"change24h": 2.45,
"timestamp": 1716374400000
},
{
"symbol": "ETH",
"price": 3520.25,
"change24h": -1.20,
"timestamp": 1716374400000
}
]Get Symbol Snapshot
Get comprehensive data for a single symbol
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Symbol identifier (e.g., BTC, ETH) |
Curl Example:
curl https://jaax.io/api/snapshot/BTC
Response Example:
{
"symbol": "BTC",
"price": 67250.50,
"change24h": 2.45,
"marketCap": 1320000000000,
"volume24h": 28500000000,
"high24h": 68100.00,
"low24h": 65800.00,
"timestamp": 1716374400000
}Get Chart Data
Retrieve OHLCV candle data for charting
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
| timeframe | string | Optional: 1h, 4h, 1d (default: 1d) |
Curl Example:
# Get 1-day candles (default) curl https://jaax.io/api/chart/BTC # Get 4-hour candles curl "https://jaax.io/api/chart/ETH?timeframe=4h"
Response Example:
[
{
"timestamp": 1716288000000,
"open": 66500.00,
"high": 67800.00,
"low": 66200.00,
"close": 67250.50,
"volume": 25000000
},
{
"timestamp": 1716201600000,
"open": 65500.00,
"high": 66800.00,
"low": 65200.00,
"close": 66500.00,
"volume": 23000000
}
]Get Watchlist
Retrieve all tracked symbols in watchlist order
Curl Example:
curl https://jaax.io/api/watchlist
Response Example:
{
"total": 12,
"timestamp": 1716374400000,
"items": [
"BTC",
"ETH",
"SOL",
"AVAX",
"XRP",
"ADA",
"DOGE",
"SHIB",
"USDC",
"USDT",
"MATIC",
"ARB"
]
}Get News Articles
Fetch latest financial news from aggregated RSS feeds
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
| symbols | string | Optional: Filter by symbols (e.g., BTC,ETH) |
| limit | number | Optional: Items to return (default: 30, max: 100) |
Curl Examples:
# Get latest 30 articles curl https://jaax.io/api/news # Get latest 50 Bitcoin articles curl "https://jaax.io/api/news?symbols=BTC&limit=50" # Get articles for multiple symbols curl "https://jaax.io/api/news?symbols=BTC,ETH&limit=100"
Response Example:
{
"total": 142,
"timestamp": 1716374400000,
"items": [
{
"title": "Bitcoin Reaches New All-Time High",
"source": "WALTER BLOOMBERG",
"link": "https://x.com/DeItaone/status/...",
"timestamp": 1716374380000
},
{
"title": "Ethereum 2.0 Upgrade Completed Successfully",
"source": "FIRST SQUAWK",
"link": "https://x.com/FirstSquawk/status/...",
"timestamp": 1716374360000
}
]
}Get Fear & Greed Index
Market sentiment indicator from CoinMarketCap (5-min cache)
Curl Example:
curl https://jaax.io/api/fear-greed
Response Example:
{
"value": 68,
"classification": "Greed"
}Get Altcoin Season Index
Track altcoin performance relative to Bitcoin (5-min cache)
Curl Example:
curl https://jaax.io/api/altcoin-season
Response Example:
{
"index": 42,
"yearlyHigh": 89,
"yearlyLow": 18
}Get BTC & ETH Dominance
Bitcoin and Ethereum market dominance metrics (5-min cache)
Curl Example:
curl https://jaax.io/api/btc-dominance
Response Example:
{
"btcDominance": 51.25,
"ethDominance": 18.75,
"btcChange24h": 2.45,
"ethChange24h": -1.20
}WebSocket Endpoints
Real-Time Prices Stream
Stream all current prices updated every 1 second
JavaScript Example:
const ws = new WebSocket('wss://jaax.io/ws/prices');
ws.onmessage = (event) => {
const { type, data } = JSON.parse(event.data);
console.log('Latest prices:', data);
// Updates every 1 second
};
ws.onerror = (error) => {
console.error('WebSocket error:', error);
};Message Format:
{
"type": "prices",
"data": [
{
"symbol": "BTC",
"price": 67250.50,
"change24h": 2.45,
"timestamp": 1716374400000
},
{
"symbol": "ETH",
"price": 3520.25,
"change24h": -1.20,
"timestamp": 1716374400000
}
]
}Real-Time Chart Updates
Stream chart data for a specific symbol updated every 5 seconds
JavaScript Example:
const ws = new WebSocket('wss://jaax.io/ws/chart/BTC');
ws.onmessage = (event) => {
const { type, data } = JSON.parse(event.data);
console.log('Chart update:', data);
// Updates every 5 seconds
// data contains current candle: { timestamp, open, high, low, close, volume }
};
ws.onerror = (error) => {
console.error('WebSocket error:', error);
};Message Format:
{
"type": "chart",
"data": {
"symbol": "BTC",
"timestamp": 1716374400000,
"open": 67200.00,
"high": 67500.00,
"low": 67100.00,
"close": 67250.50,
"volume": 15000000
}
}Best Practices
⏱️ Respect Rate Limits
API is rate-limited to 60 requests per minute per IP. Exceeding this will return a 429 status code. Implement exponential backoff in your client.
🔄 Use WebSockets for Real-Time Data
For live data streams, prefer WebSocket connections over polling REST endpoints. This reduces bandwidth and respects rate limits.
💾 Leverage Caching
Market indicator endpoints (Fear/Greed, Altcoin Season, BTC Dominance) are cached for 5 minutes. Plan polling accordingly.
🔗 Connection Management
For WebSocket connections, implement heartbeat/ping-pong to detect disconnections and reconnect gracefully.
Error Handling
Rate limit exceeded. Wait 1 minute before retrying.
Invalid query parameters or malformed request. Check your request format.
Endpoint or symbol not found. Verify the URL and symbol parameters.
Internal server error. Please retry after a moment.
Jaax Terminal API v1.0
For support or API issues, contact our team through the Help & Support section.