---
search:
  tags:
    - Subscriptions
    - RECEIVE
seo:
  description: >-
    Send a JSON command with a client-assigned id, cmd, and params. An orderbook
    or… Reference for the receive operation on /ws in the WebSocket API.
sidebar:
  label: Subscribe to Channels
  badge: RECEIVE
title: Subscribe to Channels
type: openapi-operation
---
Send a JSON command with a client-assigned id, cmd, and params. An orderbook or ticker-filtered rfqs or market_lifecycle channel opens one subscription per requested ticker. An rfqs or market_lifecycle channel without tickers opens one all-visible subscription; quotes always opens one all-visible subscription. Each subscription receives its own subscribed response with a server-assigned subscription ID (sid). Its seq starts at 1 and increments once per frame. End a subscription by sending unsubscribe with its sid; the server answers with an unsubscribed response.

### Operation

- Action and channel: `RECEIVE /ws`
- Operation ID: `receiveSubscribeCommand`
- API reference: [RECEIVE /ws](/api-reference/websocket/subscriptions/receive-subscribe-command)
- Complete specification: [AsyncAPI (YAML)](/asyncapi.yml)
- Spec location (JSON Pointer): `#/operations/receiveSubscribeCommand`

#### Authorization

- Credential: `UDX-Access-Key`, `UDX-Access-Timestamp`, `UDX-Access-Signature` headers on the WebSocket upgrade request
- Details: [Connecting](/reference/connecting?api=websocket) and [Authentication](/reference/authentication?api=websocket)

Upgrade headers schema:

```yaml
$ref: "#/components/schemas/WebSocketUpgradeHeaders"
```


#### Commands

##### Subscribe

Subscribe to one or more channels.

Payload schema:

```yaml
$ref: "#/components/schemas/SubscribeCommandEnvelope"
```

Example: SubscribeToTopOfBook

Subscribe to the best bid and offer for one market

```json
{
  "id": 1,
  "cmd": "subscribe",
  "params": {
    "channels": [
      {
        "channel": "orderbook",
        "level": "L1",
        "tickers": [
          "UDX-EXAMPLE-MARKET-A"
        ]
      }
    ]
  }
}
```

Example: SubscribeToTwoMarkets

Subscribe to the order book and RFQs for two markets

```json
{
  "id": 2,
  "cmd": "subscribe",
  "params": {
    "channels": [
      {
        "channel": "orderbook",
        "level": "L2",
        "depth": 10,
        "tickers": [
          "UDX-EXAMPLE-MARKET-A",
          "UDX-EXAMPLE-MARKET-B"
        ]
      },
      {
        "channel": "rfqs",
        "tickers": [
          "UDX-EXAMPLE-MARKET-A",
          "UDX-EXAMPLE-MARKET-B"
        ]
      }
    ]
  }
}
```

Example: SubscribeToOrderLevelBook

Subscribe to orders

```json
{
  "id": 3,
  "cmd": "subscribe",
  "params": {
    "channels": [
      {
        "channel": "orderbook",
        "level": "L3",
        "depth": 10,
        "tickers": [
          "UDX-EXAMPLE-MARKET-A"
        ]
      }
    ]
  }
}
```

Example: SubscribeToQuotes

Subscribe to every visible quote

```json
{
  "id": 4,
  "cmd": "subscribe",
  "params": {
    "channels": [
      {
        "channel": "quotes"
      }
    ]
  }
}
```

#### Replies

##### Subscribed

Confirm that one subscription was committed.

Payload schema:

```yaml
$ref: "#/components/schemas/SubscribedEnvelope"
```

Example: OrderbookSubscribed

One order book subscription committed

```json
{
  "id": 1,
  "type": "subscribed",
  "msg": {
    "channel": "orderbook",
    "ticker": "UDX-EXAMPLE-MARKET-A",
    "sid": 7,
    "level": "L2",
    "depth": 10
  },
  "rate_limit": {
    "bucket": "read",
    "capacity": 30,
    "refill_tokens_per_minute": 900,
    "remaining": 27,
    "full_after_ms": 200
  }
}
```

