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

# Cancel specific orders

> Cancel one or more orders by filter. At least one filter must be provided. Multiple filters are combined with OR logic.

**Filters:**
- `orderIds` — List of numeric order IDs
- `requestUuids` — List of request UUID strings
- `userRef` — Cancel all orders matching this user reference

**Behavior:**
- Only orders in PENDING or PARTIALLY_FILLED status can be cancelled
- Orders with confirmed bets cannot be fully cancelled
- Cancelled orders are marked in the database and signaled to stop retry loops



## OpenAPI

````yaml /zh/abp-api/openapi.json post /cancel-orders
openapi: 3.1.0
info:
  title: ABP v2 - Automated Bet Placing API
  description: >

    Place bets across 32 bookmakers through a single API.


    ## Authentication


    All endpoints require the `x-api-key` header (except `/health`, `/ready`,
    `/status`, `/metrics`).


    **Swagger UI**: Click the **Authorize** button (lock icon) at the top right,
    enter your API key, and click **Authorize**.


    ## Quick Start


    1. **List your accounts**: `GET /accounts`

    2. **Get live odds**: `GET /betslip?fixtureId=...&outcomeId=...&playerId=0`

    3. **Place an order**: `POST /place-orders`

    4. **Track results**: `GET /orders` or subscribe to WebSocket updates


    ## WebSocket


    Connect to `/ws` for real-time order, bet, and settlement updates.


    ```json

    {"type": "login", "apiKey": "your-api-key", "channels": []}

    ```


    Send an empty `channels` array to receive all updates. Available channels:
    `orders`, `bets`, `settlements`, `accounts`, `balance`, `betslip`,
    `fixtures`, `currencies`, `status`, `emergency`.


    Send `{"type": "ping"}` every 30 seconds to keep the connection alive.
  version: '2.0'
servers:
  - url: https://v2.55-tech.com
    description: Production
security:
  - apiKey: []
tags:
  - name: Orders
    description: Place, retrieve, and cancel betting orders
  - name: Bets
    description: Query individual bets placed with bookmakers
  - name: Betslip
    description: Get live odds and metadata for fixtures
  - name: Accounts
    description: Manage bookmaker accounts
  - name: Markets
    description: Get available markets and odds types
  - name: Bookmakers
    description: List supported bookmakers
  - name: Analytics
    description: Positions and profit/loss analytics
paths:
  /cancel-orders:
    post:
      tags:
        - Orders
      summary: Cancel specific orders
      description: >-
        Cancel one or more orders by filter. At least one filter must be
        provided. Multiple filters are combined with OR logic.


        **Filters:**

        - `orderIds` — List of numeric order IDs

        - `requestUuids` — List of request UUID strings

        - `userRef` — Cancel all orders matching this user reference


        **Behavior:**

        - Only orders in PENDING or PARTIALLY_FILLED status can be cancelled

        - Orders with confirmed bets cannot be fully cancelled

        - Cancelled orders are marked in the database and signaled to stop retry
        loops
      operationId: cancel_orders
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelOrdersRequest'
            example:
              requestUuids:
                - ee9f4007-e5ab-4085-bffb-8d938e4cad5f
                - fb5f2dd9-c855-4ba9-8ef9-4c2278ca2f1d
      responses:
        '200':
          description: Cancellation result with enriched order details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelOrdersResponse'
              example:
                status: cancelled
                cancelledCount: 1
                cancelled:
                  - orderId: 327
                    requestUuid: eb45b192-317b-42d5-9f65-af497b9fa8c1
                    allowedBookmakers: '*'
                    fixtureId: id1000004461512432
                    outcomeId: 103
                    playerId: 0
                    orderPrice: 1.95
                    orderStake: 10
                    filledStake: 0
                    userRef: bettor1234
                    testOrder: false
                    orderCurrency: USD
                    back: true
                    expiresAt: '2026-02-07T12:20:06.302841+00:00'
                    acceptBetterOdds: true
                    acceptPartialStake: true
                    clientName: demo
                    orderStatus: CANCELLED
                    createdAt: '2026-02-07T12:20:01.302841+00:00'
                    updatedAt: '2026-02-07T12:20:01.302841+00:00'
                    meta: null
                    bets: []
                    fixtureInfo:
                      fixtureId: id1000004461512432
                      status:
                        live: false
                        statusId: 0
                        statusName: Pre-Game
                      sport:
                        sportId: 10
                        sportName: Soccer
                      tournament:
                        tournamentId: 44
                        tournamentName: 2. Bundesliga
                        categoryName: Germany
                    outcomeInfo:
                      marketId: 101
                      marketName: Full Time Result
                      outcomeId: 103
                      outcomeName: '2'
                notCancelled:
                  reason: Order not cancellable
                  orders: []
        '400':
          description: >-
            Missing required filter parameter (at least one of orderIds,
            requestUuids, or userRef required)
        '401':
          description: Unauthorized — missing or invalid API key
        '403':
          description: Access denied — client not resolved from API key
        '404':
          description: No matching orders found
        '500':
          description: Internal server error
components:
  schemas:
    CancelOrdersRequest:
      type: object
      description: >-
        At least one filter must be provided. Multiple filters are combined with
        OR logic.
      properties:
        orderIds:
          type: array
          items:
            type: integer
          nullable: true
          description: List of numeric order IDs to cancel
        requestUuids:
          type: array
          items:
            type: string
            format: uuid
          nullable: true
          description: List of request UUIDs to cancel
        userRef:
          type: string
          nullable: true
          description: Cancel all orders matching this user reference
    CancelOrdersResponse:
      type: object
      properties:
        status:
          type: string
          description: '''cancelled'''
        cancelledCount:
          type: integer
          description: Number of orders cancelled
        cancelled:
          type: array
          items:
            type: object
          description: Cancelled orders with enriched details
        notCancelled:
          type: object
          properties:
            reason:
              type: string
            orders:
              type: array
              items:
                type: object
          description: Orders that could not be cancelled
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication. Contact contact@55-tech.com to obtain a key.

````