API Documentation
Complete reference for the Jaaz Feed real-time and historical market data APIs.
Overview
Jaaz Feed provides real-time and historical market data via WebSocket and REST APIs. Stream live forex, metals, and crypto ticks over WebSocket, or fetch historical candles and ticks via REST.
All endpoints require authentication via API key. Data is delivered in JSON format with sub-millisecond latency from our binary tick storage engine.
https://feed.jaazmarkets.net as the base URL. WebSocket connections use wss://feed.jaazmarkets.net.Authentication
Every request to the Jaaz Feed API must include a valid API key. API keys are generated from your dashboard and are scoped to your account and plan.
REST API Authentication
Pass your API key in the x-api-key header with every HTTP request:
x-api-key: YOUR_API_KEY
WebSocket Authentication
Pass your API key as a query parameter when establishing the WebSocket connection:
wss://feed.jaazmarkets.net/ws/feed?apiKey=YOUR_API_KEY
WebSocket API
The WebSocket API provides real-time streaming tick data. After connecting and authenticating, subscribe to symbols to begin receiving price updates.
Connection
wss://feed.jaazmarkets.net/ws/feed?apiKey=YOUR_API_KEY
Subscribe to Symbols
Send a subscribe message after connection is established:
{
"action": "subscribe",
"symbols": ["EURUSD", "GBPUSD", "XAUUSD"]
}
Unsubscribe from Symbols
{
"action": "unsubscribe",
"symbols": ["EURUSD"]
}
Tick Message
Once subscribed, you will receive tick messages for each price update:
{
"type": "tick",
"symbol": "EURUSD",
"bid": 1.08523,
"ask": 1.08535,
"spread": 0.00012,
"timestamp": 1710600000000
}
Heartbeat
The server sends a heartbeat every 30 seconds to keep the connection alive:
{
"type": "heartbeat",
"timestamp": 1710600030000
}
REST API
The REST API provides access to symbol metadata, latest prices, and historical candle/tick data. All responses are JSON.
Returns a list of all available symbols with their specifications.
{
"symbols": [
{
"symbol": "EURUSD",
"category": "forex",
"digits": 5,
"pipSize": 0.0001,
"contractSize": 100000
},
{
"symbol": "XAUUSD",
"category": "metals",
"digits": 2,
"pipSize": 0.01,
"contractSize": 100
}
]
}
Returns the latest bid/ask prices for all available symbols.
{
"prices": [
{
"symbol": "EURUSD",
"bid": 1.08523,
"ask": 1.08535,
"spread": 0.00012,
"timestamp": 1710600000000
}
]
}
Returns the latest price for a specific symbol.
GET /api/v1/prices/EURUSD
Returns historical OHLCV candle data for a symbol. Supported timeframes: M1, M5, M15, M30, H1, H4, D1.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
timeframe | string | Yes | Candle timeframe (M1, M5, M15, M30, H1, H4, D1) |
from | string | No | Start date (ISO 8601, e.g. 2024-01-01) |
to | string | No | End date (ISO 8601, e.g. 2024-01-02) |
limit | integer | No | Max candles to return (default 500, max 1000) |
{
"candles": [
{
"timestamp": 1710547200000,
"open": 1.08450,
"high": 1.08623,
"low": 1.08410,
"close": 1.08523,
"volume": 1245.50,
"tickCount": 3842
}
]
}
Returns historical tick data for a symbol.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
from | string | No | Start date (ISO 8601) |
to | string | No | End date (ISO 8601) |
limit | integer | No | Max ticks to return (default 1000, max 5000) |
{
"ticks": [
{
"timestamp": 1710600000123,
"bid": 1.08523,
"ask": 1.08535
}
]
}
Rate Limits
Rate limits are enforced per API key based on your subscription plan. WebSocket connections and REST API calls have separate limits.
| Plan | WebSocket Connections | Symbols | History API Calls/Day | Price |
|---|---|---|---|---|
| Basic | 1 | 10 | 100 | $99/mo |
| Pro | 3 | 50 | 1,000 | $299/mo |
| Enterprise | 10 | Unlimited | Unlimited | $799/mo |
429 status code. Implement exponential backoff in your client to handle rate limiting gracefully.Code Examples
Complete code examples for connecting to the Jaaz Feed API in multiple languages.
WebSocket — Real-Time Ticks
// Connect to Jaaz Feed WebSocket
const ws = new WebSocket('wss://feed.jaazmarkets.net/ws/feed?apiKey=YOUR_API_KEY');
ws.onopen = () => {
console.log('Connected to Jaaz Feed');
ws.send(JSON.stringify({
action: 'subscribe',
symbols: ['EURUSD', 'GBPUSD', 'XAUUSD']
}));
};
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
if (data.type === 'tick') {
console.log(`${data.symbol}: ${data.bid} / ${data.ask}`);
}
};
ws.onerror = (err) => console.error('WebSocket error:', err);
ws.onclose = () => console.log('Disconnected');
# Install: pip install websockets
import asyncio
import json
import websockets
async def connect():
uri = "wss://feed.jaazmarkets.net/ws/feed?apiKey=YOUR_API_KEY"
async with websockets.connect(uri) as ws:
# Subscribe to symbols
await ws.send(json.dumps({
"action": "subscribe",
"symbols": ["EURUSD", "GBPUSD", "XAUUSD"]
}))
# Receive ticks
async for message in ws:
data = json.loads(message)
if data["type"] == "tick":
print(f"{data['symbol']}: {data['bid']} / {data['ask']}")
asyncio.run(connect())
REST API — Historical Data
# Get available symbols
curl -H "x-api-key: YOUR_API_KEY" \
https://feed.jaazmarkets.net/api/v1/symbols
# Get latest prices
curl -H "x-api-key: YOUR_API_KEY" \
https://feed.jaazmarkets.net/api/v1/prices
# Get historical candles
curl -H "x-api-key: YOUR_API_KEY" \
"https://feed.jaazmarkets.net/api/v1/candles/EURUSD?timeframe=H1&from=2024-01-01&to=2024-01-02&limit=100"
# Get historical ticks
curl -H "x-api-key: YOUR_API_KEY" \
"https://feed.jaazmarkets.net/api/v1/ticks/EURUSD?from=2024-01-01&to=2024-01-02&limit=5000"
const API_KEY = 'YOUR_API_KEY';
const BASE = 'https://feed.jaazmarkets.net';
// Fetch historical candles
const response = await fetch(
`${BASE}/api/v1/candles/EURUSD?timeframe=H1&from=2024-01-01&to=2024-01-02`,
{ headers: { 'x-api-key': API_KEY } }
);
const { candles } = await response.json();
candles.forEach(c => {
console.log(`${new Date(c.timestamp).toISOString()} O:${c.open} H:${c.high} L:${c.low} C:${c.close}`);
});
# Install: pip install requests
import requests
API_KEY = "YOUR_API_KEY"
BASE = "https://feed.jaazmarkets.net"
headers = {"x-api-key": API_KEY}
# Get symbols
symbols = requests.get(f"{BASE}/api/v1/symbols", headers=headers).json()
print(f"Available symbols: {len(symbols['symbols'])}")
# Get historical candles
params = {
"timeframe": "H1",
"from": "2024-01-01",
"to": "2024-01-02",
"limit": 100
}
candles = requests.get(
f"{BASE}/api/v1/candles/EURUSD",
headers=headers,
params=params
).json()
for c in candles["candles"]:
print(f"O:{c['open']} H:{c['high']} L:{c['low']} C:{c['close']}")
Error Codes
The API uses standard HTTP status codes. Error responses include a JSON body with details:
{
"error": {
"code": 401,
"message": "Invalid or missing API key"
}
}
| Code | Status | Description |
|---|---|---|
401 | Unauthorized | Invalid or missing API key. Verify your key is correct and included in the request. |
403 | Forbidden | Plan limit exceeded. Too many WebSocket connections or symbol subscriptions for your plan. |
404 | Not Found | Symbol not found. The requested symbol does not exist or is not available on your plan. |
429 | Too Many Requests | Rate limit exceeded. You have exceeded your daily history API call quota. Implement backoff. |
500 | Internal Server Error | An unexpected error occurred on the server. Contact support if the issue persists. |