Example: RfqsSubscribed

One RFQ subscription committed

```json
{
  "id": 1,
  "type": "subscribed",
  "msg": {
    "channel": "rfqs",
    "ticker": "UDX-EXAMPLE-MARKET-A",
    "sid": 8
  },
  "rate_limit": {
    "bucket": "read",
    "capacity": 30,
    "refill_tokens_per_minute": 900,
    "remaining": 27,
    "full_after_ms": 200
  }
}
```

Example: QuotesSubscribed

The quotes subscription committed

```json
{
  "id": 2,
  "type": "subscribed",
  "msg": {
    "channel": "quotes",
    "sid": 11
  },
  "rate_limit": {
    "bucket": "read",
    "capacity": 30,
    "refill_tokens_per_minute": 900,
    "remaining": 26,
    "full_after_ms": 200
  }
}
```

#### Errors

- invalid_message — The JSON or common command envelope is invalid.
- invalid_params — Command params fail schema or semantic validation.
- command_id_in_use — Another command with the supplied identifier is still in flight.
- subscription_conflict — The ticker already belongs to the identified subscription.
- market_not_found — The market is absent from the caller-visible market catalog.
- capacity_exceeded — A standing-resource limit prevents command admission.
- channel_unavailable — The channel's upstream source cannot serve the operation right now. Retry with backoff; the connection stays usable.
- rate_limit_exceeded — A command rate limit was exceeded.
- admission_unavailable — Shared admission policy or state is temporarily unavailable.
- internal_error — An unexpected failure left connection state safe to continue.

##### Error

Reject one command or end one subscription while leaving the connection usable.

Every server-side rejection is an error frame. One that echoes a command id answers that command and leaves every subscription intact. One that names a sid and carries no id is terminal for that subscription: no further frame arrives for it, the connection and every other subscription stay usable, and you resubscribe when the cause clears. A connection-fatal condition is reported with a WebSocket close frame instead.

Payload schema:

```yaml
$ref: "#/components/schemas/ErrorEnvelope"
```

Example: InvalidMessage

invalid_message

```json
{
  "type": "error",
  "msg": {
    "code": "invalid_message",
    "detail": "WebSocket command is not a valid JSON object",
    "instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef"
  }
}
```

Example: InvalidParams

invalid_params

```json
{
  "id": 4,
  "type": "error",
  "msg": {
    "code": "invalid_params",
    "detail": "the orderbook channel requires tickers",
    "instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef",
    "field": "params.channels"
  }
}
```

Example: CommandIdInUse

command_id_in_use

```json
{
  "id": 4,
  "type": "error",
  "msg": {
    "code": "command_id_in_use",
    "detail": "WebSocket command ID is already in flight",
    "instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef"
  }
}
```

Example: MarketNotFound

market_not_found

```json
{
  "id": 4,
  "type": "error",
  "msg": {
    "code": "market_not_found",
    "detail": "market was not found in the public catalog",
    "instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef",
    "ticker": "UDX-EXAMPLE-MARKET-Z"
  }
}
```

Example: SubscriptionConflict

subscription_conflict

```json
{
  "id": 4,
  "type": "error",
  "sid": 7,
  "msg": {
    "code": "subscription_conflict",
    "detail": "UDX-EXAMPLE-MARKET-A is already subscribed on sid 7",
    "instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef",
    "ticker": "UDX-EXAMPLE-MARKET-A"
  }
}
```

Example: RateLimitExceeded

rate_limit_exceeded

```json
{
  "id": 4,
  "type": "error",
  "msg": {
    "code": "rate_limit_exceeded",
    "detail": "member read rate limit is exhausted",
    "instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef",
    "retry_after_ms": 1200
  },
  "rate_limit": {
    "bucket": "read",
    "capacity": 30,
    "refill_tokens_per_minute": 900,
    "remaining": 0,
    "full_after_ms": 2000
  }
}
```

Example: CapacityExceeded

capacity_exceeded

