Protocol
- Connect to
wss://www.getavenir.co/ws { "action": "userConnected", "token": "<Clerk JWT>", "applicationType": "atlas", "atlasFeed": { } }- Wait for
orderBookandatlasFeedState(auth is async; bots are turned on for Atlas) { "action": "atlasStartFeed" }— immediate headline, then on the interval- Trade with
placeOrder/cancelOrderon instruments1and2 { "action": "atlasStopFeed" }when done
token. Optional atlasFeed on connect seeds session settings.
Starter code
Client actions
Optional settings on connect /
atlasStartFeed / atlasConfigureFeed:
Server messages
headline
Wire payload is text-only. Kind, direction, subject, instrument, and counters are not included.
Infer signal vs noise by matching
text against atlasFeedState.companies (longest prefix wins). companies[0] → instrument 1, companies[1] → instrument 2. No company prefix ⇒ noise.
Bullish/bearish direction is in the wording, not a separate field. The server still schedules delayed mid-shifts for signals; watch orderBook.atlasMidShiftStatus when a shift fires (instrumentId, direction, delta, timestamp).
Live counters (headlinesSeen, tradableHeadlinesSeen) live on atlasFeedState (connect, start/stop/configure, atlasGetFeedState), not on each headline.
atlasFeedState
companies[0] → instrument 1, companies[1] → instrument 2.
orderBook
Includes gammaBotMidsByInstrument and atlasMidShiftStatus while the session is live.
Related
- Guide: Atlas
- Shared auth and orders: API overview
- Opera bots: Opera