DocsStocks

Stocks

Stocks supports US and international equities. Use market-qualified symbols in the same CC:SYMBOL format across REST and WebSocket—for example US:AAPL or DE:BMW.

Equity responses reflect a consolidated, normalized aggregated view across supported markets. All routes require an API key. Individual fields may be optional depending on market conditions; see each route for response details.

Authx-api-key headerBase path/stocksWebSocketstocks.quotes · stocks.tradesSymbol formatUS:AAPL · DE:BMW · TR:THYAO

/stocks covers quotes, last trade, snapshots, and OHLCV for supported equities. For real-time streaming, use stocks.quotes and stocks.trades with the same market-qualified symbol format.

Symbol format

Stocks uses market-qualified symbols across REST and WebSocket.

Format
CC:SYMBOL
Examples
US:AAPLDE:BMWES:IBETR:THYAOSA:2222
Discovery
Symbols referenceGET /stocks/symbols
Market filter
?market=USoptional — any two-letter market code

CC is a two-letter ISO-style market code; SYMBOL is the listing ticker. Plain tickers without a prefix are rejected. Omit market on list calls to return all markets enabled on your account. Path examples use a literal colon; some HTTP clients encode it automatically.

Available markets

Symbols use CC: prefixes (for example US:AAPL, DE:BMW, TR:THYAO, ES:IBE, SA:2222). Live now covers markets available under standard coverage; the extended catalog can be enabled for your account. See what you have with GET /stocks/symbols.

Live nowAvailable under standard coverage
  • Argentina
  • Brazil
  • China
  • Germany
  • Hong Kong
  • India
  • Italy
  • Japan
  • Mexico
  • Saudi Arabia
  • South Korea
  • Spain
  • Taiwan
  • Thailand
  • Turkey
  • United States
Extended catalogAdditional country markets available for your account
  • Australia
  • Austria
  • Belgium
  • Botswana
  • Canada
  • Chile
  • Colombia
  • Czech Republic
  • Denmark
  • Egypt
  • Estonia
  • Finland
  • France
  • Greece
  • Hungary
  • Iceland
  • Indonesia
  • Ireland
  • Israel
  • Jamaica
  • Kuwait
  • Latvia
  • Lithuania
  • Malaysia
  • Netherlands
  • New Zealand
  • Pakistan
  • Peru
  • Philippines
  • Poland
  • Portugal
  • Qatar
  • Romania
  • Russia
  • Singapore
  • South Africa
  • Sweden
  • Switzerland
  • United Arab Emirates
  • United Kingdom
  • Venezuela
Latency can vary by market and entitlement (real-time vs delayed). When an extended market is enabled for your account, its symbols appear in GET /stocks/symbols alongside live coverage.

New US listings

We track new US listings continuously. Once a new symbol passes review it becomes available across REST and WebSocket, and it appears on any active US:* stream automatically — no re-subscribe needed.

GET/stocks/quote/:symbol

Latest quote

Best bid and ask from the aggregated quote cache when present; otherwise resolved via the REST aggregation path for the symbol.

ParameterTypeDescription
symbolreqstringMarket-qualified symbol (CC:SYMBOL, e.g. US:AAPL, DE:BMW, TR:THYAO). Plain tickers are rejected. Discover enabled rows via GET /stocks/symbols (optional ?market=CC filter).
curl -sS "https://api.tickerlayer.com/stocks/quote/US:AAPL" \
  -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": "US:AAPL",
  "bid": 214.22,
  "ask": 214.25,
  "bid_size": 1200,
  "ask_size": 800,
  "timestamp": 1743512400000
}
400 invalid stock symbol; expected MARKET:BASE (example: US:AAPL) when the path is not market-qualified. 404 unknown symbol if the symbol is not in the enabled registry. 503 market data temporarily unavailable when lookup fails with no serviceable quote.
GET/stocks/trade/last/:symbol

Last trade

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

ParameterTypeDescription
symbolreqstringMarket-qualified symbol (CC:SYMBOL, e.g. US:AAPL, DE:BMW, TR:THYAO). Plain tickers are rejected. Discover enabled rows via GET /stocks/symbols (optional ?market=CC filter).
curl -sS "https://api.tickerlayer.com/stocks/trade/last/US:AAPL" \
  -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": "US:AAPL",
  "price": 214.23,
  "size": 400,
  "timestamp": 1743512400000
}
404 no trade available when no consolidated trade exists yet. size may occasionally be null after a quote-only fallback—see intro.
GET/stocks/snapshot/:symbol

Market snapshot

Combined bid/ask, last trade price, previous daily close, and derived change metrics in a single call.