```json
{
  "id": 4,
  "type": "error",
  "msg": {
    "code": "capacity_exceeded",
    "detail": "WebSocket connection command capacity is exhausted",
    "instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef",
    "scope": "connection",
    "resource": "in_flight_commands",
    "limit": 32
  }
}
```

Example: AdmissionUnavailable

admission_unavailable

```json
{
  "id": 4,
  "type": "error",
  "msg": {
    "code": "admission_unavailable",
    "detail": "shared WebSocket admission is temporarily unavailable",
    "instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef"
  }
}
```

Example: ChannelUnavailable

channel_unavailable

```json
{
  "id": 4,
  "type": "error",
  "msg": {
    "code": "channel_unavailable",
    "detail": "current market data is unavailable",
    "instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef"
  }
}
```

Example: InternalError

internal_error

```json
{
  "id": 4,
  "type": "error",
  "msg": {
    "code": "internal_error",
    "detail": "WebSocket command failed",
    "instance": "urn:request-id:8f14e45f-ceea-4abc-a743-e89a34d3f6ef"
  }
}
```

Example: SubscriptionChannelUnavailable

channel_unavailable

```json
{
  "type": "error",
  "sid": 7,
  "msg": {
    "code": "channel_unavailable",
    "detail": "current market data is unavailable for this subscription",
    "instance": "urn:request-id:4ecbe594-50fa-4b7a-950f-5ed74bb8372d"
  }
}
```

Example: SubscriptionInternalError

internal_error

```json
{
  "type": "error",
  "sid": 7,
  "msg": {
    "code": "internal_error",
    "detail": "the subscription could not be continued",
    "instance": "urn:request-id:4ecbe594-50fa-4b7a-950f-5ed74bb8372d"
  }
}
```

#### Referenced definitions

The references in the excerpts above resolve to these definitions in the complete specification.

##### `#/components/schemas/WebSocketUpgradeHeaders`

```yaml
type: object
additionalProperties: true
description: Headers required for authentication and version negotiation.
required:
  - UDX-Access-Key
  - UDX-Access-Timestamp
  - UDX-Access-Signature
  - Sec-WebSocket-Protocol
properties:
  UDX-Access-Key:
    type: string
    minLength: 1
    maxLength: 255
    description: Opaque API key ID.
  UDX-Access-Timestamp:
    type: string
    pattern: ^[0-9]{13}$
    maxLength: 13
    description: Unix time in milliseconds, within 30 seconds of server time.
  UDX-Access-Signature:
    type: string
    minLength: 1
    maxLength: 1024
    description: Standard-base64 RSA-PSS/SHA-256 signature with a 32-byte salt. Sign timestamp + "GET" + "/ws"; the upgrade request has no body hash and no idempotency key.
  Sec-WebSocket-Protocol:
    type: string
    const: udx.json.2026-08-11
    description: Negotiated dated WebSocket API version.
```

##### `#/components/schemas/SubscribeCommandEnvelope`

```yaml
type: object
additionalProperties: false
description: Command that creates one independent subscription per requested channel and ticker pair.
required:
  - id
  - cmd
  - params
properties:
  id:
    $ref: "#/components/schemas/CommandId"
  cmd:
    type: string
    const: subscribe
    description: Selects the subscribe command.
  params:
    $ref: "#/components/schemas/SubscribeCommandParams"
```

##### `#/components/schemas/CommandId`

```yaml
type: integer
format: int64
minimum: 1
maximum: 9007199254740991
description: Client-assigned command correlation identifier, unique among commands in flight on this connection.
```

##### `#/components/schemas/SubscribeCommandParams`

```yaml
type: object
additionalProperties: false
description: The channels and markets to open.
required:
  - channels
properties:
  channels:
    type: array
    minItems: 1
    uniqueItems: true
    description: Each entry carries its own ticker filter and channel parameters.
    items:
      $ref: "#/components/schemas/SubscribeChannel"
```

##### `#/components/schemas/SubscribeChannel`

