WhiteBIT · AsyncAPI Specification

WhiteBit Cancel All Orders

Version 1.0.0

Withdraw every order the authorized user holds on one market, filtered by trading type. One market per call — no all-markets form exists, so flattening everything means looping over the markets in use. The result is an empty object. No list of canceled orders comes back, and nothing matched is not an error.

View Spec View on GitHub CompanyCryptocurrencyExchangeTradingWebSocketAsyncAPIEventsWebSockets

Channels

/ws
Bulk order cancellation channel

Messages

✉
orderCancelAllRequest
Cancel all orders
Cancel every order on one market by trading type
✉
orderCancelAllResponse
Cancel All Orders Response
Empty result object

Servers

wss
production
WhiteBIT Global Server
wss
eu
WhiteBIT EU Server

AsyncAPI Specification

Raw ↑
asyncapi: 3.0.0
info:
  title: WhiteBit Cancel All Orders
  version: 1.0.0
  description: |
    Withdraw every order the authorized user holds on one market, filtered by trading type.

    One market per call — no all-markets form exists, so flattening everything means looping
    over the markets in use.

    The result is an empty object. No list of canceled orders comes back, and nothing matched
    is not an error.
  x-auth-required: true
  x-rate-limits:
    connections-per-minute: 1000
    requests-per-10-seconds: 12000
  x-error-codes:
    - code: 1
      message: order types must be an array
      description: "The `type` parameter is not an array."
    - code: 1
      message: at least one order type should be specified
      description: "The `type` array is empty."
    - code: 1
      message: invalid or duplicate order type
      description: "The `type` array holds an unknown value or a repeated entry."
    - code: 1
      message: market does not exist
      description: "The market name is unknown."

servers:
  production:
    host: wss.whitebit.com
    protocol: wss
    description: WhiteBIT Global Server
  eu:
    host: api.whitebit.eu
    protocol: wss
    description: WhiteBIT EU Server

channels:
  /ws:
    address: /ws
    description: Bulk order cancellation channel
    messages:
      orderCancelAllRequest:
        $ref: '#/components/messages/orderCancelAllRequest'
      orderCancelAllResponse:
        $ref: '#/components/messages/orderCancelAllResponse'

operations:
  sendOrderCancelAllRequest:
    action: receive
    channel:
      $ref: '#/channels/~1ws'
    messages:
      - $ref: '#/channels/~1ws/messages/orderCancelAllRequest'

  receiveOrderCancelAllResponse:
    action: send
    channel:
      $ref: '#/channels/~1ws'
    messages:
      - $ref: '#/channels/~1ws/messages/orderCancelAllResponse'

components:
  messages:
    orderCancelAllRequest:
      name: OrderCancelAllRequest
      title: Cancel all orders
      summary: Cancel every order on one market by trading type
      payload:
        $ref: '#/components/schemas/OrderCancelAllRequest'
      examples:
        - name: orderCancelAllTypes
          summary: |
            Cancel all types on one market with parameters:
            - params[0]: object with market and the type array
          payload:
            id: 500085
            method: order_cancel_all
            params:
              - market: ETH_USDT
                type:
                  - spot
                  - futures
                  - margin

    orderCancelAllResponse:
      name: OrderCancelAllResponse
      title: Cancel All Orders Response
      summary: Empty result object
      payload:
        $ref: '#/components/schemas/OrderCancelAllResponse'
      examples:
        - name: orderCancelAllAccepted
          summary: Request accepted; the result carries no payload
          payload:
            id: 500085
            result: {}
            error: null

  schemas:
    OrderCancelAllRequest:
      type: object
      required:
        - id
        - method
        - params
      properties:
        id:
          type: integer
          description: Unique request identifier. The response echoes this value.
        method:
          type: string
          const: order_cancel_all
          description: "Method name. Fixed value: `order_cancel_all`."
        params:
          type: array
          minItems: 1
          maxItems: 1
          items:
            $ref: '#/components/schemas/OrderCancelAllParams'
          description: Array containing exactly one parameter object

    OrderCancelAllParams:
      type: object
      required:
        - market
        - type
      properties:
        market:
          type: string
          description: "Market to clear. One market per call."
          example: ETH_USDT
        type:
          type: array
          minItems: 1
          maxItems: 3
          items:
            type: string
            enum: ["spot", "margin", "futures"]
          description: "Which order kinds to cancel — any non-empty combination of `spot`, `margin`, and `futures`. An empty array or a duplicate entry returns error `1`. Passing all three is safe on any market, because types that do not apply are simply not matched."

    OrderCancelAllResponse:
      type: object
      required:
        - id
        - result
        - error
      properties:
        id:
          type: integer
          description: Request identifier matching the request
        result:
          type: object
          description: "Empty object. No list of canceled orders is returned, and nothing matched is not an error — re-query pending orders to confirm the outcome."
        error:
          type: "null"
          description: Error object (null on success)

Work with this as data

Every AsyncAPI spec here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for asyncapi

4 MCP tools reach this
  • find_asyncapisBrowse and filter every AsyncAPI spec in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This AsyncAPI spec
curl "https://apis.io/api/v1/asyncapis/whitebit-private-order-cancel-all-asyncapi"
All asyncapi
curl "https://apis.io/api/v1/asyncapis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.