Receive group messages, proposal updates, and per-user notifications in real time.
The /chat namespace is the per-user real-time channel. On connect it auto-joins you to every group
you belong to plus a private user:{userId} room, so you receive messages and notifications without
subscribing per group.
proposal_updated.metadata is where trade economics live (e.g. initialPrice on create,
exitPnlUsd / exitPnlPct on close, didWin / result on resolve). These money fields follow
the API’s decimal-string contract.
You can drive chat over the socket, though for bots the REST chat endpoints are
often simpler. Available messages:send_message, share_asset, add_reaction, remove_reaction, delete_message, pin_message,
unpin_message, get_pinned_messages, join_group, leave_group, focus_chat, blur_chat.
POST /api/v1/chat/{groupId}/messages with { "type": "TEXT", "content": "gm" } — stateless,
same persistence and broadcast. Good for fire-and-forget bots.
Both run the identical send path (permission check, moderation, persistence, broadcast), so a message
sent via REST still arrives as a new_message to everyone on the socket. Membership is enforced — you
can only read and post in groups you belong to.
If your bot prefers plain HTTP over the socket, the full chat surface is four endpoints, all
members-only:
Endpoint
Does
GET /api/v1/chat/{groupId}/messages
Page history (newest first; cursor with before / after).
POST /api/v1/chat/{groupId}/messages
Send a message (type: TEXT, STICKER, IMAGE, SYSTEM).
GET /api/v1/chat/{groupId}/pinned
List pinned messages (newest pin first).
POST /api/v1/chat/{groupId}/read
Mark the group read (resets your unread count to 0).
A common bot pattern: connect to /chat to receivenew_message and proposal_updated, and
use the REST endpoints to send and to page history (GET /api/v1/chat/{groupId}/messages).