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

# Get Wallet Risk

> 当前持仓风险：集中度、已实现/未实现构成、敞口及最大活跃仓位等。

## SDK Example

<CodeGroup>
  ```typescript SDK
  import { Client } from '@solana-tracker/data-api';

  const client = new Client({ apiKey: 'YOUR_API_KEY' });

  const data = await client.getPnlV2WalletRisk('FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF');

  ```
</CodeGroup>


## OpenAPI

````yaml /cn/data-api/pnl-v2/openapi.json get /v2/pnl/wallets/{wallet}/risk
openapi: 3.1.0
info:
  title: SolanaTracker PnL V2 API
  description: >-
    面向 Solana 钱包的盈亏追踪：钱包级 PnL 汇总、按代币的持仓、排行榜、KOL 榜单、风险分析与历史表现。金额均为美元；除另有说明外，时间戳均为
    Unix 毫秒。
  version: 2.0.0
servers:
  - url: https://data.solanatracker.io
    description: 生产环境
security:
  - apiKey: []
tags:
  - name: Leaderboard
    description: 顶尖交易者、巨鲸与 KOL 排名
  - name: Token
    description: 按代币的交易者与持币数据
  - name: Wallet
    description: 钱包级盈亏、持仓、历史与分析
  - name: Batch
    description: 批量钱包摘要与持仓查询
paths:
  /v2/pnl/wallets/{wallet}/risk:
    get:
      tags:
        - Wallet
      summary: Get Wallet Risk
      description: 当前持仓风险：集中度、已实现/未实现构成、敞口及最大活跃仓位等。
      operationId: getWalletRisk
      parameters:
        - $ref: '#/components/parameters/walletPath'
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  wallet:
                    type: string
                  identity:
                    $ref: '#/components/schemas/Identity'
                  openPositions:
                    type: object
                    properties:
                      count:
                        type: integer
                        description: Number of open positions.
                      cost:
                        type:
                          - number
                          - 'null'
                        description: Total cost basis of open positions.
                      value:
                        type:
                          - number
                          - 'null'
                        description: Current market value of open positions.
                      profitableValue:
                        type:
                          - number
                          - 'null'
                        description: Value of positions currently in profit.
                      profitableValuePercent:
                        type:
                          - number
                          - 'null'
                        description: Percentage of open value that is in profit.
                  concentration:
                    type: object
                    description: >-
                      How concentrated the wallet's value is in its top
                      positions.
                    properties:
                      top1Percent:
                        type:
                          - number
                          - 'null'
                        description: 'Percentage of total value in the #1 position.'
                      top5Percent:
                        type:
                          - number
                          - 'null'
                        description: Percentage of total value in the top 5 positions.
                      score:
                        type:
                          - number
                          - 'null'
                        description: >-
                          Herfindahl-style concentration score (0-100). Higher =
                          more concentrated.
                  pnlMix:
                    type: object
                    description: How much of the wallet's PnL is realized vs unrealized.
                    properties:
                      realized:
                        type:
                          - number
                          - 'null'
                      unrealized:
                        type:
                          - number
                          - 'null'
                      realizedPercent:
                        type:
                          - number
                          - 'null'
                      unrealizedPercent:
                        type:
                          - number
                          - 'null'
                  largestPositions:
                    type: array
                    items:
                      $ref: '#/components/schemas/Position'
                    description: The largest open positions by current USD value.
                  updatedAt:
                    type:
                      - string
                      - 'null'
                    format: date-time
              example:
                wallet: CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o
                identity:
                  name: Cented
                  twitter: '@Cented7'
                  avatar: >-
                    https://kol-avatar.solanatracker.io/CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o
                  platforms:
                    - axiom
                    - bloom
                  type: kol
                  tags:
                    - kol
                    - axiom
                    - bloom
                openPositions:
                  count: 67
                  cost: 5752.65
                  value: 4355.64
                  profitableValue: 3060.55
                  profitableValuePercent: 70.27
                concentration:
                  top1Percent: 16.24
                  top5Percent: 44.5
                  score: 4.78
                pnlMix:
                  realized: 10655775.26
                  unrealized: -1283.18
                  realizedPercent: 100.01
                  unrealizedPercent: -0.01
                largestPositions:
                  - token: FJEMUVcjUYu25i5XgMziVTWYq3D8KbXPL6WStJcXpump
                    pnl:
                      realized: 225.1
                      unrealized: 707.38
                      total: 932.48
                    invested: 474.23
                    proceeds: 699.33
                    roi: 196.63
                    current:
                      balance: 40599697.119731
                      costBasis: 0
                      value: 707.38
                      price: 0.000017423193567054
                      avgCost: 5.591174715677386e-21
                    volume:
                      tokensBought: 40599697.119730994
                      tokensSold: 40599697.119730994
                      buyUsd: 474.23
                      sellUsd: 699.33
                    averages:
                      buy: 237.11
                      sell: 699.33
                    counts:
                      buys: 2
                      sells: 1
                      total: 3
                    timing:
                      firstBuy: 1776377440861
                      lastBuy: 1776377487794
                      firstSell: 1776378122098
                      lastSell: 1776378122098
                      firstTrade: 1776377440861
                      lastTrade: 1776378122098
                      holdTimeSecs: 245569
                    meta:
                      symbol: Scientists
                      name: Dead Scientists Theory
                      image: >-
                        https://image.solanatracker.io/proxy?url=https%3A%2F%2Fmetadata.rapidlaunch.io%2Fimages%2F83686cf6-5651-4149-8306-b67e5688424d.png
                      decimals: 6
                      price: 0.000017423193567054
                      snapshotPrice: 0.000020509681344903
                      marketCap: 17413.69
                      liquidity: 10331.32
                      primaryMarket: pumpfun-amm
                  - token: J9bv4NcyGmji1VzDWgVkTwQtzi4a2bYgde2MaXEhpump
                    pnl:
                      realized: 0
                      unrealized: -81.83
                      total: -81.83
                    invested: 0
                    proceeds: 0
                    roi: null
                    current:
                      balance: 109744555.959514
                      costBasis: 533.88
                      value: 452.05
                      price: 0.000004119104467224
                      avgCost: 0.000004864767907168411
                    volume:
                      tokensBought: 109744555.959514
                      tokensSold: 0
                      buyUsd: 533.88
                      sellUsd: 0
                    averages:
                      buy: 266.94
                      sell: 0
                    counts:
                      buys: 2
                      sells: 0
                      total: 2
                    timing:
                      firstBuy: 1742830052184
                      lastBuy: 1742830057489
                      firstSell: null
                      lastSell: null
                      firstTrade: 1742830052184
                      lastTrade: 1742830057489
                      holdTimeSecs: 33792958
                    meta:
                      symbol: ZIEL
                      name: ZIELCHAIN
                      image: >-
                        https://image.solanatracker.io/proxy?url=https%3A%2F%2Fipfs-forward.solanatracker.io%2Fipfs%2FQmS7jNAgpNU1Hp5JUeifgpvnpQq7bt8xAvZ71is56vPE6y
                      decimals: 6
                      price: 0.000004119104467224
                      snapshotPrice: 0.000004122517900796002
                      marketCap: 4119.1
                      liquidity: 6641.88
                      primaryMarket: pumpfun
                updatedAt: '2026-04-19T17:53:30.439Z'
        '400':
          description: Invalid request parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: typescript
          label: SDK
          source: >
            import { Client } from '@solana-tracker/data-api';


            const client = new Client({ apiKey: 'YOUR_API_KEY' });


            const data = await
            client.getPnlV2WalletRisk('FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF');
      x-code-samples:
        - lang: typescript
          label: SDK
          source: >
            import { Client } from '@solana-tracker/data-api';


            const client = new Client({ apiKey: 'YOUR_API_KEY' });


            const data = await
            client.getPnlV2WalletRisk('FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF');
