> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bulk.trade/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel Rejections

> Rejected single-order and cancel-all requests on the account stream.

Identify cancellation requests that were rejected on the shared
[account subscription](https://docs.bulk.trade/api-reference/ws-account.md). Both event types arrive
on the same subscription; this grouping does not apply a network-side filter.
Dispatch received messages by `data.type`.

## Handling rejections

* `cancelOneRejected` identifies the `symbol` and `orderId` of a rejected
  single-order cancellation, with a human-readable `reason`, such as an order
  not being found.
* `cancelAllRejected` identifies the `symbol` and rejection `reason` for a
  cancel-all request, such as no open orders being available to cancel.

A rejection is not confirmation that an order was cancelled. Reconcile order
state through [order updates](https://docs.bulk.trade/api-reference/ws-account/orders.md) and the
[account snapshot](https://docs.bulk.trade/api-reference/ws-account/snapshot.md). Both rejection types
carry nanosecond `timestamp` values; preserve integer precision when decoding.


## AsyncAPI

````yaml api-reference/asyncapi.yaml account-rejections
id: account-rejections
title: Cancel rejections
description: >-
  Public read-only account subscription; no signature. This channel is a
  documentation view of selected messages, not a network-side event filter.
  Every view sends the same account subscription and the live connection can
  receive all account event types. Wait for accountSnapshot before treating
  account state as ready. Snapshot replaces state; identify positions by symbol
  and isoPubkey and subscribe to subaccounts separately. No replay cursor. Save
  the acknowledged topic for unsubscribe. Unsubscribe using the acknowledged
  topic; see [Connection Management](/api-reference/ws-connection#unsubscribe).
servers:
  - id: mainnet
    protocol: wss
    host: mainnet-ws1.bulk.trade
    bindings: []
    variables: []
  - id: testnet
    protocol: wss
    host: exchange-ws1.bulk.trade
    bindings: []
    variables: []
address: /
parameters: []
bindings: []
operations:
  - &ref_1
    id: account-rejectionsSubscribe
    title: Subscribe
    type: receive
    messages:
      - &ref_3
        id: subscribe
        contentType: application/json
        payload:
          - name: Subscribe
            description: >-
              Schema defaults on this request are playground example prefills,
              not omitted-field defaults accepted by the network endpoint.
            type: object
            properties:
              - name: method
                type: string
                enumValues:
                  - subscribe
                required: true
              - name: subscription
                type: array
                description: >-
                  Playground form template only. Paste an account public key
                  into user before sending; the blank value is not a valid
                  account and no account is preselected.
                required: true
                properties:
                  - name: type
                    type: string
                    enumValues:
                      - account
                    required: true
                  - name: user
                    type: oneOf
                    description: >-
                      Paste the account public key to observe. No account is
                      preselected.
                    required: true
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            method:
              type: string
              enum:
                - subscribe
              default: subscribe
              x-parser-schema-id: <anonymous-schema-312>
            subscription:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - account
                    default: account
                    x-parser-schema-id: <anonymous-schema-315>
                  user:
                    oneOf:
                      - type: string
                        description: Account public key in base58.
                        x-parser-schema-id: <anonymous-schema-317>
                      - type: array
                        minItems: 1
                        items:
                          type: string
                          x-parser-schema-id: <anonymous-schema-319>
                        x-parser-schema-id: <anonymous-schema-318>
                    description: >-
                      Paste the account public key to observe. No account is
                      preselected.
                    x-parser-schema-id: <anonymous-schema-316>
                required:
                  - type
                  - user
                x-parser-schema-id: <anonymous-schema-314>
              minItems: 1
              default:
                - type: account
                  user: ''
              description: >-
                Playground form template only. Paste an account public key into
                user before sending; the blank value is not a valid account and
                no account is preselected.
              x-parser-schema-id: <anonymous-schema-313>
          required:
            - method
            - subscription
          x-parser-schema-id: <anonymous-schema-311>
        title: Subscribe
        description: >-
          Schema defaults on this request are playground example prefills, not
          omitted-field defaults accepted by the network endpoint.
        example: |-
          {
            "method": "subscribe",
            "subscription": [
              {
                "type": "account",
                "user": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7"
              }
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribe
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: account-rejections
  - &ref_2
    id: account-rejectionsEvents
    title: Receive events
    type: send
    messages:
      - &ref_4
        id: cancelOneRejected
        contentType: application/json
        payload:
          - name: Cancel rejected
            description: Network-published cancelOneRejected
            type: object
            properties:
              - name: type
                type: string
                enumValues:
                  - account
                required: true
              - name: data
                type: object
                required: true
                properties:
                  - name: type
                    type: string
                    enumValues:
                      - cancelOneRejected
                    required: true
                  - name: symbol
                    type: string
                    required: false
                  - name: orderId
                    type: string
                    required: false
                  - name: reason
                    type: string
                    required: false
                  - name: timestamp
                    type: number
                    description: Unix timestamp in nanoseconds.
                    required: false
              - name: topic
                type: string
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              enum:
                - account
              x-parser-schema-id: <anonymous-schema-559>
            data:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - cancelOneRejected
                  x-parser-schema-id: <anonymous-schema-561>
                symbol:
                  type: string
                  x-parser-schema-id: <anonymous-schema-562>
                orderId:
                  type: string
                  x-parser-schema-id: <anonymous-schema-563>
                reason:
                  type: string
                  x-parser-schema-id: <anonymous-schema-564>
                timestamp:
                  type: number
                  description: Unix timestamp in nanoseconds.
                  x-parser-schema-id: <anonymous-schema-565>
              required:
                - type
              x-parser-schema-id: <anonymous-schema-560>
            topic:
              type: string
              x-parser-schema-id: <anonymous-schema-566>
          required:
            - type
            - data
            - topic
          x-parser-schema-id: <anonymous-schema-558>
        title: Cancel rejected
        description: Network-published cancelOneRejected
        example: |-
          {
            "type": "account",
            "data": {
              "type": "cancelOneRejected",
              "symbol": "BTC-USD",
              "orderId": "Fpa3oVuL3UzjNANAMZZdmrn6D1Zhk83GmBuJpuAWG51F",
              "reason": "Order not found",
              "timestamp": 1763316177219383300
            },
            "topic": "account.FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: cancelOneRejected
      - &ref_5
        id: cancelAllRejected
        contentType: application/json
        payload:
          - name: Cancel all rejected
            description: Network-published cancelAllRejected
            type: object
            properties:
              - name: type
                type: string
                enumValues:
                  - account
                required: true
              - name: data
                type: object
                required: true
                properties:
                  - name: type
                    type: string
                    enumValues:
                      - cancelAllRejected
                    required: true
                  - name: symbol
                    type: string
                    required: false
                  - name: reason
                    type: string
                    required: false
                  - name: timestamp
                    type: number
                    description: Unix timestamp in nanoseconds.
                    required: false
              - name: topic
                type: string
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              enum:
                - account
              x-parser-schema-id: <anonymous-schema-568>
            data:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - cancelAllRejected
                  x-parser-schema-id: <anonymous-schema-570>
                symbol:
                  type: string
                  x-parser-schema-id: <anonymous-schema-571>
                reason:
                  type: string
                  x-parser-schema-id: <anonymous-schema-572>
                timestamp:
                  type: number
                  description: Unix timestamp in nanoseconds.
                  x-parser-schema-id: <anonymous-schema-573>
              required:
                - type
              x-parser-schema-id: <anonymous-schema-569>
            topic:
              type: string
              x-parser-schema-id: <anonymous-schema-574>
          required:
            - type
            - data
            - topic
          x-parser-schema-id: <anonymous-schema-567>
        title: Cancel all rejected
        description: Network-published cancelAllRejected
        example: |-
          {
            "type": "account",
            "data": {
              "type": "cancelAllRejected",
              "symbol": "BTC-USD",
              "reason": "No open orders",
              "timestamp": 1763316177219383300
            },
            "topic": "account.FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: cancelAllRejected
      - &ref_6
        id: subscribed
        contentType: application/json
        payload:
          - name: Subscribed
            type: object
            properties:
              - name: type
                type: string
                enumValues:
                  - subscriptionResponse
                required: true
              - name: topics
                type: array
                required: false
                properties:
                  - name: item
                    type: string
                    required: false
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              enum:
                - subscriptionResponse
              x-parser-schema-id: <anonymous-schema-418>
            topics:
              type: array
              items:
                type: string
                x-parser-schema-id: <anonymous-schema-420>
              x-parser-schema-id: <anonymous-schema-419>
          required:
            - type
          x-parser-schema-id: <anonymous-schema-417>
        title: Subscribed
        example: |-
          {
            "type": "subscriptionResponse",
            "topics": [
              "account.FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7"
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribed
      - &ref_7
        id: unsubscribed
        contentType: application/json
        payload:
          - name: Unsubscribed
            type: object
            properties:
              - name: type
                type: string
                enumValues:
                  - unsubscribeResponse
                required: true
              - name: topic
                type: string
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              enum:
                - unsubscribeResponse
              x-parser-schema-id: <anonymous-schema-422>
            topic:
              type: string
              x-parser-schema-id: <anonymous-schema-423>
          required:
            - type
          x-parser-schema-id: <anonymous-schema-421>
        title: Unsubscribed
        example: |-
          {
            "type": "unsubscribeResponse",
            "topic": "account.FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: unsubscribed
    bindings: []
    extensions: *ref_0
sendOperations:
  - *ref_1
receiveOperations:
  - *ref_2
sendMessages:
  - *ref_3
receiveMessages:
  - *ref_4
  - *ref_5
  - *ref_6
  - *ref_7
extensions:
  - id: x-parser-unique-object-id
    value: account-rejections
securitySchemes: []

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.