Skip to main content
The Match WebSocket API delivers real-time auction state and account updates over a persistent connection. All monetary values in WebSocket events are integer cents, not the REST Money object. For example, $10.00 is represented as 1000.

Connection

Connect by sending a WebSocket upgrade request to the appropriate endpoint. Include both of the following protocol values in the Sec-WebSocket-Protocol header of the upgrade request:
  • circle-match.v1
  • ticket.<jwt>: replace <jwt> with the ticket token from POST /v1/match/ws/ticket

Authentication

Obtain a WebSocket ticket before opening the connection. Endpoint: POST /v1/match/ws/ticket No request body is required. The response contains a short-lived, single-use token:
Obtain the ticket immediately before opening the socket. The server validates the ticket during the upgrade handshake. An invalid, expired, or missing ticket returns HTTP 401 and the connection is not established.

Session frames

The server sends the following session-level frames to the client.

Client messages

Send subscribe messages to the server after receiving the hello frame. You can subscribe to multiple channels in a single session.

Market channel

The market channel is public and delivers real-time auction state. Subscribe:

Market channel events

Market channel fields

The following fields are present on the snapshot event and on most market events. For background on auction phases and clearing, see How Match works.

lastClearResult fields

Account channel

The account channel is private and scoped to the authenticated entity. It requires a valid ticket. Subscribe:

Account channel events

account_cleared fields

Reconnection

Tickets are single-use and cannot be reused after the connection opens. When a connection drops:
  1. Obtain a new ticket using POST /v1/match/ws/ticket.
  2. Open a new WebSocket connection with the new ticket.
  3. Re-send your subscribe messages.
The server delivers a fresh snapshot on re-subscribe. Events that occurred during the disconnection are not replayed. If the auction cleared while you were disconnected, the account_cleared event for that auction is not delivered. Use GET /v1/match/orders to reconcile any fills you may have missed.