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

# 按 ID 批量取消訂單

> 按訂單 ID 清單批量取消訂單

按訂單 ID 清單批量取消訂單。


## OpenAPI

````yaml openapi/perpdex-zh-TW.yaml POST /dex_futures/{settle}/batch_cancel_orders
openapi: 3.0.3
info:
  title: DexBuilder PerpDEX API
  version: 1.0.0
  description: DexBuilder PerpDEX REST API。
servers:
  - url: https://api.dexbuilder.com/api/v1
    description: DexBuilder PerpDEX REST API
security:
  - DexBuilderKey: []
    DexBuilderTimestamp: []
    DexBuilderSignature: []
tags:
  - name: 行情
    description: 永續合約公開行情與市場資料
  - name: 風險資料
    description: 風險限額與市場強平資料
  - name: 帳戶
    description: 帳戶與費率
  - name: 持倉
    description: 持倉查詢與管理
  - name: 訂單
    description: 訂單、成交與批量交易
paths:
  /dex_futures/{settle}/batch_cancel_orders:
    post:
      tags:
        - 訂單
      summary: 按 ID 批量取消訂單
      description: 按訂單 ID 清單批量取消訂單，單次最多 20 筆。
      operationId: cancelBatchPerpOrders
      parameters:
        - $ref: '#/components/parameters/Settle'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              maxItems: 20
              items:
                type: string
      responses:
        '200':
          description: 取消完成
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CancelOrderResult'
components:
  parameters:
    Settle:
      name: settle
      in: path
      required: true
      description: 結算幣種
      schema:
        type: string
        enum:
          - usdt
      example: usdt
  schemas:
    CancelOrderResult:
      type: object
      properties:
        id:
          type: string
          description: 訂單 ID
        user_id:
          type: integer
          format: int64
          description: 使用者 ID
        succeeded:
          type: boolean
          description: 是否取消成功
        message:
          type: string
          description: 失敗原因，成功時為空
  securitySchemes:
    DexBuilderKey:
      type: apiKey
      in: header
      name: KEY
      description: DexBuilder API Key
    DexBuilderTimestamp:
      type: apiKey
      in: header
      name: Timestamp
      description: Unix 時間戳（秒），與目前時間差不得超過 60 秒
    DexBuilderSignature:
      type: apiKey
      in: header
      name: SIGN
      description: 使用 API Secret 對簽名字串執行 HMAC-SHA512 後的十六進制簽名

````

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