Forex
Major FX pairs and crosses as six-character symbols (e.g. EURUSD), priced as indicative OTC-style quotes.
Symbols
Pairs are six-letter codes such as EURUSD, GBPJPY and USDTRY; list the enabled ones with GET /forex/symbols (Symbols). A raw single-venue line is also served as SYMBOL.RAW, outside the symbol list: see Raw line.
Symbol list
Returns enabled FX pairs and crosses, sorted by symbol ascending.
Request
curl -sS "https://api.tickerlayer.com/forex/symbols" \
-H "x-api-key: <YOUR_API_KEY>"Response 200 OK
{
"symbols": [
{ "symbol": "EURUSD", "name": "Euro / United States Dollar" },
{ "symbol": "GBPUSD", "name": "British Pound / United States Dollar" }
]
}Latest quote
Bid and ask from the aggregated FX quote cache when present; otherwise resolved via the REST aggregation path for the pair.
Path parameters
symbol- Enabled forex pair (e.g. EURUSD). Six-character concatenated pair, trimmed and uppercased before lookup. Retrieve the full list from GET /forex/symbols.
Request
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
{
"symbol": "EURUSD",
"bid": 1.0522,
"ask": 1.0524,
"bid_size": 42,
"ask_size": 37,
"timestamp": 1743512400000
}Notes
404 unknown symbol if the pair is not in the enabled registry.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.
Path parameters
symbol- Enabled forex pair (e.g. EURUSD). Six-character concatenated pair, trimmed and uppercased before lookup. Retrieve the full list from GET /forex/symbols.
Request
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
{
"symbol": "EURUSD",
"price": 1.0523,
"size": 96,
"timestamp": 1743512400000
}Notes
size is number | null: it may occasionally be null when no lot size exists in the consolidated view.Snapshot
Combined bid/ask, last price, previous daily close, and derived change metrics in one normalized aggregated view.
Path parameters
symbol- Enabled forex pair (e.g. EURUSD). Six-character concatenated pair, trimmed and uppercased before lookup. Retrieve the full list from GET /forex/symbols.
Request
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
{
"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
}Notes
last_size appears when a trade size is available in the consolidated snapshot; otherwise it is omitted from the payload. change_percent is null when prev_close is zero or not yet available.Previous bar
Single most-recently completed UTC daily candle for the pair.
Path parameters
symbol- Enabled forex pair (e.g. EURUSD). Six-character concatenated pair, trimmed and uppercased before lookup. Retrieve the full list from GET /forex/symbols.
Query parameters
interval- Returns the most recently settled bar at that interval instead of the previous daily bar, and adds
interval,bar_start,bar_endandas_ofto the response. Leave it out for the daily bar.Values1m5m15m1h4h1d
Request
curl -sS "https://api.tickerlayer.com/forex/agg/EURUSD/prev" \
-H "x-api-key: <YOUR_API_KEY>"Response 200 OK
{
"symbol": "EURUSD",
"result": {
"o": 1.0500,
"h": 1.0528,
"l": 1.0488,
"c": 1.0523,
"v": 9820000000,
"t": 1733011200000
}
}Notes
404 no bar available when the daily bar cannot be resolved yet. A bar requested with ?interval= is held for a short settle lag after it closes, so small clock differences between callers do not change which bar comes back, and it is the same bar the range endpoint returns for that window. Cache-Control and ETag mark when the value can next change. While the market is closed the last real bar is returned, still labelled with its own bar_start.Aggregate bars (OHLCV)
Historical FX bars between two UTC calendar dates.
Path parameters
symbol- An enabled symbol of this asset class, for example
BTCUSDorUS:KO. Trimmed before lookup. multiplier- Bar size in units of
timespan:1,5or15withminute;1or4withhour;1withday. Other pairs return400, and the message lists the valid ones. timespan- Case-insensitive. Other values return
400.Valuesminutehourday from- First UTC date, inclusive, as
YYYY-MM-DD. to- Last UTC date, inclusive, as
YYYY-MM-DD. Not beforefrom.
Query parameters
limit- Page size, up to
5000.results_countis the size of this page andtotal_countthe bars in the whole range; follownext_offsetuntil it isnull.Default500 offset- Zero-based row offset, applied after sorting.Default
0 sort- Order of bars by timestamp
t, applied before pagination.ValuesascdescDefaultdesc
Request
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
{
"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
}Notes
- One request covers at most 31 days of 1-minute bars, 90 of 5-minute, 180 of 15-minute, 365 of hourly, 730 of 4-hour and 5000 of daily bars, counting
fromandtoas whole UTC days. A longer range returns400with the limit in the message. vmay occasionally be null when no consolidated volume is published for that interval.
WebSocket
Stream live quotes and trades for this asset class over the public WebSocket.
wss://stream.tickerlayer.com/?apiKey=<YOUR_API_KEY>Available channels
Subscribe example
After the connection is ready, send a JSON text frame:
{
"action": "subscribe",
"channels": [
"forex.quotes",
"forex.trades"
],
"symbols": [
"EURUSD",
"GBPUSD"
]
}Example message
{
"type": "quote",
"channel": "forex.quotes",
"asset": "forex",
"symbol": "EURUSD",
"bid": "1.08512",
"ask": "1.08518",
"bid_size": "1000000",
"ask_size": "1000000",
"ts": 1743512400000
}Timestamps
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.
General WebSocket documentation
For authentication, subscribe/unsubscribe lifecycle, errors, limits, and heartbeats, see the WebSocket overview, Subscriptions and Message types.
Raw line: SYMBOL.RAW
The default feed is consolidated across venues, which keeps it stable for pricing, oracles and risk. For charting, backtesting and anything that must look like a broker terminal, add .RAW to the pair: the same pairs as an unblended single-venue tick stream, every tick as the venue printed it, with real tick volume and no smoothing. Same key, channels and message shape.
{
"action": "subscribe",
"channels": ["forex.quotes", "forex.trades"],
"symbols": ["EURUSD.RAW", "GBPUSD.RAW", "XAUUSD.RAW"]
}- One venue
- Published as received: candles built from it match a raw-spread broker terminal, wicks included.
- Sizes
forex.tradescarries the venue tick volume insize; quotebid_sizeandask_sizearenull.- REST and history
- Also on
/forex/quote,/forex/trade/lastand/forex/snapshot. The aggregates endpoints accept.RAWtoo, with candles and tick volume from the same venue back to 2010. - Coverage
- The majors, the main crosses and emerging-market pairs, plus spot gold, silver, platinum and palladium. Still expanding: tell us if a pair you chart is missing.