DocsForex

Forex REST endpoints

Indicative OTC-style FX pairs under /forex: discovery, quotes, last trade, snapshots, and aggregates.

Authx-api-key headerBase path/forexWebSocketforex.quotes, forex.tradesSymbol formatSix-letter pairs (e.g. EURUSD, GBPJPY, USDTRY)
Forex endpoints provide indicative OTC-style pricing for supported currency pairs. Sidebar Asset Classes entry: Forex product docs (same contract). Responses use a consistent REST shape with bid, ask, timestamp, and quote-size fields.

Symbol coverage

Pairs are six-character concatenations such as EURUSD, GBPJPY, and USDTRY. Retrieve the enabled list with GET /forex/symbols (also documented under Symbols → Forex). A raw, single-venue tick line is also served under SYMBOL.RAW (for example EURUSD.RAW) on the quote, trade and snapshot endpoints: no consolidation, no smoothing, quote sizes null, historical candles from the same venue. It is not part of the symbol list; see Forex → Raw line.

GET/forex/symbols

Forex symbol list

Returns enabled FX pairs and crosses, sorted by symbol ascending.

curl -sS "https://api.tickerlayer.com/forex/symbols" \
  -H "x-api-key: <YOUR_API_KEY>"

Response 200 OK

JSON
{
  "symbols": [
    { "symbol": "EURUSD", "name": "Euro / United States Dollar" },
    { "symbol": "GBPUSD", "name": "British Pound / United States Dollar" }
  ]
}
GET/forex/quote/:symbol

Latest quote

Bid and ask from the aggregated FX quote cache when present; otherwise resolved via the REST aggregation path for the pair.

ParameterTypeDescription
symbolreqstringEnabled forex pair (e.g. EURUSD). Six-character concatenated pair, trimmed and uppercased before lookup.
curl -sS "https://api.tickerlayer.com/forex/quote/EURUSD" \
  -H "x-api-key: <YOUR_API_KEY>"

Send runs against the live API with your account key (never exposed in the browser).

Response 200 OK

JSON
{
  "symbol": "EURUSD",
  "bid": 1.0522,
  "ask": 1.0524,
  "bid_size": 42,
  "ask_size": 37,
  "timestamp": 1743512400000
}
404 unknown symbol if the pair is not in the enabled registry.
GET/forex/trade/last/:symbol

Last trade

Most recent trade from the aggregated tape when present; when the tape snapshot is empty, price and timestamp fall back to the consolidated quote mid.

ParameterTypeDescription
symbolreqstringEnabled forex pair (e.g. EURUSD). Six-character concatenated pair, trimmed and uppercased before lookup.
curl -sS "https://api.tickerlayer.com/forex/trade/last/EURUSD" \
  -H "x-api-key: <YOUR_API_KEY>"

Send runs against the live API with your account key (never exposed in the browser).

Response 200 OK

JSON
{
  "symbol": "EURUSD",
  "price": 1.0523,
  "size": 96,
  "timestamp": 1743512400000
}
For FX, size is number | null: it may occasionally be null when no lot size exists in the consolidated view.
GET/forex/snapshot/:symbol

Market snapshot

Combined bid/ask, last price, previous daily close, and change metrics in one normalized aggregated view.

ParameterTypeDescription
symbolreqstringEnabled forex pair (e.g. EURUSD). Six-character concatenated pair, trimmed and uppercased before lookup.
curl -sS "https://api.tickerlayer.com/forex/snapshot/EURUSD" \
  -H "x-api-key: <YOUR_API_KEY>"

Send runs against the live API with your account key (never exposed in the browser).

Response 200 OK

JSON
{
  "symbol": "EURUSD",
  "bid": 1.0522,
  "ask": 1.0524,
  "bid_size": 42,
  "ask_size": 37,
  "last_price": 1.0523,
  "last_timestamp": 1743512400000,
  "prev_close": 1.0480,
  "change": 0.0043,
  "change_percent": 0.4103
}
last_size is included when a trade size is available in the consolidated snapshot; otherwise the field is omitted. change_percent is null when prev_close is zero or unavailable.
GET/forex/agg/:symbol/prev

Previous completed daily bar

Single most-recently completed UTC daily candle for the pair.

ParameterTypeDescription
symbolreqstringEnabled forex pair (e.g. EURUSD). Six-character concatenated pair, trimmed and uppercased before lookup.
ParameterTypeDescription
intervalstringOptional. 1m · 5m · 15m · 1h · 4h · 1d. Returns the most recently settled bar at that interval instead of the previous daily bar, and adds interval, bar_start, bar_end and as_of to the response. Omit for the daily bar.
curl -sS "https://api.tickerlayer.com/forex/agg/EURUSD/prev" \
  -H "x-api-key: <YOUR_API_KEY>"

Response 200 OK

JSON
{
  "symbol": "EURUSD",
  "result": {
    "o": 1.0500,
    "h": 1.0528,
    "l": 1.0488,
    "c": 1.0523,
    "v": 9820000000,
    "t": 1733011200000
  }
}
Returns 404 no bar available when the daily bar cannot be resolved yet. With ?interval= the response is the most recently settled bar at that interval. The bar is held for a short settle lag after it closes, so the boundary sits away from the round minute and small clock differences between callers do not change which bar comes back. It is the same bar the historical range endpoint returns for that window, so an audit can re-fetch that exact window and compare against the same source. The response then also carries interval, bar_start, bar_end and as_of, and Cache-Control plus ETag mark exactly when the value can next change. While the market is closed the last real bar is returned, still labelled with its own bar_start.
GET/forex/agg/:symbol/:multiplier/:timespan/:from/:to

Aggregates — OHLCV range

Historical FX bars between two UTC calendar dates. Same interval rules, date format, and pagination structure as crypto and stocks.

ParameterTypeDescription
symbolreqstringEnabled public symbol for the asset: crypto pairs like BTCUSD; stocks use CC:SYMBOL (e.g. US:AAPL). Trimmed before lookup.
multiplierreqnumberInterval multiplier. Valid pairs: 1, 5, 15 with minute; 1, 4 with hour; 1 with day.
timespanreqstringminute · hour · day — case-insensitive. Other values return 400.
fromreqstringUTC date start, inclusive. Format: YYYY-MM-DD.
toreqstringUTC date end, inclusive. Format: YYYY-MM-DD. Must be ≥ from.
ParameterTypeDescription
limitnumberPage size. Default 500, max 5000.
offsetnumberZero-based row offset applied after sort. Default 0.
sortstringSort bars by timestamp t before pagination. asc or desc (default desc).
curl -sS "https://api.tickerlayer.com/forex/agg/EURUSD/1/day/2025-11-01/2025-11-30?sort=desc&limit=2" \
  -H "x-api-key: <YOUR_API_KEY>"

Response 200 OK

JSON
{
  "symbol": "EURUSD",
  "results_count": 2,
  "results": [
    { "o": 1.0500, "h": 1.0528, "l": 1.0488, "c": 1.0523, "v": 9820000000, "t": 1733011200000 },
    { "o": 1.0475, "h": 1.0505, "l": 1.0460, "c": 1.0500, "v": 8750000000, "t": 1732924800000 }
  ],
  "next_offset": 2
}
  • v may occasionally be null when no consolidated volume is published for that interval.
  • Same supported intervals and max calendar windows as crypto aggregates.

WebSocket

Subscribe to forex.quotes and forex.trades for streaming updates. Every frame carries a millisecond ts that is strictly increasing per symbol within its channel, so two ticks never share a timestamp and clients can sort or de-duplicate on it safely. See the WebSocket overview, Subscriptions, and Message types.