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

# Cancel Orders by Instrument

> Send POST request to /exchange, or use the ExchangeClient SDKs.

Cancel all open orders by instrument.


## OpenAPI

````yaml openapi/exchange/trading/cancel-by-instrument.json POST /exchange
openapi: 3.0.3
info:
  title: Hotstuff Exchange API — Cancel Orders by Instrument
  version: 1.0.0
servers:
  - url: https://api.hotstuff.trade
security: []
paths:
  /exchange:
    post:
      summary: Cancel Orders by Instrument
      operationId: exchangeTradingCancelByInstrument
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  type: object
                  properties:
                    data:
                      type: object
                      properties:
                        instrumentId:
                          type: integer
                        expiresAfter:
                          type: integer
                        nonce:
                          type: integer
                      required:
                        - instrumentId
                        - expiresAfter
                        - nonce
                    type:
                      type: string
                  required:
                    - data
                    - type
                signature:
                  type: string
                nonce:
                  type: integer
              required:
                - action
                - signature
                - nonce
              example:
                action:
                  data:
                    instrumentId: 1
                    expiresAfter: 1769692563352
                    nonce: 1769688963352
                  type: cancelByInstrument
                signature: >-
                  0xb429a7136360bdc0dc128730c194ca6e718de8ccd2ae2acc8e11c9cdf86acb29...
                nonce: 1769688963352
            examples:
              default:
                summary: Example request
                value:
                  action:
                    data:
                      instrumentId: 1
                      expiresAfter: 1769692563352
                      nonce: 1769688963352
                    type: cancelByInstrument
                  signature: >-
                    0xb429a7136360bdc0dc128730c194ca6e718de8ccd2ae2acc8e11c9cdf86acb29...
                  nonce: 1769688963352
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  tx_hash:
                    type: string
                  tx_type:
                    type: integer
                  error:
                    type: string
                  data:
                    type: object
                    properties:
                      success:
                        type: string
                      orders_cancelled:
                        type: integer
                  address:
                    type: string
              example:
                tx_hash: >-
                  0x7c573d0d802c800a58793bb378b89773f28c2505bcca19f7c20b0ab0e4d66e9e
                tx_type: 1313
                error: ''
                data:
                  success: 'true'
                  orders_cancelled: 5
                address: '0x9908658A316D743159F001026F1ef08aa8F0b55B'

````

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