> ## 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 划转

> [!NOTE]
>
> 此接口仅供 Broker 使用。请求须携带 Broker API Key、`Timestamp`、`SIGN` 和 `X-User-Wallet-Address`。网关确认钱包属于当前 Broker 后转发。请按外部 `/api/v4/broker/...` 路径计算签名。详见[Broker API 认证与签名](https://dexbuilder.mintlify.site/zh/event-contracts/api/broker-authentication.md).

在支持的账户之间发起 USDT 划转。


## OpenAPI

````yaml openapi/event-contracts.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'
        '403':
          description: Broker 权限不足，或目标钱包未通过归属校验
        '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.