Skip to main content
The relayer tells you when something happens on your trades, ads and agents: a new order on your ad, the maker’s lock, a cancel, each step of a dispute, or an agent’s policy about to expire. Each notice is stored so you can list it and mark it read, and is also pushed live over a socket. A second socket event, trade:status, carries a trade’s settlement progress. Stored notices are kept for 90 days.

Endpoints

A notice addressed to an address reaches the user who holds it as a signed-in wallet or a linked account.

The Notification object

The list, mark-read and the socket all use this shape.
title and body are written for display, so you can show them as they are. Use type to choose an icon or a link, and tradeId for a “View trade” link.

Notification types

  • validUntil and readyAt are unix seconds. txHash on AGENT_KILLED links to the revoke transaction.
  • GUARD_RAIL_ALERT kind is scheduled, armed, disarmed or cancelled. A scheduled action or removed guard rail you did not make means your owner key may be compromised.
  • Payloads may carry a dedupKey; ignore it.
  • TRADE_CANCELLED body depends on the trade’s cancelReason. See Disputes for the dispute texts.
Nothing is sent for pods. The co-signed settlement path stores no notices; it pushes trade:status instead.

List

GET /v1/notifications Newest first, cursor-paginated.

Unread count

GET /v1/notifications/unread-count

Mark one read

PATCH /v1/notifications/:id/read No body. Marks your notification read and returns it. Marking a read notice again still answers 200.

Mark all read

POST /v1/notifications/read-all No body. Marks every unread notice read.

The notifications socket

The socket is Socket.IO 4 on the namespace /notifications at the relayer’s base URL. Connect with your access token:
A refresh token, a missing, bad or expired token, or a browser origin that is not allowed is refused: the server disconnects the socket at once, with no error event. The client sends no events.
The push never carries key or leg detail. Read GET /v1/trades/:id/settlement for that.

Reconnecting

  • Token expiry. The server disconnects the socket when its access token expires (reason io server disconnect). The Socket.IO client does not retry a server-side disconnect by itself: refresh the token, set the new auth, and call connect() again.
  • Network drops. The client reconnects by itself, with the token it was created with.
  • Missed events are not replayed. Refetch the list, the unread count and your open trades on every connect.
The socket is a hint, not the record. Events can be missed while you are disconnected, so treat each push as a cue to refetch, and poll the HTTP routes for the truth.