Skip to main content

Connection

wss://ws.notional.xyz

Protocol

Client messages:
  • subscribe
  • unsubscribe
  • ping
Server messages:
  • channel payloads
  • subscriptionResponse
  • pong
  • error

Subscription Types

User-scoped

  • userFills
  • accountSummary
  • userOrderRejections
  • orderUpdates
  • activeAssetData
  • userTransactions
  • twapUpdates
For activeAssetData, both user and coin are enforced by the server. For the other user-scoped channels, clients should still always include user even though the current server only hard-validates activeAssetData. twapUpdates sends an initial snapshot of the user’s active TWAPs and then incremental progress updates as execution continues.

Global

  • newBlocks
  • newTransactions

Message Examples

Subscribe:
{
  "method": "subscribe",
  "subscription": {
    "type": "userFills",
    "user": "0x742d35cc6634c0532925a3b844bc9e7595f0beb"
  }
}
Ping:
{
  "method": "ping"
}
Pong:
{
  "channel": "pong"
}
Error:
{
  "channel": "error",
  "data": {
    "message": "Invalid message format"
  }
}

Connection Management

  • Idle timeout is 60 seconds.
  • Send a JSON ping about every 30 seconds if the client is otherwise idle.
  • Re-subscribe after reconnecting.