Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
DocsAuthentication

Authentication

Unlike REST, the public WebSocket does not read x-api-key headers on data frames. Authentication happens exactly once during the HTTP upgrade.

Open .md

How it works

Pass your raw API key as the apiKey query parameter on the upgrade URL. The server checks it for the ws surface before completing the 101 handshake. This is native WebSocket: no Socket.IO namespace, no handshake object and no in-frame authentication step.

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

Case-sensitive parameter name

It must be exactly apiKey. Other spellings such as api_key or APIKEY are rejected with 401 before the upgrade completes.

To try a live connection without pasting your key into the page, use the WebSocket overview.

Compared to REST

SurfaceKey goes inAlso accepted
RESTx-api-key header?apiKey= query parameter, for compatibility
WebSocket?apiKey= on the upgrade URLNothing else: headers on later frames are not read

Auth errors

StatusMeaning
401Invalid, missing or inactive apiKey. The upgrade is rejected with no body and no frames are sent.
403The key is valid, but the plan does not include WebSocket (WS_NOT_INCLUDED) or the package has ended (PACKAGE_EXPIRED), named in the JSON body's error.

TickerLayer

Developer-friendly market data APIs for REST and WebSocket integrations, with real-time and historical access across stocks, forex, crypto, indices, ETFs, commodities, bonds and 24/7 perpetual futures.

TickerLayer provides derived, indicative market data for informational and technical use only. We are not affiliated with any exchange, issuer, broker, trading venue, or listed company unless expressly stated. We do not provide investment advice, execute trades, manage funds, or facilitate financial transactions. Data may be delayed, inaccurate, or different from official market prices. Perpetual futures data is a calculated composite of third-party derivatives markets: it is not the price of any underlying, carries no rights in any underlying, and we do not list, offer, or trade any contract. Futures CFDs are reference prices we calculate with our own methodology for futures contract months and roll series: they are not futures contracts and not the official settlement or closing price of any market. Benchmark and comparison content on this site reflects our own observations under a stated methodology during a stated window. It is not exchange data, implies no affiliation, endorsement, or certification by any exchange, index provider, or market data vendor, and is not a measure of execution quality or a guarantee of future performance. Third-party names and marks are used for identification only and belong to their respective owners. Redistribution is prohibited unless expressly authorized in writing.