> ## Documentation Index
> Fetch the complete documentation index at: https://www.helius.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取钱包身份

> 解析 Solana 钱包的链上身份信息，包括域名和社交档案。

每次请求消耗 **100 点数**。

需要付费计划。免费计划的请求将返回 `403 Forbidden`。

## 请求参数

<ParamField body="wallet" type="string" required default="GQUtvPx89ZNCwmvQqFmH59bJcU8fW8siETpaxod7Aydz">
  Solana 钱包地址（base58 编码）或 SNS/ANS 域名（例如，`toly.sol`,
  `miester.bonk`）。域名解析仅限主网。任何非 `.sol` 域名将被视为
  ANS 自定义 TLD — 没有固定的 TLD 白名单。
</ParamField>


## OpenAPI

````yaml zh/openapi/wallet-api/openapi.yaml GET /v1/wallet/{wallet}/identity
openapi: 3.0.3
info:
  title: Wallet API
  description: |
    一个高性能的REST API，用于查询Solana钱包数据，包括余额、交易记录、转账和身份信息。

    ## 认证

    所有请求都需要通过以下方式传递API密钥：
    - 查询参数：`?api-key=YOUR_API_KEY`
    - 头：`X-Api-Key: YOUR_API_KEY`
  version: 1.0.0
  contact:
    name: API支持
    url: https://helius.dev
servers:
  - url: https://api.helius.xyz
    description: 生产服务器
security:
  - ApiKeyQuery: []
  - ApiKeyHeader: []
tags:
  - name: Identity
    description: 查找钱包身份和已知地址
  - name: Balances
    description: 查询代币和NFT余额
  - name: History
    description: 交易历史和余额变动
  - name: Transfers
    description: 代币转账活动
  - name: Funding
    description: 钱包资金信息
paths:
  /v1/wallet/{wallet}/identity:
    get:
      tags:
        - Identity
      summary: 获取钱包身份
      description: >
        检索已知钱包（交易所、协议等）的身份信息。接受 Solana 钱包地址或 SNS (`.sol`) / ANS 自定义顶级域名（例如
        `toly.sol`, `miester.bonk`）。域名解析仅限主网。


        响应是**已解析地址**的标准身份对象。此端点不附加域名标记 (`inputDomain`) — 如需将输入与输出相关联，请使用 `POST
        /v1/wallet/batch-identity`。


        如果钱包没有身份记录或无法解析域名输入，则返回 `404`。如果输入既不是有效地址，也不是有效域名，或者在非主网部署上发送域名输入，则返回
        `400`。
      operationId: getWalletIdentity
      parameters:
        - $ref: '#/components/parameters/WalletOrDomain'
      responses:
        '200':
          description: 已找到身份信息
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Identity'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: 无身份信息或无法解析域名
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    WalletOrDomain:
      name: wallet
      in: path
      required: true
      description: >
        Solana 钱包地址（base58编码）或 SNS/ANS 域名（例如 `toly.sol`,
        `miester.bonk`）。域名解析仅限主网。任何非 `.sol` 域名都被视为 ANS 自定义 TLD — 并没有固定的 TLD 白名单。
      schema:
        type: string
        default: GQUtvPx89ZNCwmvQqFmH59bJcU8fW8siETpaxod7Aydz
      examples:
        address:
          summary: Solana 地址
          value: GQUtvPx89ZNCwmvQqFmH59bJcU8fW8siETpaxod7Aydz
        snsDomain:
          summary: SNS (.sol) 域名
          value: toly.sol
        ansDomain:
          summary: ANS 自定义 TLD
          value: miester.bonk
  schemas:
    Identity:
      type: object
      properties:
        address:
          type: string
          description: Solana 钱包地址
          example: HXsKP7wrBWaQ8T2Vtjry3Nj3oUgwYcqq9vrHDM12G664
        type:
          type: string
          description: 实体类型
          example: exchange
        name:
          type: string
          description: 显示名称
          example: Binance 1
        category:
          type: string
          description: 类别分类
          example: Centralized Exchange
        tags:
          type: array
          items:
            type: string
          description: 附加分类标签
          example:
            - Centralized Exchange
        domainNames:
          type: array
          items:
            type: string
          description: >-
            此地址拥有的所有链上域名，包括SNS (.sol)和ANS自定义TLD (.bonk,
            .wen等)。如果设置了最喜欢的.sol域名，则优先显示；其余域名按字母顺序排列。如果钱包没有域名，则省略。
          example:
            - toly.sol
            - kash.superteam
      required:
        - address
        - type
        - name
        - category
        - tags
    Error:
      type: object
      properties:
        error:
          type: string
          description: 错误信息
          example: 无效的钱包地址
        code:
          type: integer
          description: HTTP状态代码
          example: 400
        details:
          type: string
          description: 附加错误详情
          example: '''invalid-address'' 不是有效的 Solana 地址'
      required:
        - error
        - code
  responses:
    BadRequest:
      description: 无效的请求参数
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 无效的钱包地址
            code: 400
            details: '''invalid-address''不是有效的Solana地址'
    Unauthorized:
      description: 缺少或无效的API密钥
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 需要API密钥。通过?api-key=xxx或X-Api-Key头传递
            code: 401
    RateLimited:
      description: 超出速率限制。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: RATE_LIMIT_EXCEEDED
            code: 429
            details: 请求过多。请在 2 秒后重试。
    InternalError:
      description: 临时服务器错误。可以使用指数退避重试。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: INTERNAL_ERROR
            code: 500
            details: 发生意外错误。请重试。
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: 作为查询参数传递的API密钥
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-Api-Key
      description: 在请求头中传递的API密钥

````