> ## 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 Convert Order

> Initiate convert.

## Overview

This page documents the `POST /payment/open/institution/v1/pay/convert` 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).


## OpenAPI

````yaml /api-reference/version/100/en/openapi/institution/convert-openapi.json POST /payment/open/institution/v1/pay/convert
openapi: 3.1.0
info:
  title: GatePay Balance Account Convert API
  description: >-
    Provides an API for direct convert from the balance account, avoiding the
    need for users to first transfer to the spot account.
  version: 1.0.0
servers:
  - url: https://openplatform.gateapi.io
security: []
paths:
  /payment/open/institution/v1/pay/convert:
    post:
      summary: Initiate Convert
      description: Initiate convert.
      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/ConvertRequest'
            examples:
              default:
                value:
                  clientReqId: '181147'
                  sellCurrency: GT
                  buyCurrency: USDT
                  buyAmount: '1'
                  sellAmount: '0.04464002'
                  quoteId: PAY-2a5743d8
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConvertOrderResponse'
              examples:
                success:
                  summary: Success response
                  value:
                    status: SUCCESS
                    code: '000000'
                    errorMessage: ''
                    data:
                      order_id: '327196066546229248'
                      userId: 10002
                      sellCurrency: GT
                      buyCurrency: USDT
                      sellAmount: '0.04464002'
                      buyAmount: '1'
                      status: 1
                      rate: 22.40142365527614
                      quoteId: PAY-2a5743d8
                      createTime: 1739971221273
components:
  parameters:
    X-GatePay-Certificate-ClientId:
      name: X-GatePay-Certificate-ClientId
      in: header
      required: true
      description: Merchant client ID assigned when registering the application
      schema:
        type: string
        example: mZ96D37oKk-HrWJc
    X-GatePay-Signature:
      name: X-GatePay-Signature
      in: header
      required: true
      description: Request signature for verification
      schema:
        type: string
        example: >-
          8504fe097f7297f8952c76e628ce59dbc93d1df64c95f26c73140ef365d4aa1471826ada0534315461682ec35c131d7e133c51d2ab0822fe7366650a111887ba
    X-GatePay-Timestamp:
      name: X-GatePay-Timestamp
      in: header
      required: true
      description: UTC timestamp in milliseconds
      schema:
        type: string
        example: '1740019013818'
    X-GatePay-Nonce:
      name: X-GatePay-Nonce
      in: header
      required: true
      description: Random string, recommended length within 32 characters
      schema:
        type: string
        example: '9722139164'
    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:
    ConvertRequest:
      type: object
      required:
        - clientReqId
        - quoteId
        - buyAmount
        - buyCurrency
        - sellAmount
        - sellCurrency
      properties:
        clientReqId:
          type: string
          description: >-
            Client request ID (randomly generated by the user to ensure
            idempotency)
        quoteId:
          type: string
          description: Quote ID (must match the one returned by the preview interface)
        buyAmount:
          type: string
          description: >-
            Purchase amount (must match the one returned by the preview
            interface)
        buyCurrency:
          type: string
          description: >-
            Purchase currency (must match the one returned by the preview
            interface)
        sellAmount:
          type: string
          description: Sell amount (must match the one returned by the preview interface)
        sellCurrency:
          type: string
          description: Sell currency (must match the one returned by the preview interface)
    ConvertOrderResponse:
      type: object
      properties:
        status:
          type: string
        code:
          type: string
        errorMessage:
          type: string
        data:
          $ref: '#/components/schemas/ConvertOrderData'
    ConvertOrderData:
      type: object
      properties:
        order_id:
          type: string
          description: Order ID
        userId:
          type: string
          description: User ID
        sellCurrency:
          type: string
          description: Sell currency
        buyCurrency:
          type: string
          description: Buy currency
        sellAmount:
          type: string
          description: Sell amount
        buyAmount:
          type: string
          description: Buy amount
        status:
          type: string
          description: 'Status: 1 - Created successfully, 3 - Success, 6 - Failed'
        rate:
          type: string
          description: Price
        quoteId:
          type: string
          description: Quote ID
        createTime:
          type: string
          description: Creation time

````