Protocol
- Connect to
wss://www.getavenir.co/ws { "action": "userConnected", "token": "<Clerk JWT>", "applicationType": "artefact" }- Receive
artefactConfigandorderBook { "action": "startInterview" }— bots on, timer starts- Trade with
placeOrder/cancelOrderoninstrumentId1,2, or3 { "action": "endInterview" }— bots off; server pushesinterviewReport- Persist with
recordSessionif you want a past-session row (not automatic on disconnect)
userConnected), not an Opera API client.
Client actions
Server messages
artefactConfig
1–3 are in laddersByInstrument.
interviewReport
{ "type": "interviewReport", "error": "not_found" } when no report exists.
orderBook
Multi-instrument book for 1, 2, and 3.
Related
- Guide: Artefact
- Shared auth and orders: API overview