Skip to main content
The monitor checks your subscriptions every 60 seconds and pushes an event the first time a threshold is crossed. An alert is sent once and re-arms after the condition clears.

Connect

Open the socket with the partner headers. There is no time limit.

Subscribe

After the socket opens, send a subscribe message. You can send more later to add assets, or unsubscribe to remove them.
  • assets takes underlying tokens (every market for that token is watched) or single markets and vaults.
  • events is optional. Leave it out to receive all three.
  • The server answers {"event": "subscribed", "assets": [...]} and runs a first check straight away.

Events

A socket with an invalid token or partner key is closed with code 1008 straight away.
Renewing a windowBuy the next session before expires_at, open a second socket, subscribe, then close the old one. Nothing is missed and nothing is paid twice for the same hour.
The MCP tool create_monitor_session only issues the token. It does not hold the socket for you. Your agent or service must open the websocket and keep it open.