```yaml
type: object
additionalProperties: false
description: One channel to open, with its channel-specific parameters.
required:
  - channel
properties:
  channel:
    type: string
    enum:
      - orderbook
      - rfqs
      - quotes
      - market_lifecycle
      - orders
      - fills
      - trades
      - stats
    description: orderbook streams the order book for the market, snapshot first then updates. stats streams the market's complete stats, on subscribe and whenever they change. rfqs streams the requests for quote the caller is authorized to see. quotes streams every quote visible to the caller's member. market_lifecycle streams change-only lifecycle notifications for the ticker, or for every market when tickers are omitted. orders streams the caller's own order lifecycle. fills streams the caller's own executions. trades streams public trades for the ticker, or for every market when tickers are omitted.
  tickers:
    $ref: "#/components/schemas/TickerList"
  level:
    $ref: "#/components/schemas/OrderbookLevel"
  depth:
    $ref: "#/components/schemas/OrderbookDepth"
allOf:
  - if:
      properties:
        level:
          const: L1
      required:
        - level
    then:
      properties:
        depth:
          const: 1
  - if:
      properties:
        channel:
          enum:
            - orderbook
            - stats
    then:
      required:
        - tickers
  - if:
      properties:
        channel:
          const: quotes
    then:
      not:
        anyOf:
          - required:
              - tickers
          - required:
              - level
          - required:
              - depth
  - if:
      properties:
        channel:
          const: rfqs
    then:
      not:
        anyOf:
          - required:
              - level
          - required:
              - depth
  - if:
      properties:
        channel:
          const: market_lifecycle
    then:
      not:
        anyOf:
          - required:
              - level
          - required:
              - depth
  - if:
      properties:
        channel:
          const: orders
    then:
      not:
        anyOf:
          - required:
              - level
          - required:
              - depth
  - if:
      properties:
        channel:
          const: fills
    then:
      not:
        anyOf:
          - required:
              - level
          - required:
              - depth
  - if:
      properties:
        channel:
          const: trades
    then:
      not:
        anyOf:
          - required:
              - level
          - required:
              - depth
  - if:
      properties:
        channel:
          const: stats
    then:
      not:
        anyOf:
          - required:
              - level
          - required:
              - depth
```

##### `#/components/schemas/TickerList`

```yaml
type: array
minItems: 1
maxItems: 250
uniqueItems: true
description: A canonical non-empty list of distinct market tickers.
items:
  $ref: "#/components/schemas/Ticker"
```

##### `#/components/schemas/Ticker`

```yaml
type: string
minLength: 1
maxLength: 128
description: A human-meaningful natural key naming a single-leg or multi-leg market.
example: UDX-EXAMPLE-MARKET
```

##### `#/components/schemas/OrderbookLevel`

```yaml
type: string
enum:
  - L1
  - L2
  - L3
default: L2
description: L1 streams only the best bid and offer; L2 streams aggregated market-by-price depth; L3 streams anonymous resting orders in price-time priority order.
```

##### `#/components/schemas/OrderbookDepth`

```yaml
oneOf:
  - type: integer
  - type: string
    const: full
minimum: 1
maximum: 100
default: 25
description: Visible price levels per side. L1 defaults to and only accepts 1. L2 and L3 default to 25, accept an integer from 1 through 100, or accept `full` for every visible price level. An L3 level includes every visible order resting at that price.
```

##### `#/components/schemas/SubscribedEnvelope`

