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

# Cancel order by hash

> Cancels one order by hash without a market id in the path. Ownership is checked against the SIWE session or per-user API key. A personal API key is enough; JWT is optional. Distinct from `POST /markets/{id}/orders/cancel`, which takes `orderHash` in the body.



## OpenAPI

````yaml /api-spec/openapi.yaml post /orders/{hash}/cancel
openapi: 3.0.3
info:
  title: United Market API
  version: 1.0.0
  description: >-
    Public backend API for market data, trading, authentication, profiles,
    comments, and leaderboards.
servers:
  - url: https://api.unitedmarket.ai
    description: United Market backend
security: []
tags:
  - name: Markets
    description: >-
      Market discovery, market details, orderbooks, tickers, price history, and
      trades.
  - name: Orders
    description: Signed order submission, cancellation, order lookup, and balances.
  - name: Authentication
    description: SIWE wallet authentication.
  - name: Discovery
    description: Tags and market groups.
  - name: Social
    description: Comments, users, and leaderboard data.
  - name: Fees
    description: Effective trading fee rate per market.
  - name: Referral
    description: Referral codes, attribution, and reward summaries.
  - name: Sports
    description: Live and recently finished sports scores.
paths:
  /orders/{hash}/cancel:
    post:
      tags:
        - Orders
      summary: Cancel order by hash
      description: >-
        Cancels one order by hash without a market id in the path. Ownership is
        checked against the SIWE session or per-user API key. A personal API key
        is enough; JWT is optional. Distinct from `POST
        /markets/{id}/orders/cancel`, which takes `orderHash` in the body.
      operationId: cancelOrderByHash
      parameters:
        - name: hash
          in: path
          required: true
          schema:
            type: string
          description: Order hash.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                account:
                  type: string
                  description: >-
                    Optional authorized wallet when the session controls more
                    than one.
      responses:
        '200':
          description: Order cancelled.
          content:
            application/json:
              schema:
                type: object
                required:
                  - ok
                properties:
                  ok:
                    type: boolean
                    example: true
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - bearerAuth: []
components:
  responses:
    BadRequest:
      description: Invalid request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        message:
          type: string
          description: >-
            Human-readable error. Nested arrays are possible for validation
            errors.
        error:
          type: string
          description: >-
            Nest HTTP exception name (`Unauthorized`, `Bad Request`, `Not
            Found`). Present on most errors; a few handwritten responses omit it
            and only return `{ statusCode, message }`.
          example: Unauthorized
        statusCode:
          type: integer
          example: 401
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: SIWE access token returned by POST /auth/verify.

````