> ## 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.

# 批量创建永续合约订单

> 批量创建永续合约订单

批量创建永续合约订单。


## OpenAPI

````yaml openapi/perpdex.yaml POST /dex_futures/{settle}/batch_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_orders:
    post:
      tags:
        - 订单
      summary: 批量创建永续合约订单
      description: 批量创建永续合约订单。单次最多提交 10 笔订单。
      operationId: placeBatchPerpOrders
      parameters:
        - $ref: '#/components/parameters/Settle'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              maxItems: 10
              items:
                $ref: '#/components/schemas/DEXFuturesOrderRequest'
      responses:
        '200':
          description: 创建完成
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DEXFuturesOrder'
components:
  parameters:
    Settle:
      name: settle
      in: path
      required: true
      description: 结算币种
      schema:
        type: string
        enum:
          - usdt
      example: usdt
  schemas:
    DEXFuturesOrderRequest:
      type: object
      required:
        - contract
        - size
        - price
      properties:
        contract:
          type: string
          description: 永续合约
          example: BTC_USDT
        size:
          type: string
          description: 合约张数；正数买入、负数卖出，平仓可为 0
        iceberg:
          type: string
          description: 冰山单显示数量，0 表示非冰山单
        price:
          type: string
          description: 委托价格；price=0 且 tif=ioc 时为市价单
        close:
          type: boolean
          description: 是否平仓；为 true 时 size 需为 0
        reduce_only:
          type: boolean
          description: 是否只减仓
        tif:
          type: string
          description: 订单有效方式
          enum:
            - gtc
            - ioc
            - poc
            - fok
        text:
          type: string
          description: 自定义订单信息
        auto_size:
          type: string
          description: 双向持仓平仓方向
          enum:
            - close_long
            - close_short
        stp_act:
          type: string
          description: 自成交防护策略
          enum:
            - co
            - cn
            - cb
            - '-'
        bbo:
          type: string
          description: 对手价相关参数
        default_leverage:
          type: string
          description: 默认杠杆
        pid:
          type: integer
          format: int64
          description: Position ID
        order_value:
          type: string
          description: 订单价值
        trade_value:
          type: string
          description: 成交价值
        market_order_slip_ratio:
          type: string
          description: 市价单自定义最大滑点比例
    DEXFuturesOrder:
      allOf:
        - $ref: '#/components/schemas/DEXFuturesOrderRequest'
        - type: object
          properties:
            id:
              type: integer
              format: int64
              description: 订单 ID
            user:
              type: integer
              format: int64
              description: 用户 ID
            create_time:
              type: number
              format: double
              description: 创建时间
            update_time:
              type: number
              format: double
              description: 更新时间
            finish_time:
              type: number
              format: double
              description: 完成时间
            finish_as:
              type: string
              description: 订单完成原因
            status:
              type: string
              description: 订单状态
              enum:
                - open
                - finished
            left:
              type: string
              description: 未成交数量
            fill_price:
              type: string
              description: 平均成交价
            is_close:
              type: boolean
              description: 是否平仓单
            is_reduce_only:
              type: boolean
              description: 是否只减仓
            is_liq:
              type: boolean
              description: 是否强平单
            tkfr:
              type: string
              description: Taker 费率
            mkfr:
              type: string
              description: Maker 费率
            stp_id:
              type: integer
              format: int64
              description: STP 组字段
            amend_text:
              type: string
              description: 改单自定义信息
          additionalProperties: true
  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.