```yaml
type: object
additionalProperties: false
description: One successful response per requested channel and ticker pair. It echoes the command id and carries that subscription's server-assigned sid and normalized effective settings.
required:
  - id
  - type
  - msg
properties:
  id:
    $ref: "#/components/schemas/CommandId"
  type:
    type: string
    const: subscribed
    description: Identifies a successful subscribe response.
  msg:
    $ref: "#/components/schemas/SubscribedPayload"
  rate_limit:
    type: object
    additionalProperties: false
    description: Present for a newly admitted charged batch. An exact duplicate subscribe response omits it because no tokens were spent.
    required:
      - bucket
      - capacity
      - refill_tokens_per_minute
      - remaining
      - full_after_ms
    properties:
      bucket:
        type: string
        enum:
          - read
          - write
          - cancel
        description: Shared member bucket consulted for this command.
      capacity:
        type: integer
        format: int64
        minimum: 1
        maximum: 10000000
        description: Maximum tokens held by the bucket.
      refill_tokens_per_minute:
        type: integer
        format: int64
        minimum: 1
        maximum: 10000000
        description: Tokens restored per minute.
      remaining:
        type: integer
        format: int64
        minimum: 0
        maximum: 10000000
        description: Tokens remaining after th decision.
      full_after_ms:
        type: integer
        format: int64
        minimum: 0
        maximum: 86400000
        description: Milliseconds until the bucket is full if no more work is admitted.
```

##### `#/components/schemas/SubscribedPayload`

```yaml
type: object
additionalProperties: false
description: One opened subscription. The ticker is omitted for an all-visible rfqs, orders, fills, market_lifecycle, or trades subscription and for every quotes subscription.
required:
  - channel
  - sid
properties:
  channel:
    type: string
    enum:
      - orderbook
      - rfqs
      - quotes
      - market_lifecycle
      - orders
      - fills
      - trades
      - stats
    description: The channel this subscription streams.
  ticker:
    $ref: "#/components/schemas/Ticker"
  sid:
    $ref: "#/components/schemas/SubscriptionId"
  level:
    $ref: "#/components/schemas/OrderbookLevel"
  depth:
    $ref: "#/components/schemas/OrderbookDepth"
allOf:
  - if:
      properties:
        channel:
          const: orderbook
    then:
      required:
        - ticker
        - level
        - depth
  - if:
      properties:
        channel:
          const: stats
    then:
      required:
        - ticker
```

##### `#/components/schemas/SubscriptionId`

```yaml
type: integer
format: int64
minimum: 1
maximum: 9007199254740991
description: Exchange-assigned subscription ID whose lifetime is this WebSocket connection.
```

##### `#/components/schemas/ErrorEnvelope`

```yaml
oneOf:
  - $ref: "#/components/schemas/InvalidMessageCommandErrorEnvelope"
  - $ref: "#/components/schemas/CorrelatedCommandErrorEnvelope"
  - $ref: "#/components/schemas/SubscriptionConflictCommandErrorEnvelope"
  - $ref: "#/components/schemas/SubscriptionErrorEnvelope"
description: Every error frame the exchange sends. A frame with an id answers that command; a frame with a sid and no id ends that subscription.
```

##### `#/components/schemas/InvalidMessageCommandErrorEnvelope`

```yaml
type: object
additionalProperties: false
description: Invalid-message error.
required:
  - type
  - msg
properties:
  id:
    $ref: "#/components/schemas/CommandId"
  type:
    type: string
    const: error
    description: Identifies a rejected command.
  msg:
    $ref: "#/components/schemas/InvalidMessageErrorPayload"
```

##### `#/components/schemas/InvalidMessageErrorPayload`

```yaml
type: object
additionalProperties: false
description: The JSON or common command envelope is invalid.
required:
  - code
  - detail
  - instance
properties:
  code:
    type: string
    const: invalid_message
    description: Stable machine-readable error code.
  detail:
    $ref: "#/components/schemas/ErrorDetail"
  instance:
    $ref: "#/components/schemas/ErrorInstance"
  field:
    type: string
    minLength: 1
    maxLength: 255
    description: JSON path to the invalid field when one can be identified.
```

##### `#/components/schemas/ErrorDetail`

```yaml
type: string
minLength: 1
maxLength: 500
description: Human-readable occurrence detail that clients must not parse.
```

##### `#/components/schemas/ErrorInstance`

```yaml
type: string
format: uri-reference
pattern: ^urn:request-id:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
maxLength: 100
description: Request identifier for troubleshooting with exchange support.
```

##### `#/components/schemas/CorrelatedCommandErrorEnvelope`

