Live
Live Spreads API

Live Spreads API

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

Live Spreads API Documentation

Access real-time spread data with enhanced analytics, market intelligence, and streaming capabilities. Get live updates from active trading sessions with sub-second latency.

SUB-MILLISECOND PRICE FEEDS

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.

Step 1: Understanding Market Status & Live Data Handling

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

API Response Fields by Subscription Level

The fields you receive in API responses depend on your subscription level. Higher tiers provide more comprehensive market data and analytics.

BASIC
Essential Trading Data
Core price data with spread metrics and market status - perfect for basic spread monitoring and simple trading applications.
Basic API Response Fields:
{ "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 - Currency pair or instrument
bid/ask - Current market prices
spread/spread_points/spread_raw - Price difference metrics
market_status - Market session state
source/is_open - Data provider and market status
FULL ACCESS
Complete Market Intelligence
Comprehensive market data with advanced analytics, swap rates, contract specifications, and real-time market status.
Full Access API Response Fields:
{ "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 }
time/time_msc - Timestamps
spread_points/raw - Spread metrics
market_status - Session state
swap_long/short - Overnight rates
contract_size - Lot specifications
volume_min/max - Trading limits
leverage - Maximum leverage
digits/point - Price precision
source - Data provider info
is_open - Market status flag

Full Access Live Data Visualization

ETHUSD
Open
BlueBerry Markets
Raw Account
BID
4363.14
ASK
4366.02
SPREAD (Points)
288
MARGIN/LOT
17.47
Leverage:1:250
Contract:1
Min Vol:0.01
Max Vol:100
Swap Long:-3.679
Swap Short:-2.416
Digits:2
Point:0.01
Source: Broker-Radar.com Liquidity Solution
Note: Field availability depends on your subscription tier and market conditions. Upgrade your subscription directly from your dashboard with automatic payments for access to advanced market data and analytics.

Critical: Market Status Handling

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 Detection & Data Structure:

OPEN
Active Trading Session
Key indicator: market_status field is OMITTED (not present in response)
All price fields are numeric: bid, ask, spread, spread_points, spread_raw
Example: EURUSD with bid 1.08321, ask 1.08324, spread 0.3 points
CLOSED
Market Closed States
Key indicator: market_status field is PRESENT with specific labels
All price fields become strings with the same label as market_status
Rollover
- Outside daily session (weekday), routine off-hours
Example: All price fields show "Rollover" text,"bid":"Rollover","ask":"Rollover"
Weekend_Market_Closed
- Saturday/Sunday, or Friday after final session end
Example: "bid":"Weekend_Market_Closed","ask":"Weekend_Market_Closed"
Early_Market_Closing
- Inside scheduled session but quotes stopped early
Example: "bid":"Early_Market_Closing","ask":"Early_Market_Closing"
Holiday_Market_Close
- No quotes for the whole session day (e.g., holiday)
Example: "bid":"Holiday_Market_Close","ask":"Weekend_Market_Closed"

Important Data Behavior:

Always numeric: digits and point remain numeric regardless of market status
When market closed: margin_per_lot is omitted, but leverage is still provided
Optional fields: last, volume (if enabled) also become strings when closed
Metadata fields: swap_long, swap_short, contract_size may still be present

Implementation Guidelines:

Check for market_status field presence - if missing, market is open
Type checking: Use typeof spread === 'number' to verify numeric values
User experience: Convert raw status strings to user-friendly messages
Sorting: Display open markets first, then closed markets with status indicators

Code Examples - Correct Status Detection:

// 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})`;
  }
}

Available Live Spreads Endpoints:

GET
/private/v2/spreads/live- Get all live spreads with analytics
GET
/private/v2/spreads/live/best/[symbol]- Find best spreads for symbol
GET
/private/v2/spreads/live/analytics- Get market analytics & insights
GET
/private/v2/spreads/live/stream- WebSocket streaming endpoint
GET
/private/v2/spreads/live/filter- Advanced filtering & search

Step 2: Get Your API Key

Live Spreads API requires authentication. API keys can only be obtained and managed through our user dashboard.

Dashboard Access Required

To obtain your API key, you'll need to access our user dashboard where you can:

  • Generate new API keys
  • Manage existing keys
  • Monitor usage and billing
  • Upgrade subscription tiers

Dashboard Coming Soon: The user dashboard is currently under development and will be available shortly.

Step 3: Try Live Spreads API

Development Notice

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 Key
https://api.broker-radar.com/private/v2/spreads/live/best/EURUSD🔒 Requires API Key
https://api.broker-radar.com/private/v2/spreads/live/analytics🔒 Requires API Key

Step 4: Integration Examples

Here are code examples for integrating the Live Spreads API with authentication and error handling:

JavaScript
// 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);
  }
};

Step 5: Understanding Live Spreads Response

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:

JSON
{
  "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.