Skip to main content

Overview

Subscribe to orderUpdates to receive real-time notifications when your order status changes.

Subscribe

Request Body

ParameterTypeDescription
method*stringMust be "subscribe"
subscription*objectSee below
subscription.type*stringMust be "orderUpdates"
subscription.user*stringYour wallet address (lowercase), e.g., "0x742d35cc6634c0532925a3b844bc9e7595f0beb"

Response

Subscription Confirmation:
{
  "channel": "subscriptionResponse",
  "data": {
    "method": "subscribe",
    "subscription": {
      "type": "orderUpdates",
      "user": "0x742d35cc6634c0532925a3b844bc9e7595f0beb"
    }
  }
}
Initial Snapshot:
{
  "channel": "orderUpdates",
  "data": {
    "isSnapshot": true,
    "user": "0x742d35cc6634c0532925a3b844bc9e7595f0beb",
    "orders": [
      {
        "order": {
          "coin": "BTC",
          "side": "B",
          "limitPx": "50000.00",
          "sz": "0.1",
          "oid": "0x1234567890abcdef...",
          "venueOid": 12345,
          "timestamp": 1701234567890,
          "origSz": "0.1"
        },
        "status": "open",
        "statusTimestamp": 1701234567890
      }
    ]
  }
}
Status Update:
{
  "channel": "orderUpdates",
  "data": {
    "isSnapshot": false,
    "user": "0x742d35cc6634c0532925a3b844bc9e7595f0beb",
    "orders": [
      {
        "order": {
          "coin": "BTC",
          "side": "B",
          "limitPx": "50000.00",
          "sz": "0.05",
          "oid": "0x1234567890abcdef...",
          "venueOid": 12345,
          "timestamp": 1701234567890,
          "origSz": "0.1"
        },
        "status": "partial",
        "statusTimestamp": 1701234570000
      }
    ]
  }
}

Order Fields

FieldTypeDescription
coinstringAsset symbol (BTC, ETH, etc.)
sidestring"B" (buy) or "A" (ask/sell)
limitPxstringLimit price
szstringCurrent order size (decreases as filled)
oidstringOrder ID (128-bit hex string)
venueOidnumberVenue order ID (assigned when accepted)
timestampnumberOrder creation time in milliseconds
origSzstringOriginal order size

Status Fields

FieldTypeDescription
statusstringCurrent order status (see table below)
statusTimestampnumberTime of last status change

Order Status Values

StatusDescription
pendingOrder placed, awaiting venue acceptance
openOrder accepted by venue, not yet filled
partialOrder partially filled
filledOrder completely filled
canceledOrder canceled (user or system initiated)
rejectedOrder rejected by venue

Unsubscribe

{
  "method": "unsubscribe",
  "subscription": {
    "type": "orderUpdates",
    "user": "0x742d35cc6634c0532925a3b844bc9e7595f0beb"
  }
}

Notes

  • isSnapshot: true sent immediately with all open/partial orders
  • isSnapshot: false for real-time updates
  • User address must be lowercase
  • sz decreases as order fills, origSz stays constant