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

# 创建出金订单

> 在获取报价后创建 OTC 出金订单。

## 概述

本页说明 `POST /withdraw/open/otc/api/order/create` 接口。完整的请求参数、响应结构与示例由上方关联的 OpenAPI 定义渲染。

## 说明

* 认证方式使用 GatePay 标准签名请求头。
* 本页展示普通商户接口。
* 通用签名规则请参见 [/api-reference/version/100/cn/common/securityAndSignature](/api-reference/version/100/cn/common/securityAndSignature)。

## 使用建议

* 建议使用最新报价 token 创建出金订单。
* 请求中的银行账户应已完成审核并可用于结算。
* 为了后续对账，建议保留预估法币金额、手续费和最终结算金额等字段。
* 不应只依赖创建响应判断订单完成，建议配合回调和详情查询一起确认状态。


## OpenAPI

````yaml api-reference/version/100/cn/openapi/otc-fiat-openapi.json POST /withdraw/open/otc/api/order/create
openapi: 3.1.0
info:
  title: GatePay OTC 法币 API
  description: OTC 法币出金与入金 API 参考。
  version: 2.1.0
servers:
  - url: https://openplatform.gateapi.io
security: []
paths:
  /withdraw/open/otc/api/order/create:
    post:
      summary: 创建 OTC 出金订单
      description: 在获取报价后创建 OTC 出金订单。
      parameters:
        - $ref: '#/components/parameters/X-GatePay-Certificate-ClientId'
        - $ref: '#/components/parameters/X-GatePay-Signature'
        - $ref: '#/components/parameters/X-GatePay-Timestamp'
        - $ref: '#/components/parameters/X-GatePay-Nonce'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WithdrawalCreateRequest'
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderResponse'
components:
  parameters:
    X-GatePay-Certificate-ClientId:
      name: X-GatePay-Certificate-ClientId
      in: header
      required: true
      schema:
        type: string
      description: 用于标识调用应用的商户应用 ClientId。
    X-GatePay-Signature:
      name: X-GatePay-Signature
      in: header
      required: true
      schema:
        type: string
      description: 按 GatePay 签名规则生成的 HMAC 签名。
    X-GatePay-Timestamp:
      name: X-GatePay-Timestamp
      in: header
      required: true
      schema:
        type: string
      description: 用于防重放和验签的 Unix 时间戳。
    X-GatePay-Nonce:
      name: X-GatePay-Nonce
      in: header
      required: true
      schema:
        type: string
      description: 与时间戳配合使用的随机串，用于防止重放攻击。
  schemas:
    WithdrawalCreateRequest:
      type: object
      properties:
        quoteToken:
          type: string
          description: 询价接口返回的 quote token。
        bankAccountId:
          type: string
          description: 法币结算目标银行账户 ID。
        cryptoCurrency:
          type: string
          description: 卖出的数字货币币种。当前支持：USDT、USDC。
        fiatCurrency:
          type: string
          description: 结算法币币种。当前支持：USD。
        cryptoAmount:
          type: string
          description: 出金订单中的数字货币数量。
        fiatAmount:
          type: string
          description: 预期结算法币金额。
        type:
          type: string
          description: 订单类型。出金场景使用 SELL。
        clientOrderId:
          type: string
          description: 商户自定义唯一订单号。
      required:
        - quoteToken
        - bankAccountId
        - cryptoCurrency
        - fiatCurrency
        - cryptoAmount
        - fiatAmount
        - type
        - clientOrderId
    OrderResponse:
      type: object
      properties:
        code:
          type: string
          description: 业务响应码。
        status:
          type: string
          description: 请求顶层状态。
        errorMessage:
          type: string
          description: 请求失败时的错误信息。
        data:
          $ref: '#/components/schemas/OrderRecord'
          description: 订单详情数据。
    OrderRecord:
      type: object
      properties:
        orderId:
          type: string
          description: Gate OTC 订单 ID。
        status:
          type: string
          description: 当前订单状态。
        cryptoCurrency:
          type: string
          description: 数字货币币种代码。
        fiatCurrency:
          type: string
          description: 法币币种代码。
        cryptoAmount:
          type: string
          description: 数字货币数量。
        fiatAmount:
          type: string
          description: 法币金额。
        fiatRate:
          type: string
          description: 结算法币汇率。
        bankAccountId:
          type: string
          description: 订单关联的银行账户 ID。
        clientOrderId:
          type: string
          description: 商户自定义订单号。
        type:
          type: string
          description: OTC 订单类型，如 BUY 或 SELL。
        createTime:
          type: integer
          description: 订单创建时间戳。
        updateTime:
          type: integer
          description: 订单最后更新时间戳。
        errMsg:
          type: string
          description: 失败原因。
        tradeFee:
          type: string
          description: 手续费金额。
        finalFiatAmount:
          type: string
          description: 最终结算的法币金额。
        bankSlipInfo:
          type: string
          description: 银行回单或水单信息。
        promCode:
          type: string
          description: 创建订单时传入的优惠码。

````