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

# Create Withdrawal Order

> Create an OTC withdrawal order after obtaining a quote.

## Overview

This page documents the `POST /withdraw/open/institution/otc/api/order/create` endpoint. The full schema, parameters, and examples are rendered from the linked OpenAPI definition above.

## Notes

* Authentication uses the standard GatePay signed headers.
* This page documents the standard merchant endpoint.
* For shared signing rules, see [/api-reference/version/100/en/common/securityAndSignature](/api-reference/version/100/en/common/securityAndSignature).

## Usage Guidance

* Create the order with a fresh quote token.
* Make sure the bank account used in the request is already approved and available for settlement.
* Store the expected fiat amount, trade fee fields, and final settlement information for reconciliation.
* Use callback plus detail query rather than relying on creation response alone.


## OpenAPI

````yaml /api-reference/version/100/en/openapi/institution/otc-fiat-openapi.json POST /withdraw/open/institution/otc/api/order/create
openapi: 3.1.0
info:
  title: GatePay OTC Fiat API
  description: Reference for OTC fiat withdrawal and deposit APIs.
  version: 2.1.0
servers:
  - url: https://openplatform.gateapi.io
security: []
paths:
  /withdraw/open/institution/otc/api/order/create:
    post:
      summary: Create OTC Withdrawal Order
      description: Create an OTC withdrawal order after obtaining a quote.
      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'
        - $ref: '#/components/parameters/X-GatePay-On-Behalf-Of'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WithdrawalCreateRequest'
      responses:
        '200':
          description: Success
          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: Merchant application client ID used to identify the calling app.
    X-GatePay-Signature:
      name: X-GatePay-Signature
      in: header
      required: true
      schema:
        type: string
      description: >-
        HMAC signature generated from the request according to GatePay signing
        rules.
    X-GatePay-Timestamp:
      name: X-GatePay-Timestamp
      in: header
      required: true
      schema:
        type: string
      description: Unix timestamp used for replay protection and signature verification.
    X-GatePay-Nonce:
      name: X-GatePay-Nonce
      in: header
      required: true
      schema:
        type: string
      description: Random nonce used together with the timestamp to prevent replay attacks.
    X-GatePay-On-Behalf-Of:
      name: X-GatePay-On-Behalf-Of
      in: header
      required: true
      schema:
        type: string
      description: >-
        Required delegated-subject header. Provide the initiating account ID for
        this request. For institution merchant APIs, this is typically the
        target sub-account ID; for institution charge and transfer APIs, it can
        be either an institution account ID or a sub-account ID.
  schemas:
    WithdrawalCreateRequest:
      type: object
      properties:
        quoteToken:
          type: string
          description: Quote token returned by the quote API.
        bankAccountId:
          type: string
          description: Destination bank account ID for fiat settlement.
        cryptoCurrency:
          type: string
          description: 'Cryptocurrency being sold. Currently supported: USDT, USDC.'
        fiatCurrency:
          type: string
          description: 'Fiat currency to be settled out. Currently supported: USD.'
        cryptoAmount:
          type: string
          description: Crypto amount for the withdrawal order.
        fiatAmount:
          type: string
          description: Expected fiat settlement amount.
        type:
          type: string
          description: Order type. Use SELL for off-ramp.
        clientOrderId:
          type: string
          description: Merchant-defined unique order ID.
      required:
        - quoteToken
        - bankAccountId
        - cryptoCurrency
        - fiatCurrency
        - cryptoAmount
        - fiatAmount
        - type
        - clientOrderId
    OrderResponse:
      type: object
      properties:
        code:
          type: string
          description: Business response code.
        status:
          type: string
          description: Top-level request status.
        errorMessage:
          type: string
          description: Error message when the request fails.
        data:
          $ref: '#/components/schemas/OrderRecord'
          description: Order detail payload.
    OrderRecord:
      type: object
      properties:
        orderId:
          type: string
          description: Gate OTC order ID.
        status:
          type: string
          description: Current order status.
        cryptoCurrency:
          type: string
          description: Cryptocurrency code.
        fiatCurrency:
          type: string
          description: Fiat currency code.
        cryptoAmount:
          type: string
          description: Cryptocurrency amount.
        fiatAmount:
          type: string
          description: Fiat amount.
        fiatRate:
          type: string
          description: Settlement fiat rate.
        bankAccountId:
          type: string
          description: Bank account ID associated with the order.
        clientOrderId:
          type: string
          description: Merchant-defined order ID.
        type:
          type: string
          description: OTC order type such as BUY or SELL.
        createTime:
          type: integer
          description: Order creation timestamp.
        updateTime:
          type: integer
          description: Last update timestamp.
        errMsg:
          type: string
          description: Failure reason.
        tradeFee:
          type: string
          description: Fee amount.
        finalFiatAmount:
          type: string
          description: Final settled fiat amount.
        bankSlipInfo:
          type: string
          description: Bank slip information.
        promCode:
          type: string
          description: Promotion code passed when creating the order.

````