```yaml
type: object
additionalProperties: false
description: Rejected command correlated by its trustworthy client identifier.
required:
  - id
  - type
  - msg
properties:
  id:
    $ref: "#/components/schemas/CommandId"
  type:
    type: string
    const: error
    description: Identifies a rejected command.
  sid:
    $ref: "#/components/schemas/SubscriptionId"
  msg:
    $ref: "#/components/schemas/CorrelatedCommandErrorPayload"
  rate_limit:
    type: object
    additionalProperties: false
    description: Present on rate_limit_exceeded and omitted for uncharged command failures, capacity failures, and unavailable admission.
    required:
      - bucket
      - capacity
      - refill_tokens_per_minute
      - remaining
      - full_after_ms
    properties:
      bucket:
        type: string
        enum:
          - read
          - write
          - cancel
        description: Shared member bucket consulted for this command.
      capacity:
        type: integer
        format: int64
        minimum: 1
        maximum: 10000000
        description: Maximum tokens held by the bucket.
      refill_tokens_per_minute:
        type: integer
        format: int64
        minimum: 1
        maximum: 10000000
        description: Tokens restored per minute.
      remaining:
        type: integer
        format: int64
        minimum: 0
        maximum: 10000000
        description: Tokens remaining after th decision.
      full_after_ms:
        type: integer
        format: int64
        minimum: 0
        maximum: 86400000
        description: Milliseconds until the bucket is full if no more work is admitted.
```

##### `#/components/schemas/CorrelatedCommandErrorPayload`

```yaml
oneOf:
  - $ref: "#/components/schemas/UnknownCommandErrorPayload"
  - $ref: "#/components/schemas/InvalidParamsErrorPayload"
  - $ref: "#/components/schemas/CommandIdInUseErrorPayload"
  - $ref: "#/components/schemas/MarketNotFoundErrorPayload"
  - $ref: "#/components/schemas/QuoteNotFoundErrorPayload"
  - $ref: "#/components/schemas/OrderNotFoundErrorPayload"
  - $ref: "#/components/schemas/PermissionDeniedErrorPayload"
  - $ref: "#/components/schemas/SubscriptionNotFoundErrorPayload"
  - $ref: "#/components/schemas/SubscriptionNotReadyErrorPayload"
  - $ref: "#/components/schemas/SnapshotInProgressErrorPayload"
  - $ref: "#/components/schemas/RateLimitExceededErrorPayload"
  - $ref: "#/components/schemas/CapacityExceededErrorPayload"
  - $ref: "#/components/schemas/AdmissionUnavailableErrorPayload"
  - $ref: "#/components/schemas/ChannelUnavailableErrorPayload"
  - $ref: "#/components/schemas/InternalErrorPayload"
description: Closed set of command errors that may optionally identify a sid.
```

##### `#/components/schemas/UnknownCommandErrorPayload`

```yaml
type: object
additionalProperties: false
description: The command is unsupported by the negotiated protocol version.
required:
  - code
  - detail
  - instance
properties:
  code:
    type: string
    const: unknown_command
    description: Stable machine-readable error code.
  detail:
    $ref: "#/components/schemas/ErrorDetail"
  instance:
    $ref: "#/components/schemas/ErrorInstance"
```

##### `#/components/schemas/InvalidParamsErrorPayload`

```yaml
type: object
additionalProperties: false
description: Command params fail schema or semantic validation.
required:
  - code
  - detail
  - instance
properties:
  code:
    type: string
    const: invalid_params
    description: Stable machine-readable error code.
  detail:
    $ref: "#/components/schemas/ErrorDetail"
  instance:
    $ref: "#/components/schemas/ErrorInstance"
  field:
    type: string
    minLength: 1
    maxLength: 255
    description: JSON path to the invalid param when one can be identified.
```

##### `#/components/schemas/CommandIdInUseErrorPayload`

```yaml
type: object
additionalProperties: false
description: Another command with the supplied identifier is still in flight.
required:
  - code
  - detail
  - instance
properties:
  code:
    type: string
    const: command_id_in_use
    description: Stable machine-readable error code.
  detail:
    $ref: "#/components/schemas/ErrorDetail"
  instance:
    $ref: "#/components/schemas/ErrorInstance"
```

