Upgrades to a websocket of live index and rate prints for a Pro or Premium plan. A browser sends its bearer token as the first auth message. A server sends Authorization: Bearer on the handshake. A key in the query string is refused. Channels are index.price, index.constituents, index.sleeves, index.implied_sleeves, index.session, rate.price, and rate.sources. index.mark, index.methodology, and index.nav are not available. A Premium plan may subscribe to set indices or set rates on a channel. That is one subscription and follows every id in the set, including an id that appears later. On index.constituents, that set does not send an opening snapshot of each index. Read each basket from GET /api/v1/indices//constituents. The socket sends a frame when that index's constituents change. A subscribe that names ids on index.constituents still sends a snapshot for those ids. A Pro plan subscribes by id, up to 50 ids, and a set subscribe is refused. A connection holds at most 50 subscriptions. A key holds at most 10 connections. There is no delayed or anonymous socket. The protocol is the Websockets guide.
Authorization
bearerAuth *Bearer <token>
Session token from the app, or an API key (the ak_ prefix), sent as a Bearer token or an ?api_key= query parameter.. Token in: header
Response
101 · Switching protocols. The socket then sends a connected frame.
Switching protocols. The socket then sends a connected frame.
400 · The request put an API key in the query string, or was not a websocket upgrade.
The request put an API key in the query string, or was not a websocket upgrade.
401 · The handshake bearer was missing a valid token.
The handshake bearer was missing a valid token.
403 · The token has no organization, or the plan is not Pro or Premium.
The token has no organization, or the plan is not Pro or Premium.
503 · The handshake bearer is valid and the plan could not be read. The upgrade does not complete.
The handshake bearer is valid and the plan could not be read. The upgrade does not complete.
Request example
curl-X GET "https://api.adjacent.markets/api/v1/stream"\-H"Authorization: Bearer <token>"