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

# 事件合約轉帳

> 在現貨帳戶與事件合約帳戶之間發起 USDT 劃轉

在支援的帳戶類型與事件合約帳戶之間發起 USDT 劃轉。

> [!NOTE]
>
> 此介面為私有介面，需要按照事件合約認證要求完成認證後呼叫。


## OpenAPI

````yaml openapi/event-contracts-zh-TW.yaml POST /api/v4/broker/event_contracts/transfer
openapi: 3.0.3
info:
  title: DexBuilder Event Contracts API
  version: 1.0.0
  description: DexBuilder 事件合約 REST API
servers:
  - url: https://api.dexbuilder.com
security: []
paths:
  /api/v4/broker/event_contracts/transfer:
    post:
      summary: 事件合約轉帳
      description: 在現貨帳戶與事件合約子帳戶之間發起 USDT 劃轉。
      operationId: transfer
      parameters:
        - name: Timestamp
          in: header
          required: true
          description: Unix 秒級時間戳；與閘道時間的差距不得超過 60 秒。
          schema:
            type: string
        - name: SIGN
          in: header
          required: true
          description: 使用實際對外請求路徑、Query 與 Body 計算的 HMAC-SHA512 十六進位簽名。
          schema:
            type: string
        - name: X-User-Wallet-Address
          in: header
          required: true
          description: 目標終端使用者的錢包地址；閘道會驗證該錢包屬於目前 Broker。
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - from_account
                - to_account
                - currency
                - amount
                - client_oid
              properties:
                from_account:
                  type: string
                  enum:
                    - spot
                    - sub_spot
                    - event_contract
                to_account:
                  type: string
                  enum:
                    - spot
                    - sub_spot
                    - event_contract
                currency:
                  type: string
                  enum:
                    - USDT
                amount:
                  type: string
                client_oid:
                  type: string
      responses:
        '200':
          description: 請求成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransferData'
        '400':
          description: 請求參數錯誤
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: 驗證失敗
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: 服務暫時不可用
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - BrokerAPIKey: []
components:
  schemas:
    TransferData:
      type: object
      properties:
        amount:
          type: string
          example: '1.2'
        currency:
          type: string
          enum:
            - USDT
          example: USDT
        from_account:
          type: string
          enum:
            - spot
            - sub_spot
          example: spot
        status:
          type: string
          enum:
            - SUCCESS
          example: SUCCESS
        to_account:
          type: string
          enum:
            - spot
            - sub_spot
          example: sub_spot
        transfer_id:
          type: string
          example: '123'
      description: 回應物件。
    Error:
      type: object
      description: 錯誤回應。
      properties:
        label:
          type: string
          example: INVALID_ARGUMENT
        message:
          type: string
          example: invalid request
  securitySchemes:
    BrokerAPIKey:
      type: apiKey
      in: header
      name: KEY
      description: Broker API Key，由專案管理流程建立。

````

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