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

# 查询用户信息

> 查询终端用户及已绑定钱包信息。

查询终端用户及已绑定钱包信息。

> [!NOTE]
>
> 使用 Broker API Key 调用，并在请求头提供 `X-User-Wallet-Address`。网关会校验钱包与 Broker 的归属关系。 认证规则见[Broker API Key 与签名](https://dexbuilder.mintlify.site/api-reference/common/broker-authentication.md)。

## 使用说明

* 当前仅返回已绑定钱包。钱包对象中的 `vm` 表示虚拟机类型（`evm` 或 `solana`），不是具体网络名称；用户状态为 `active`，钱包状态为 `bound`。


## OpenAPI

````yaml openapi/dexbuilder.yaml GET /api/v4/dexbuilder/user/info
openapi: 3.0.3
info:
  title: DexBuilder 平台 Broker API
  version: 1.0.0
  description: DexBuilder 平台 Broker API，涵盖资产配置、用户、充值与提现能力。认证和用户钱包校验见本站统一网关说明。
servers:
  - url: https://api.dexbuilder.com
security: []
paths:
  /api/v4/dexbuilder/user/info:
    get:
      tags:
        - 用户
      summary: 查询用户信息
      description: 查询项目下终端用户 ID 与已绑定钱包列表。
      operationId: getDexBuilderUserInfo
      parameters:
        - $ref: '#/components/parameters/SubUserWalletAddr'
      responses:
        '200':
          description: 查询成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvelopeUserInfo'
        '400':
          $ref: '#/components/responses/UserNotFound'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          $ref: '#/components/responses/GatewayUnauthorized'
        '403':
          $ref: '#/components/responses/ProjectAccessDenied'
      security:
        - BrokerAPIKey: []
          Timestamp: []
          Signature: []
components:
  parameters:
    SubUserWalletAddr:
      name: X-User-Wallet-Address
      in: header
      required: true
      description: 目标终端用户钱包地址。网关校验该钱包对应的用户属于当前 Broker。
      schema:
        type: string
  schemas:
    EnvelopeUserInfo:
      allOf:
        - $ref: '#/components/schemas/EnvelopeBase'
        - type: object
          properties:
            data:
              $ref: '#/components/schemas/UserInfo'
    ErrorEnvelope:
      allOf:
        - $ref: '#/components/schemas/EnvelopeBase'
        - type: object
          required:
            - label
          properties:
            label:
              type: string
              description: 稳定的机器可读错误标识
            data:
              nullable: true
              description: 错误时一般为 null
    EnvelopeBase:
      type: object
      properties:
        code:
          type: integer
          example: 0
          description: 业务码，`0` 表示成功
        message:
          type: string
          example: success
          description: 人类可读说明，成功时为 success
        reason:
          type: string
          description: 错误原因标识；成功时通常为空字符串
        trace_id:
          type: string
          description: 链路追踪 ID，排障时提供
    UserInfo:
      type: object
      properties:
        user_id:
          type: string
          description: 终端用户 ID（项目方映射）
        project_id:
          type: string
          description: DexBuilder 项目 ID
        status:
          type: string
          example: active
          description: 用户状态，如 active
        wallets:
          type: array
          items:
            $ref: '#/components/schemas/UserInfoWallet'
          description: 已绑定钱包列表
    UserInfoWallet:
      type: object
      properties:
        vm:
          type: string
          description: 钱包虚拟机类型，evm 或 solana（非具体 L1 网络名）
        address:
          type: string
          description: 已绑定钱包地址
        status:
          type: string
          description: 绑定状态，如 bound
  responses:
    UserNotFound:
      description: 用户不存在或未绑定钱包
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            code: 405007
            reason: P_DEX_BUILDER_IN_USER_NOT_FOUND
            label: USER_NOT_FOUND
            message: User not found
            data: null
    GatewayUnauthorized:
      description: Broker API Key、签名或时间戳无效
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            invalidKey:
              summary: 无效 API Key
              value:
                label: INVALID_KEY
                message: Invalid key provided
                code: 401
                trace_id: abc123
            invalidSignature:
              summary: 签名错误
              value:
                label: INVALID_SIGNATURE
                message: Invalid signature
                code: 401
                trace_id: abc123
    ProjectAccessDenied:
      description: 项目未绑定或 Broker/API Key 不匹配
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            code: 40300801
            reason: P_DEX_BUILDER_IN_PROJECT_ACCESS_DENIED
            label: PROJECT_ACCESS_DENIED
            message: project access denied
            data: null
  securitySchemes:
    BrokerAPIKey:
      type: apiKey
      in: header
      name: KEY
      description: Broker API Key
    Timestamp:
      type: apiKey
      in: header
      name: Timestamp
      description: Unix 秒级时间戳
    Signature:
      type: apiKey
      in: header
      name: SIGN
      description: 使用 Broker Secret Key 生成的 HMAC-SHA512 十六进制签名

````

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