WebSockets

Streams & Commands

wss://api.bondis.xyz/v1/stream (testnet analogous)

Bondis WS supports command parity with REST (orders, transfers, PBV, bridge report), plus market/account streams.

Auth (first frame)

Embed signature in authz. h is keccak of the JCS-canonical frame without authz.

{
  "v": 1,
  "op": "auth",
  "seq": 1,
  "timestamp": 1736371200123,
  "authz": { "alg": "secp256k1-keccak-eip712", "h": "0x...", "sig": "0x..." }
}

Send commands (signed)

Single command (place order):

{
  "v": "1c",
  "op": "n",
  "m": "USD/BRL",
  "s": "b",
  "r": "maker",
  "t": "limit",
  "p": "5.1234",
  "q": "10000",
  "cid": "abc-123",
  "seq": 2,
  "timestamp": 1736371201200,
  "authz": { "alg": "secp256k1-keccak-eip712", "h": "0x...", "sig": "0x..." }
}

Batch:

Ack frame (server β†’ client):

Subscriptions

Subscribe to book, trades, orders, oracle, pbv.

Book event example (server β†’ client):

Heartbeats, Resume, Backpressure

  • Ping/Pong: server: { "op": "ping", "t": 1736371203000 }; client: { "op": "pong", "t": ... }

  • Resume: { "op": "resume", "last_ack": "b_104950" } to request missed events since a batch id

  • Backpressure: server may send { "op": "backpressure", "max_outstanding": 32 }


Curl Examples

Place a limit buy (REST)

Response

Cancel by market/side (REST)

Response

Last updated