TickAtlas

Spread Analysis

Spread is the primary execution cost in FX and CFD trading. These endpoints deliver real-time and historical spread statistics -- including per-session breakdowns -- so algorithmic traders can quantify costs, compare instruments, and time entries for optimal execution.

GET /v1/spread Standard (1x)

Single Symbol Spread

Returns the current live spread, historical statistics over a configurable period, and average spread broken down by trading session (Asian, London, New York).

Parameters

Parameter Type Required Description
symbolstringYesTrading symbol (e.g., EURUSD, XAUUSD)
periodstringNoAnalysis period: 1h, 24h, 7d, 30d (default: 24h)

Example Request

cURL
curl -H "X-API-Key: YOUR_API_KEY" \
  "https://tickatlas.com/v1/spread?symbol=EURUSD&period=24h"

Success Response

200 OK
{
  "success": true,
  "data": {
    "symbol": "EURUSD",
    "current": {
      "spread_pips": 1.2,
      "spread_points": 12
    },
    "statistics": {
      "period": "24h",
      "avg_spread": 1.4,
      "min_spread": 0.8,
      "max_spread": 3.2,
      "std_deviation": 0.45
    },
    "by_session": {
      "asian": 1.8,
      "london": 1.1,
      "new_york": 1.3
    }
  }
}

Response Fields

Field Description
current.spread_pipsLive spread in pips (1 pip = 10 points for 5-digit brokers)
current.spread_pointsLive spread in raw broker points
statistics.avg_spreadMean spread in pips over the requested period
statistics.min_spreadTightest spread observed in the period
statistics.max_spreadWidest spread observed (useful for slippage modeling)
statistics.std_deviationStandard deviation in pips -- quantifies spread volatility
by_session.*Average spread in pips during each trading session (null if no data)

Python Example

Python
import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://tickatlas.com"

# Single symbol spread analysis
resp = requests.get(
    f"{BASE_URL}/v1/spread",
    headers={"X-API-Key": API_KEY},
    params={"symbol": "EURUSD", "period": "24h"}
)
data = resp.json()

spread = data["data"]
print(f"Current spread: {spread['current']['spread_pips']} pips")
print(f"24h average:    {spread['statistics']['avg_spread']} pips")

# Session breakdown — find optimal entry time
for session, avg in spread["by_session"].items():
    print(f"  {session}: {avg} pips avg")

JavaScript Example

JavaScript
const API_KEY = "YOUR_API_KEY";
const BASE_URL = "https://tickatlas.com";

// Single symbol spread
const res = await fetch(
  `${BASE_URL}/v1/spread?symbol=EURUSD&period=24h`,
  { headers: { "X-API-Key": API_KEY } }
);
const { data } = await res.json();
console.log(`Current: ${data.current.spread_pips} pips`);
console.log(`Avg:     ${data.statistics.avg_spread} pips`);
GET /v1/spread/compare Standard (1x)

Cross-Symbol Spread Comparison

Compare spread statistics across up to 20 symbols in a single request. Results are sorted by average spread ascending (tightest first), making it straightforward to identify the cheapest instruments to trade.

Parameters

Parameter Type Required Description
symbolsstringYesComma-separated trading symbols (max 20)
periodstringNoAnalysis period: 1h, 24h, 7d, 30d (default: 24h)

Example Request

cURL
curl -H "X-API-Key: YOUR_API_KEY" \
  "https://tickatlas.com/v1/spread/compare?symbols=EURUSD,GBPUSD,USDJPY&period=24h"

Success Response

200 OK
{
  "success": true,
  "data": {
    "period": "24h",
    "symbols": [
      {
        "symbol": "EURUSD",
        "current_pips": 1.2,
        "avg_pips": 1.4,
        "min_pips": 0.8,
        "max_pips": 3.2,
        "has_live_data": true
      },
      {
        "symbol": "GBPUSD",
        "current_pips": 1.5,
        "avg_pips": 1.7,
        "min_pips": 1.0,
        "max_pips": 4.1,
        "has_live_data": true
      },
      {
        "symbol": "USDJPY",
        "current_pips": 1.8,
        "avg_pips": 2.1,
        "min_pips": 1.2,
        "max_pips": 5.6,
        "has_live_data": true
      }
    ],
    "count": 3
  }
}

The has_live_data flag indicates whether the symbol currently has a live price feed. When false, the current_pips field will be null and only historical statistics are returned.

Python Example

Python
# Compare spreads across symbols
resp = requests.get(
    f"{BASE_URL}/v1/spread/compare",
    headers={"X-API-Key": API_KEY},
    params={"symbols": "EURUSD,GBPUSD,USDJPY,AUDUSD", "period": "7d"}
)
comparison = resp.json()

# Results sorted tightest-first
for sym in comparison["data"]["symbols"]:
    live = "LIVE" if sym["has_live_data"] else "STALE"
    print(f"{sym['symbol']}: avg {sym['avg_pips']} pips [{live}]")

JavaScript Example

JavaScript
// Compare multiple symbols
const symbols = ["EURUSD", "GBPUSD", "USDJPY", "AUDUSD"];
const cmpRes = await fetch(
  `${BASE_URL}/v1/spread/compare?symbols=${symbols.join(",")}&period=24h`,
  { headers: { "X-API-Key": API_KEY } }
);
const cmpData = await cmpRes.json();
// Sorted tightest spread first
cmpData.data.symbols.forEach(s =>
  console.log(`${s.symbol}: ${s.avg_pips} pips avg`)
);

Trading Session Breakdown

The by_session object in the single-symbol endpoint breaks average spread into three major trading sessions. Because liquidity varies dramatically across sessions, this data helps traders time entries to minimize execution cost.

Session Hours (UTC) Characteristics
Asian 00:00 - 08:00 UTC Lower liquidity, wider spreads on major pairs
London 08:00 - 16:00 UTC Peak liquidity, typically the tightest spreads
New York 13:00 - 21:00 UTC High volume; overlaps with London 13:00-16:00

Note the London-New York overlap (13:00-16:00 UTC). This window typically produces the tightest spreads due to combined liquidity from both sessions. For scalping strategies where spread is a significant portion of expected profit, entering during this overlap can materially improve performance.

Use Cases

Execution Cost Optimization

Use the session breakdown to identify the lowest-cost windows for trade execution. Combine with std_deviation to assess spread stability -- a low average with high deviation means costs are unpredictable.

Broker Comparison

If you ingest data from multiple broker terminals connected to different brokers, the compare endpoint lets you benchmark spread quality across brokers for the same instrument.

Session-Aware Trading

Build logic that avoids trading during high-spread sessions. For example, a EURUSD scalper might restrict execution to London hours where the session average is consistently below 1.2 pips.

Spread Alerts

Poll the single-symbol endpoint periodically and trigger alerts when the live spread exceeds a threshold (e.g., max_spread from the 7d window). Unusual spread widening often signals low liquidity or upcoming volatility events.