Quickstart
Issue a key and make your first REST call in a few minutes, then stream over WebSocket on a paid plan or a trial.
Get an API key
Sign up (verify your email if asked), then open Dashboard → API key and reveal the key to copy it. If an older key cannot be revealed, keep using your saved copy or contact support before replacing it.
Authenticate
Surface Send the key as REST x-api-key: <YOUR_API_KEY>header on every requestWebSocket wss://stream.tickerlayer.com/?apiKey=<YOUR_API_KEY>on the upgrade URL (Connection)Servers, native apps, curl and Postman need nothing more. A browser app can call REST only from an approved origin: contact us to allowlist your domain. Full guide: Authentication.
Make your first REST call
The latest BTC/USD quote:
curl -sS "https://api.tickerlayer.com/crypto/quote/BTCUSD" \ -H "x-api-key: <YOUR_API_KEY>"Response 200{ "symbol": "BTCUSD", "bid": 84210.12, "ask": 84210.45, "bid_size": 1.2, "ask_size": 0.8, "timestamp": 1743512400000 }Open a WebSocket
WebSocket comes with the Individual and Business plans (Perpetuals streams on Business). On the Free plan the connection is refused with
403andWS_NOT_INCLUDED; request a 7-day trial from the dashboard, under Plan & access.Connect, wait for the
readyframe, then subscribe. The first frame is always{ "type": "system", "event": "ready", "ts": <unix_ms> }.Node.jsconst key = "<YOUR_API_KEY>"; const ws = new WebSocket( "wss://stream.tickerlayer.com/?apiKey=" + encodeURIComponent(key) ); ws.addEventListener("message", (ev) => { const msg = JSON.parse(String(ev.data)); if (msg.type === "system" && msg.event === "ready") { ws.send(JSON.stringify({ action: "subscribe", channels: ["crypto.quotes"], symbols: ["BTCUSD"], })); return; } console.log(msg); // quote | trade | system | error });
Next steps
- Data feedsStocks, forex, crypto, indices, ETFs, commodities, bonds and perpetuals.
- SymbolsList the symbols your key can read.
- SubscriptionsChannels, snapshots and subscribe limits.
- Message typesEvery frame the stream sends, field by field.
- Rate limitsMonthly quotas, per-second limits and 429 responses.
- ErrorsStatus codes and error bodies.