Skip to main content
WSS

Quickstart

1. Get a token

2. Connect to the WebSocket

Pass the token as an Authorization header on the WebSocket upgrade request. Invalid or missing tokens are rejected with HTTP 401 before the connection is established.
Replace gateway.sandbox.architect.exchange with gateway.architect.exchange for production.

3. Subscribe

Once connected, send a subscribe message to start receiving market data:
Subscribe to trades only — no order book or ticker — with level: "TRADES":
For a book-level subscription, the optional trades and ticker fields (both default true) independently suppress trade or ticker delivery. For example, a book-only feed (no trades, no ticker):
Subscribe to candles for a symbol and interval:
After a successful subscribe at a book level (LEVEL_1/LEVEL_2/LEVEL_3), you receive:
  • Ticker updates (t = "s") — unless ticker: false
  • Trade updates (t = "t") — unless trades: false
  • Order book updates matching your selected level:
    • LEVEL_1 -> t = "1"
    • LEVEL_2 -> t = "2"
    • LEVEL_3 -> t = "3"
After a successful subscribe at level: "TRADES", you receive only trade updates (t = "t") — no ticker or order book events. The trades and ticker fields have no effect on a TRADES subscription. After a successful subscribe_candles, you receive candle updates (t = "c").

Details

Request ID (rid)

  • rid is used to correlate request/response pairs.
  • Server acknowledgements and request errors include the same rid as your request.
  • Market data events do not include rid.

Symbol fields in events

  • Ticker, trade, and order book events use s for symbol.
  • Candle events use symbol.

Estimated funding rate

  • Ticker events (t = "s") carry an optional ef object with the live estimated funding rate, present only for symbols that have a live index feed configured (e.g. WTI-PERP).
  • ef.status is one of ready, settlement_pending, or unavailable:
    • ready — a current estimate is available. All numeric fields (funding_rate, funding_amount, benchmark_price, settlement_price) are populated and ef.reason is absent.
    • settlement_pending — funding settlement is in progress for the symbol, so the live estimate is temporarily suppressed. The numeric fields are null and ef.reason indicates a settlement is pending.
    • unavailable — no current estimate can be produced. The numeric fields are null and ef.reason explains why — for example the index or mark price data needed for the estimate is not yet available, is insufficient, or is too stale, or no estimate has been published for the symbol yet.
  • When no estimate applies to a symbol, the ef field is omitted entirely.

Heartbeat events

  • The server emits heartbeat events (t = "h"):
Use heartbeat and market data flow to monitor connection health.
Subscribe Request
type:object

Subscribe to market data for a symbol

Unsubscribe Request
type:object

Unsubscribe from market data for a symbol

Subscribe Candle Request
type:object

Subscribe to candle updates on a symbol and width

Unsubscribe Candle Request
type:object

Unsubscribe from candle updates on a symbol and width

Subscribe BBO Candles Request
type:object

Subscribe to BBO (Best Bid and Offer) candle updates on a symbol and width

Unsubscribe BBO Candles Request
type:object

Unsubscribe from BBO candle updates on a symbol and width

Success Response
type:object

Confirmation of a successful client request

Error Response
type:object

Response indicating a failed client request

Heartbeat Event
type:object

Heartbeat/timestamp event (t="h")

Ticker Event
type:object

Ticker statistics update (t="s")

Trade Event
type:object

Trade event (t="t")

Candle Event
type:object

Candle update (t="c")

BBO Candle Event
type:object

BBO (Best Bid and Offer) candle update (t="bc")

Level 1 Book Update Event
type:object

Level 1 orderbook update - best bid/ask (t="1")

Level 2 Book Update Event
type:object

Level 2 orderbook update - aggregated price levels (t="2")

Level 3 Book Update Event
type:object

Level 3 orderbook update - individual order quantities (t="3")