DocsCrypto

Crypto REST endpoints

Normalized spot-style crypto pairs under /crypto: discovery, quotes, trades, snapshots, and aggregates.

Authx-api-key headerBase path/cryptoWebSocketcrypto.quotes, crypto.tradesSymbol formatCompact pairs (e.g. BTCUSD, ETHUSD)
Crypto endpoints provide normalized spot-style quotes and trades for supported pairs. Responses use compact symbols such as BTCUSD and ETHUSD. Sidebar Asset Classes entry: Crypto product docs (same contract).

Symbol coverage

Symbols are compact pairs such as BTCUSD and ETHUSD. List enabled symbols with GET /crypto/symbols (see Symbols → Crypto).

GET/crypto/symbols

Crypto symbol list

Returns enabled crypto spot symbols with display names and a "crypto" type discriminator; sorted for stable discovery.

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

Response 200 OK

JSON
{
  "data": [
    { "symbol": "BTCUSD", "name": "Bitcoin / USD", "type": "crypto" },
    { "symbol": "ETHUSD", "name": "Ethereum / USD", "type": "crypto" }
  ],
  "count": 2
}
Legacy GET /symbols merges crypto, forex, commodities, ETFs, and indices — not stocks. Prefer GET /crypto/symbols for crypto-only discovery.
GET/crypto/quote/:symbol

Latest quote

Best bid and ask with sizes from the latest normalized book snapshot for the symbol.

ParameterTypeDescription
symbolreqstringEnabled crypto symbol (e.g. BTCUSD). Trimmed and uppercased before lookup.
curl -sS "https://api.tickerlayer.com/crypto/quote/BTCUSD" \
  -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": "BTCUSD",
  "bid": 84210.12,
  "ask": 84210.45,
  "bid_size": 1.2,
  "ask_size": 0.8,
  "timestamp": 1743512400000
}
404 unknown symbol — symbol is not in the enabled registry. 404 no quote available — cache has no quote yet for this symbol.
GET/crypto/trade/last/:symbol

Last trade

Most recent executed trade price and size from the in-memory trade cache.

ParameterTypeDescription
symbolreqstringEnabled crypto symbol (e.g. BTCUSD). Trimmed and uppercased before lookup.
curl -sS "https://api.tickerlayer.com/crypto/trade/last/BTCUSD" \
  -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": "BTCUSD",
  "price": 84215.42,
  "size": 0.53,
  "timestamp": 1743512400000
}
Returns 404 no trade available when no trade has been ingested for that symbol yet.
GET/crypto/snapshot/:symbol

Market snapshot

Combined view: latest bid/ask, last trade, previous daily close, and change metrics in one normalized aggregated snapshot.

ParameterTypeDescription
symbolreqstringEnabled crypto symbol (e.g. BTCUSD). Trimmed and uppercased before lookup.
curl -sS "https://api.tickerlayer.com/crypto/snapshot/BTCUSD" \
  -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": "BTCUSD",
  "bid": 84210.12,
  "ask": 84210.45,
  "bid_size": 1.2,
  "ask_size": 0.8,
  "last_price": 84215.42,
  "last_size": 0.53,
  "last_timestamp": 1743512400000,
  "prev_close": 83800.10,
  "change": 415.32,
  "change_percent": 0.4956
}
  • change and change_percent use last trade vs previous close; either may be null when inputs are not available in the aggregated view.
  • If prev_close is 0, change_percent is null to avoid division by zero.
  • An all-null snapshot returns 404.
GET/crypto/agg/:symbol/prev

Previous completed daily bar

Single most-recently completed UTC daily candle for the symbol from the aggregated daily interval pipeline.

ParameterTypeDescription
symbolreqstringEnabled crypto symbol (e.g. BTCUSD). 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/crypto/agg/BTCUSD/prev" \
  -H "x-api-key: <YOUR_API_KEY>"

Response 200 OK

JSON
{
  "symbol": "BTCUSD",
  "result": {
    "o": 83100,
    "h": 84200,
    "l": 82950,
    "c": 83800.10,
    "v": 1200.5,
    "t": 1730419200000
  }
}
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/crypto/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 points to the next page or 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/crypto/agg/BTCUSD/1/day/2025-11-01/2025-11-30?sort=desc&limit=3" \
  -H "x-api-key: <YOUR_API_KEY>"

Response 200 OK

JSON
{
  "symbol": "BTCUSD",
  "results_count": 3,
  "results": [
    { "o": 83100, "h": 84200, "l": 82950, "c": 83800.10, "v": 1200.5, "t": 1730419200000 },
    { "o": 82500, "h": 83200, "l": 82100, "c": 83100,    "v": 980.2,  "t": 1730332800000 },
    { "o": 81900, "h": 82700, "l": 81500, "c": 82500,    "v": 1100.8, "t": 1730246400000 }
  ],
  "next_offset": 3
}
  • Unsupported multiplier/timespan pairs return 400 with a list of valid combinations in the message.
  • Maximum calendar span per request: 31 days for 1/minute, 90 for 5/minute, 180 for 15/minute, 365 for 1/hour, 730 for 4/hour and 5000 for 1/day bars. A longer window returns 400 with the limit in the message.
  • results_count is the page length, not the total rows available.

WebSocket

Subscribe to crypto.quotes and crypto.trades for streaming updates. See the WebSocket overview, Subscriptions, and Message types.