ParameterTypeDescription
symbolreqstringMarket-qualified symbol (CC:SYMBOL, e.g. US:AAPL, DE:BMW, TR:THYAO). Plain tickers are rejected. Discover enabled rows via GET /stocks/symbols (optional ?market=CC filter).
curl -sS "https://api.tickerlayer.com/stocks/snapshot/US:AAPL" \
  -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": "US:AAPL",
  "bid": 214.22,
  "ask": 214.25,
  "bid_size": 1200,
  "ask_size": 800,
  "last_price": 214.23,
  "last_size": 400,
  "last_timestamp": 1743512400000,
  "prev_close": 212.10,
  "change": 2.13,
  "change_percent": 1.004
}
last_size is present only when a native trade size is available. change_percent is null when prev_close is zero or unavailable. An all-null snapshot returns 404.
GET/stocks/agg/:symbol/:multiplier/:timespan/:from/:to

Aggregates — OHLCV range

Historical OHLCV bars between two UTC calendar dates (inclusive). Results are sorted then paginated. next_offset is null when exhausted.

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/stocks/agg/US:AAPL/1/day/2025-11-01/2025-11-30?sort=desc&limit=2" \
  -H "x-api-key: <YOUR_API_KEY>"

Response 200 OK

JSON
{
  "symbol": "US:AAPL",
  "results_count": 2,
  "results": [
    { "o": 228.5, "h": 230.8, "l": 227.9, "c": 229.4, "v": 52000000, "t": 1733011200000 },
    { "o": 226.0, "h": 228.9, "l": 225.5, "c": 228.5, "v": 48000000, "t": 1732924800000 }
  ],
  "next_offset": 2
}
  • Valid pairs: 1, 5, 15 / minute; 1, 4 / hour; 1 / day.
  • v may occasionally be null per bar when no consolidated volume exists for that interval—see intro.
  • results_count is page length, not total rows available.
GET/stocks/agg/:symbol/prev

Previous completed daily bar

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

ParameterTypeDescription
symbolreqstringMarket-qualified symbol (CC:SYMBOL, e.g. US:AAPL, DE:BMW, TR:THYAO). Plain tickers are rejected. Discover enabled rows via GET /stocks/symbols (optional ?market=CC filter).
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/stocks/agg/US:AAPL/prev" \
  -H "x-api-key: <YOUR_API_KEY>"

Response 200 OK

JSON
{
  "symbol": "US:AAPL",
  "result": {
    "o": 228.5,
    "h": 230.8,
    "l": 227.9,
    "c": 229.4,
    "v": 52000000,
    "t": 1733011200000
  }
}
404 no bar available when the daily bar cannot be resolved yet. Pass ?interval= (1m, 5m, 15m, 1h, 4h, 1d) for the most recently settled bar at that interval instead; the response then also carries interval, bar_start, bar_end and as_of. While the market is closed the last real bar is returned, still labelled with its own bar_start.

WebSocket Streaming

Stream live quotes and trades for this asset class over the public WebSocket.

Connect
wss://stream.tickerlayer.com/?apiKey=<YOUR_API_KEY>

Available channels

Quotesstocks.quotesTradesstocks.trades

Subscribe example

After the connection is ready, send a JSON text frame:

Subscribe
{
  "action": "subscribe",
  "channels": [
    "stocks.quotes",
    "stocks.trades"
  ],
  "symbols": [
    "US:AAPL",
    "DE:BMW"
  ]
}

Example message

stocks.quotes
{
  "type": "quote",
  "channel": "stocks.quotes",
  "asset": "stocks",
  "symbol": "US:AAPL",
  "bid": "189.12",
  "ask": "189.18",
  "bid_size": "100",
  "ask_size": "200",
  "ts": 1743512400000
}

For US stock trade subscriptions, you can optionally set trade_mode to full_volume to receive every volume-eligible execution instead of only the price-forming ones. Subscriptions without trade_mode are unaffected.

Optional — US stocks.trades full_volume
{
  "action": "subscribe",
  "channel": "stocks.trades",
  "symbols": ["US:SPCX"],
  "trade_mode": "full_volume"
}

Messages in this mode carry one additional field, ohlc:

  • "ohlc": 1 — apply the trade to a candle's open/high/low/close
  • "ohlc": 0 — count the trade toward volume only

Not every execution that adds to volume is used to price a candle. The flag tells you which is which, so you do not have to classify trades yourself.

Message — US stocks.trades with full_volume
{
  "type": "trade",
  "channel": "stocks.trades",
  "asset": "stocks",
  "symbol": "US:SPCX",
  "price": "111.56",
  "size": "37",
  "ts": 1785342925003,
  "ohlc": 0
}

The field is only present when trade_mode is set. Expect a noticeably higher message rate in this mode.

Whole-market streaming (US:*) — Enterprise

Instead of listing thousands of symbols, subscribe to an entire market with a single token: "symbols": ["US:*"] on stocks.quotes / stocks.trades. Newly listed symbols join your stream automatically — no re-subscribe, no reconnect.

Enterprise — whole US market with one token
{
  "action": "subscribe",
  "channels": ["stocks.quotes", "stocks.trades"],
  "symbols": ["US:*"]
}

This capability is not enabled by default on any account. If your use case needs the whole market, talk to us and we will enable it for your account.

General WebSocket documentation

For authentication, subscribe/unsubscribe lifecycle, errors, limits, and heartbeats, see the WebSocket overview and Subscriptions.