This API provides real-time spread data with enhanced analytics and market intelligence. Authentication is required via API keys. Live data updates multiple times per second during active market sessions.
Live Data API
Access real-time spread data with enhanced analytics, market intelligence, and streaming capabilities. Get live updates from active trading sessions with sub-second latency.
We deliver ultra-low latency price feeds with sub-millisecond performance available on request. Our competitive pricing is customized based on your specific requirements: number of symbols, tick frequency per symbol, custom liquidity pool configuration, plus server infrastructure and API costs. You can request this service from your dashboard anytime.
Live spreads data behaves differently based on market status. Your application MUST handle both open and closed market states properly to avoid errors and provide accurate information to users.
Base URL: https://api.broker-radar.com/private/v2
The fields you receive in API responses depend on your subscription level. Higher tiers provide more comprehensive market data and analytics.
{
"symbol": "EURUSD",
"bid": 1.08321,
"ask": 1.08324,
"spread": 0.00003,
"spread_points": 0.3,
"spread_raw": 0.00003,
"market_status": null,
"broker_name": "IC Markets",
"account_type": "Raw",
"source": "Broker-Radar.com Liquidity Solution",
"is_open": true
}
{
"symbol": "EURUSD.i",
"time": 1756511995,
"time_msc": 1756511995043,
"bid": 1.08321,
"ask": 1.08324,
"spread": 0.00003,
"spread_points": 0.3,
"spread_raw": 0.00003,
"swap_long": -10.289,
"swap_short": 3.765,
"contract_size": 100000,
"volume_min": 0.01,
"volume_max": 50,
"leverage": 500,
"digits": 5,
"point": 0.00001,
"margin_per_lot": 216.64,
"broker_name": "BlueBerry Markets",
"account_type": "Raw",
"source": "Broker-Radar.com Liquidity Solution",
"is_open": true
}
Live spreads data behaves differently based on market status. Your application MUST handle both open and closed market states properly to avoid errors and provide accurate information to users.
market_status
field is OMITTED (not present in response)market_status
field is PRESENT with specific labelsdigits
and point
remain numeric regardless of market statusmargin_per_lot
is omitted, but leverage
is still providedlast
, volume
(if enabled) also become strings when closedswap_long
, swap_short
, contract_size
may still be presenttypeof spread === 'number'
to verify numeric values// JavaScript - Market Status Detection
function processSpreadData(spreads) {
const openMarkets = [];
const closedMarkets = [];
spreads.forEach(spread => {
// Market is OPEN when market_status field is missing/undefined
if (!spread.market_status && typeof spread.spread === 'number') {
openMarkets.push({
...spread,
displaySpread: spread.spread_points + ' points',
displayBid: spread.bid.toFixed(spread.digits),
displayAsk: spread.ask.toFixed(spread.digits),
isOpen: true
});
} else {
// Market is CLOSED when market_status field is present
const statusMessages = {
'Rollover': 'Market temporarily closed for rollover',
'Weekend_Market_Closed': 'Markets closed for weekend',
'Early_Market_Closing': 'Market closed early today',
'Holiday_Market_Close': 'Markets closed for holiday'
};
closedMarkets.push({
...spread,
displayMessage: statusMessages[spread.market_status] || 'Market closed',
rawStatus: spread.market_status,
isOpen: false,
// digits and point are still numeric even when closed
digits: spread.digits,
point: spread.point
});
}
});
// Return open markets first, then closed
return [...openMarkets, ...closedMarkets];
}
// Example usage with proper type checking
function displaySpread(spread) {
if (!spread.market_status) {
// Market is open - safe to use numeric values
return `${spread.symbol}: ${spread.spread_points} points (Bid: ${spread.bid}, Ask: ${spread.ask})`;
} else {
// Market is closed - show status message
return `${spread.symbol}: Market closed (${spread.market_status})`;
}
}
/private/v2/spreads/live
- Get all live spreads with analytics/private/v2/spreads/live/best/[symbol]
- Find best spreads for symbol/private/v2/spreads/live/analytics
- Get market analytics & insights/private/v2/spreads/live/stream
- WebSocket streaming endpoint/private/v2/spreads/live/filter
- Advanced filtering & searchLive Spreads API requires authentication. API keys can only be obtained and managed through our user dashboard.
To obtain your API key, you'll need to access our user dashboard where you can:
Dashboard Coming Soon: The user dashboard is currently under development and will be available shortly.
All live spreads endpoints require API key authentication.Our API infrastructure is continuously enhanced to deliver optimal performance and reliability for professional trading applications.
For testing purposes, use the demo endpoint below which provides sample live data without authentication.
https://api.broker-radar.com/private/v2/spreads/live
🔒 Requires API Keyhttps://api.broker-radar.com/private/v2/spreads/live/best/EURUSD
🔒 Requires API Keyhttps://api.broker-radar.com/private/v2/spreads/live/analytics
🔒 Requires API KeyHere are code examples for integrating the Live Spreads API with authentication and error handling:
// Get live spreads with enhanced analytics
const API_KEY = 'your_api_key_here';
async function getLiveSpreads() {
try {
const response = await fetch('https://api.broker-radar.com/private/v2/spreads/live', {
headers: {
'X-API-Key': API_KEY,
'Content-Type': 'application/json'
}
});
const data = await response.json();
if (data.success) {
console.log('Live spreads:', data.data);
console.log('Market session:', data.data[0].enhanced_data.market_session);
console.log('Credits remaining:', data.usage.credits_remaining);
}
} catch (error) {
console.error('Error fetching live spreads:', error);
}
}
// Get best live spreads for a symbol
async function getBestLiveSpreads(symbol) {
const response = await fetch(`${baseUrl}/private/v2/spreads/live/best/${symbol}`, {
headers: { 'X-API-Key': API_KEY }
});
const data = await response.json();
console.log(`Best ${symbol} spread: ${data.best_spread} points`);
return data;
}
// WebSocket streaming for real-time updates
const ws = new WebSocket('wss://api.broker-radar.com/private/v2/spreads/live/stream');
ws.onopen = () => {
ws.send(JSON.stringify({
type: 'auth',
api_key: API_KEY
}));
// Subscribe to specific symbols
ws.send(JSON.stringify({
type: 'subscribe',
symbols: ['EURUSD', 'GBPUSD', 'USDJPY']
}));
};
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
if (data.type === 'spread_update') {
console.log('Live update:', data.spread);
}
};
Live Spreads API responses include enhanced analytics, market session data, and real-time status information. When markets are closed, you'll receive normalized status messages instead of numeric spread values:
{
"success": true,
"data": [
{
"symbol": "EURUSD",
"broker_name": "IC Markets",
"account_type": "Raw",
"time": 1693300000,
"time_msc": 1693300000123,
"bid": 1.08321,
"ask": 1.08324,
"spread": 0.00003,
"spread_points": 0.3,
"spread_raw": 3,
"digits": 5,
"point": 0.00001,
"margin_per_lot": 1083.21,
"leverage": 500
},
{
"symbol": "GBPJPY",
"broker_name": "Pepperstone",
"account_type": "Razor",
"time": 1693350000,
"time_msc": 1693350000123,
"bid": "Weekend_Market_Closed",
"ask": "Weekend_Market_Closed",
"spread": "Weekend_Market_Closed",
"spread_points": "Weekend_Market_Closed",
"spread_raw": "Weekend_Market_Closed",
"market_status": "Weekend_Market_Closed",
"digits": 3,
"point": 0.001,
"leverage": 200
}
],
"metadata": {
"total_records": 150,
"open_markets": 89,
"closed_markets": 61,
"cache_age": 1,
"data_source": "live_redis_stream"
},
"usage": {
"credits_used": 5,
"credits_remaining": 995,
"rate_limit": "300/min"
}
}
Need help? Check out our API homepage or contact our support team.