##### `#/components/schemas/MarketNotFoundErrorPayload`

```yaml
type: object
additionalProperties: false
description: The market is absent from the caller-visible market catalog.
required:
  - code
  - detail
  - instance
  - ticker
properties:
  code:
    type: string
    const: market_not_found
    description: Stable machine-readable error code.
  detail:
    $ref: "#/components/schemas/ErrorDetail"
  instance:
    $ref: "#/components/schemas/ErrorInstance"
  ticker:
    $ref: "#/components/schemas/Ticker"
```

##### `#/components/schemas/QuoteNotFoundErrorPayload`

```yaml
type: object
additionalProperties: false
description: The addressed quote or RFQ is unknown, or is not the caller's to act on.
required:
  - code
  - detail
  - instance
properties:
  code:
    type: string
    const: quote_not_found
    description: Stable machine-readable error code.
  detail:
    $ref: "#/components/schemas/ErrorDetail"
  instance:
    $ref: "#/components/schemas/ErrorInstance"
```

##### `#/components/schemas/OrderNotFoundErrorPayload`

```yaml
type: object
additionalProperties: false
description: The addressed order is unknown, or is not the caller's to act on.
required:
  - code
  - detail
  - instance
properties:
  code:
    type: string
    const: order_not_found
    description: Stable machine-readable error code.
  detail:
    $ref: "#/components/schemas/ErrorDetail"
  instance:
    $ref: "#/components/schemas/ErrorInstance"
```

##### `#/components/schemas/PermissionDeniedErrorPayload`

```yaml
type: object
additionalProperties: false
description: The caller lacks required access.
required:
  - code
  - detail
  - instance
properties:
  code:
    type: string
    const: permission_denied
    description: Stable machine-readable error code.
  detail:
    $ref: "#/components/schemas/ErrorDetail"
  instance:
    $ref: "#/components/schemas/ErrorInstance"
```

##### `#/components/schemas/SubscriptionNotFoundErrorPayload`

```yaml
type: object
additionalProperties: false
description: The subscription identifier is not active on this connection.
required:
  - code
  - detail
  - instance
  - sid
properties:
  code:
    type: string
    const: subscription_not_found
    description: Stable machine-readable error code.
  detail:
    $ref: "#/components/schemas/ErrorDetail"
  instance:
    $ref: "#/components/schemas/ErrorInstance"
  sid:
    $ref: "#/components/schemas/SubscriptionId"
```

##### `#/components/schemas/SubscriptionNotReadyErrorPayload`

```yaml
type: object
additionalProperties: false
description: Current state is not yet established for the requested operation.
required:
  - code
  - detail
  - instance
properties:
  code:
    type: string
    const: subscription_not_ready
    description: Stable machine-readable error code.
  detail:
    $ref: "#/components/schemas/ErrorDetail"
  instance:
    $ref: "#/components/schemas/ErrorInstance"
```

##### `#/components/schemas/SnapshotInProgressErrorPayload`

```yaml
type: object
additionalProperties: false
description: The subscription already has a snapshot command in flight.
required:
  - code
  - detail
  - instance
properties:
  code:
    type: string
    const: snapshot_in_progress
    description: Stable machine-readable error code.
  detail:
    $ref: "#/components/schemas/ErrorDetail"
  instance:
    $ref: "#/components/schemas/ErrorInstance"
```

##### `#/components/schemas/RateLimitExceededErrorPayload`

```yaml
type: object
additionalProperties: false
description: A command rate limit was exceeded.
required:
  - code
  - detail
  - instance
  - retry_after_ms
properties:
  code:
    type: string
    const: rate_limit_exceeded
    description: Stable machine-readable error code.
  detail:
    $ref: "#/components/schemas/ErrorDetail"
  instance:
    $ref: "#/components/schemas/ErrorInstance"
  retry_after_ms:
    type: integer
    format: int64
    minimum: 1
    maximum: 86400000
    description: Minimum delay in milliseconds before another attempt.
```

