Skip to main content
/ws serves every channel without authentication, delayed by 20 seconds. For live updates on your own account, connect to /ws/user and authenticate with a read credential.

Authenticate

Send auth as the first message. credential is the full Authorization value, including the NotionalRead scheme.
A refused credential returns { "ok": false, "code": "<reason>" }. Without an authenticated session, the server closes the connection with code 1008. A failed renewal keeps the existing session, subscriptions and connection open; it does not extend the credential’s expiry. A new connection that has not authenticated within 10 seconds is also closed with code 1008.

Channels

After auth, use subscribe, unsubscribe and ping as on /ws. A refused subscription returns:

Renew Before Expiry

Send another auth message with a fresh credential before expiresAtMs; the connection and its subscriptions stay open. If the new credential is for a different account, subscriptions the new credential cannot read are dropped with subscriptionRefused. The server re-checks each session every 30 seconds, and immediately when the account’s API wallets change. When the credential expires or its signing API wallet is revoked, the server drops every subscription and sends:
authRevoked has the same shape, with code: "unauthorized_signer". After either notification, the connection stays open for 10 seconds to authenticate again. Send a fresh auth, then subscribe again. A refused credential or failure to authenticate within that window closes the connection with code 1008.

Refusal Codes