components:
  parameters:
    walletPath:
      name: wallet
      in: path
      required: true
      description: Solana 钱包地址（Base58，约 32–44 字符）
      schema:
        type: string
        pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$
  schemas:
    Identity:
      type: object
      description: >-
        Unified wallet identity. Only fields with known values are returned; a
        wallet can carry multiple tags at once.
      properties:
        name:
          type:
            - string
            - 'null'
          description: Display name, if known.
        twitter:
          type:
            - string
            - 'null'
          description: Twitter/X handle, if known.
        avatar:
          type:
            - string
            - 'null'
          format: uri
          description: Avatar image URL.
        type:
          type:
            - string
            - 'null'
          description: >-
            Primary label for single-badge UIs, such as `kol`, `developer`,
            `pool`, `bot`, `hacker`, `spam_dusting`, `exchange`, or a platform
            tag.
        tags:
          type: array
          items:
            type: string
          description: >-
            All resolved labels for the wallet, including KOL, platform, pool,
            developer, bot, arbitrage, hacker, spam-dusting, or exchange tags.
        platforms:
          type: array
          items:
            type: string
          description: >-
            Normalized trading frontend tags such as `axiom`, `bloom`, or
            `photon`. Query filters also accept `axiom-flash`, which is
            normalized to `axiom` in identity responses.
        bot:
          type: object
          properties:
            name:
              type:
                - string
                - 'null'
            avatar:
              type:
                - string
                - 'null'
              format: uri
        pool:
          type: object
          properties:
            program:
              type:
                - string
                - 'null'
            poolAddress:
              type:
                - string
                - 'null'
        developer:
          type: object
          properties:
            token:
              type:
                - string
                - 'null'
            via:
              type: array
              items:
                type: string
            pools:
              type: array
              items:
                type: string
            creationTx:
              type:
                - string
                - 'null'
            createdAt:
              type:
                - integer
                - 'null'
              description: Unix timestamp in seconds.
        hacker:
          type: object
          description: Curated exploit/scam wallet label, when known.
          properties:
            label:
              type:
                - string
                - 'null'
        spamDusting:
          type: object
          description: Curated spam-dusting wallet label, when known.
          properties:
            label:
              type:
                - string
                - 'null'
        exchange:
          type: object
          description: Known centralized exchange hot wallet label, when known.
          properties:
            name:
              type:
                - string
                - 'null'
    Position:
      type: object
      description: A single token position for a wallet.
      properties:
        token:
          type: string
          description: Token mint address (base58).
        pnl:
          $ref: '#/components/schemas/PnlBlock'
        invested:
          type:
            - number
            - 'null'
          description: Total cost basis (USD spent buying this token).
        proceeds:
          type:
            - number
            - 'null'
          description: Total USD received from sales of this token.
        roi:
          type:
            - number
            - 'null'
          description: Return on investment percentage.
        current:
          type: object
          properties:
            balance:
              type:
                - number
                - 'null'
              description: Current token balance (native units).
            costBasis:
              type:
                - number
                - 'null'
              description: Cost basis of remaining held tokens.
            value:
              type:
                - number
                - 'null'
              description: Current USD value of held tokens.
            price:
              type:
                - number
                - 'null'
              description: Current token price in USD.
            avgCost:
              type:
                - number
                - 'null'
              description: Average cost per token in USD.
        volume:
          type: object
          properties:
            tokensBought:
              type:
                - number
                - 'null'
              description: Total tokens purchased (native units).
            tokensSold:
              type:
                - number
                - 'null'
              description: Total tokens sold (native units).
            buyUsd:
              type:
                - number
                - 'null'
              description: Total USD spent on buys.
            sellUsd:
              type:
                - number
                - 'null'
              description: Total USD received from sells.
        averages:
          type: object
          properties:
            buy:
              type:
                - number
                - 'null'
              description: Average buy size in USD.
            sell:
              type:
                - number
                - 'null'
              description: Average sell size in USD.
        counts:
          type: object
          properties:
            buys:
              type: integer
            sells:
              type: integer
            total:
              type: integer
              description: Total transactions (buys + sells).
        timing:
          type: object
          properties:
            firstBuy:
              type:
                - integer
                - 'null'
              description: Unix ms.
            lastBuy:
              type:
                - integer
                - 'null'
              description: Unix ms.
            firstSell:
              type:
                - integer
                - 'null'
              description: Unix ms.
            lastSell:
              type:
                - integer
                - 'null'
              description: Unix ms.
            firstTrade:
              type:
                - integer
                - 'null'
              description: Unix ms.
            lastTrade:
              type:
                - integer
                - 'null'
              description: Unix ms.
            holdTimeSecs:
              type:
                - integer
                - 'null'
              description: How long the position has been (or was) held, in seconds.
        meta:
          $ref: '#/components/schemas/TokenMeta'
        portfolioPercent:
          type:
            - number
            - 'null'
          description: >-
            This position's value as a percentage of the wallet's total holdings
            value. Only present on the positions endpoint.
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message.
      required:
        - error
    PnlBlock:
      type: object
      description: Realized, unrealized, and total profit/loss in USD.
      properties:
        realized:
          type:
            - number
            - 'null'
          description: Profit/loss from closed trades (tokens fully or partially sold).
        realizedRaw:
          type:
            - number
            - 'null'
          description: >-
            Unfiltered realized PnL before `pnlMode` adjustments. Present on
            position rows and leaderboard period stats when available.
        unrealized:
          type:
            - number
            - 'null'
          description: >-
            Paper profit/loss on tokens still held, based on current market
            price.
        total:
          type:
            - number
            - 'null'
          description: Sum of realized + unrealized PnL.
    TokenMeta:
      type: object
      description: Basic token metadata and current market data.
      properties:
        symbol:
          type:
            - string
            - 'null'
        name:
          type:
            - string
            - 'null'
        decimals:
          type:
            - integer
            - 'null'
        price:
          type:
            - number
            - 'null'
          description: Current price in USD.
        liquidity:
          type:
            - number
            - 'null'
          description: Current liquidity in USD.
        marketCap:
          type:
            - number
            - 'null'
          description: Current market cap in USD.
        primaryMarket:
          type:
            - string
            - 'null'
          description: Primary DEX where this token trades (e.g. Raydium, Orca).
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: 用于鉴权的 API Key

````