##### `#/components/schemas/CapacityExceededErrorPayload`

```yaml
type: object
additionalProperties: false
description: A standing-resource limit prevents command admission.
required:
  - code
  - detail
  - instance
  - scope
  - resource
  - limit
properties:
  code:
    type: string
    const: capacity_exceeded
    description: Stable machine-readable error code.
  detail:
    $ref: "#/components/schemas/ErrorDetail"
  instance:
    $ref: "#/components/schemas/ErrorInstance"
  scope:
    type: string
    enum:
      - connection
      - member
      - process
    description: Boundary at which the standing-resource limit applies.
  resource:
    type: string
    enum:
      - in_flight_commands
      - active_subscriptions
      - market_data_streams
    description: Retained or concurrent resource that reached its limit.
  limit:
    type: integer
    format: int64
    minimum: 1
    maximum: 10000000
    description: Enforced maximum for the identified scope and resource.
```

##### `#/components/schemas/AdmissionUnavailableErrorPayload`

```yaml
type: object
additionalProperties: false
description: Shared admission policy or state is temporarily unavailable.
required:
  - code
  - detail
  - instance
properties:
  code:
    type: string
    const: admission_unavailable
    description: Stable machine-readable error code.
  detail:
    $ref: "#/components/schemas/ErrorDetail"
  instance:
    $ref: "#/components/schemas/ErrorInstance"
```

##### `#/components/schemas/ChannelUnavailableErrorPayload`

```yaml
type: object
additionalProperties: false
description: The channel's upstream source cannot serve the operation right now. Retry with backoff; the connection stays usable.
required:
  - code
  - detail
  - instance
properties:
  code:
    type: string
    const: channel_unavailable
    description: Stable machine-readable error code.
  detail:
    $ref: "#/components/schemas/ErrorDetail"
  instance:
    $ref: "#/components/schemas/ErrorInstance"
```

##### `#/components/schemas/InternalErrorPayload`

```yaml
type: object
additionalProperties: false
description: An unexpected failure left connection state safe to continue.
required:
  - code
  - detail
  - instance
properties:
  code:
    type: string
    const: internal_error
    description: Stable machine-readable error code.
  detail:
    $ref: "#/components/schemas/ErrorDetail"
  instance:
    $ref: "#/components/schemas/ErrorInstance"
```

##### `#/components/schemas/SubscriptionConflictCommandErrorEnvelope`

```yaml
type: object
additionalProperties: false
description: Rejected subscribe command identifying the conflicting subscription.
required:
  - id
  - type
  - sid
  - msg
properties:
  id:
    $ref: "#/components/schemas/CommandId"
  type:
    type: string
    const: error
    description: Identifies a rejected command.
  sid:
    $ref: "#/components/schemas/SubscriptionId"
  msg:
    $ref: "#/components/schemas/SubscriptionConflictErrorPayload"
```

##### `#/components/schemas/SubscriptionConflictErrorPayload`

```yaml
type: object
additionalProperties: false
description: The ticker already belongs to the identified subscription.
required:
  - code
  - detail
  - instance
  - ticker
properties:
  code:
    type: string
    const: subscription_conflict
    description: Stable machine-readable error code.
  detail:
    $ref: "#/components/schemas/ErrorDetail"
  instance:
    $ref: "#/components/schemas/ErrorInstance"
  ticker:
    $ref: "#/components/schemas/Ticker"
```

##### `#/components/schemas/SubscriptionErrorEnvelope`

```yaml
type: object
additionalProperties: false
description: Terminal failure for one subscription.
required:
  - type
  - sid
  - msg
properties:
  type:
    type: string
    const: error
    description: Identifies an error frame.
  sid:
    $ref: "#/components/schemas/SubscriptionId"
  msg:
    oneOf:
      - $ref: "#/components/schemas/PermissionDeniedErrorPayload"
      - $ref: "#/components/schemas/ChannelUnavailableErrorPayload"
      - $ref: "#/components/schemas/InternalErrorPayload"
    description: Closed set of terminal subscription failures.
```
