Skip to main content

Status

The checked-in asyncapi.yaml file has been upgraded to AsyncAPI 3 for Mintlify. Use the WebSocket Reference tab for the generated channel and message reference. This page remains the protocol guide and highlights the runtime behavior that matters most when integrating.

Transport

  • Protocol: raw WebSocket
  • Message envelope: JSON-RPC 2.0
  • Trading: WebSocket only
  • Market-data subscriptions: WebSocket only

Request shape

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "private/buy",
  "params": {}
}

Success response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {}
}

Subscription notification

{
  "jsonrpc": "2.0",
  "method": "subscription",
  "params": {
    "channel": "book.SOL_USDC-28FEB26-150-C.10",
    "data": {}
  }
}

Core methods

Authentication

  • public/auth

Trading

  • private/buy
  • private/sell
  • private/cancel
  • private/cancel_all

Queries

  • public/get_instruments
  • private/get_open_orders
  • private/get_account

Subscriptions

  • public/subscribe
  • public/unsubscribe

Channel patterns

ChannelAuthDescription
book.{instrument_id}.{depth}noBook snapshots and updates
trades.{instrument_id}noPublic trade feed
user.ordersyesOrder status updates for the authenticated user
user.tradesyesTrade notifications for the authenticated user
logsnoGateway log stream for dashboards and debugging

Common application errors

CodeMeaning
1001Not authenticated
1002Insufficient balance
1003Order not found
1004Instrument not found
1005Invalid price
1006Invalid size
1007Rate limit exceeded
1009Market closed or instrument expired

Reference split

  • WebSocket Reference tab: generated reference from asyncapi.yaml
  • This page: conceptual guide and notable protocol behavior