wss://flash.definitive.fi/v1/ws
Channels
Authenticating
There is no connect-time handshake. Authenticate in-band by including your Flash API key asapiKey in every subscribe message. Get a key from Become an Integrator.
A connection is pinned to one portfolio on first successful auth, and to one API key once a channel is active. A subscribe with a different key on the same socket is rejected with UNAUTHORIZED and the connection is closed.
Subscribing
Send asubscribe message for each channel as soon as the connection opens. Channel-specific fields are documented on each channel’s page.
subscribe and unsubscribe is confirmed with an ack listing the connection’s active channels:
unsubscribe message on that channel. The server re-acks your remaining channels.
Connection limits
The per-key connection limit is at least 50, pooled across everything using that key. If you need it raised, reach out. Exceeding it is rejected withCONNECTION_LIMIT and the connection is closed; a backed-off reconnect recovers as slots free.
Channel-specific limits, like the quote subscription cap, are documented on the channel’s page.
Heartbeats
Subscribe toheartbeats on every connection to receive a keep-alive frame once per second:
counter and a timestamp:
Reconnecting
- On disconnect, reconnect with capped backoff and jitter, then re-subscribe to your channels. Nothing survives a disconnect: orders subscriptions return a fresh snapshot, and quote sessions cannot be resumed.
- On
UNAUTHORIZED, stop reconnecting and check your API key; reconnecting with the same key will not authenticate. - Other closes, including
CONNECTION_LIMIT, are safe to retry with backoff. - If a stream stays unavailable, fall back to polling its REST counterpart.
Errors
Errors arrive as a frame you can act on:
Channel-specific codes are documented on each channel’s page.
Orders channel
Stream open orders in real time, for one funder or all of them.
Quotes channel
Stream live quotes for a market-order request.