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

# Wallet - PnL Summary

> Get aggregated profit and loss summary for a wallet

<Note>
  Get profit and loss summary for a wallet. Shows realized and unrealized PnL across all token positions.
</Note>

**Related**: [GraphQL Wallet PnL](/en/graphql/examples/balance-holders) | MCP: `wallet_get_pnl`


## OpenAPI

````yaml /en/api-reference/openapi-data-en.yaml GET /v2/wallet/{chain}/{walletAddress}/pnl
openapi: 3.1.0
info:
  title: Services API
  description: Services API
  contact:
    name: AI
    email: ai@sx.ai
  license:
    name: MIT
  version: '1.0'
servers:
  - url: https://api.chainstream.io
    description: Production
security:
  - bearer_auth: []
  - api_key_auth: []
tags:
  - name: Blockchain
    description: Blockchain related operations
  - name: Token
    description: Token related operations
  - name: Trade
    description: Trade related operations
  - name: Wallet
    description: Wallet related operations
  - name: Dex
    description: Dex related operations
  - name: Ranking
    description: Ranking related operations
  - name: DexPool
    description: DexPool related operations
  - name: Watchlist
    description: Watchlist related operations
  - name: KYT
    description: Kyt related operations
  - name: Webhook
    description: Webhook related operations
  - name: RedPacket
    description: Redpacket related operations
  - name: IPFS
    description: Ipfs related operations
  - name: DexScreener
    description: DexScreener related operations
paths:
  /v2/wallet/{chain}/{walletAddress}/pnl:
    get:
      tags:
        - Wallet
      summary: Wallet - PnL Summary
      description: Get aggregated profit and loss summary for a wallet
      operationId: get.pnl
      parameters:
        - name: chain
          in: path
          description: A chain name listed in supported networks
          required: true
          schema:
            $ref: '#/components/schemas/ChainSymbol'
          example: sol
        - name: walletAddress
          in: path
          description: An address of a wallet
          required: true
          schema:
            type: string
          example: 54Pz1e35z9uoFdnxtzjp7xZQoFiofqhdayQWBMN7dsuy
        - name: resolution
          in: query
          description: PnL time resolution (1d, 7d, 30d, or all)
          required: false
          schema:
            oneOf:
              - $ref: '#/components/schemas/PnlResolution'
            default: 1d
          example: 1d
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WalletPnlSummary'
components:
  schemas:
    ChainSymbol:
      type: string
      description: Supported blockchain chains
      enum:
        - sol
        - eth
        - bsc
    PnlResolution:
      type: string
      description: PnL resolution period
      enum:
        - 1d
        - 7d
        - 30d
        - all
    WalletPnlSummary:
      type: object
      description: Wallet PnL Summary (aggregated across all tokens for a given resolution)
      required:
        - walletAddress
        - resolution
        - tokens
        - buys
        - sells
        - totalTrades
        - wins
        - losses
        - winRate
        - buyAmountInUsd
        - sellAmountInUsd
        - totalCostInUsd
        - realizedProfitInUsd
        - realizedProfitRatio
        - unrealizedProfitInUsd
        - unrealizedProfitRatio
        - totalProfitInUsd
        - totalProfitRatio
        - avgProfitPerTradeInUsd
      properties:
        avgProfitPerTradeInUsd:
          type: string
          description: Average profit per trade in USD
          example: '402.86'
        buyAmountInUsd:
          type: string
          description: Total buy amount in USD
          example: '101371192.39'
        buys:
          type: string
          description: Total number of buy trades
          example: '1515999'
        losses:
          type: string
          description: Number of losing trades
          example: '348350'
        realizedProfitInUsd:
          type: string
          description: Realized profit in USD
          example: '802583.91'
        realizedProfitRatio:
          type: string
          description: Realized profit ratio
          example: '0.0035521324'
        resolution:
          type: string
          description: PnL time resolution
          example: 1d
        sellAmountInUsd:
          type: string
          description: Total sell amount in USD
          example: '60369621.10'
        sells:
          type: string
          description: Total number of sell trades
          example: '1011994'
        tokens:
          type: string
          description: Total number of traded tokens
          example: '15126'
        totalCostInUsd:
          type: string
          description: Total cost basis in USD
          example: '225944253.64'
        totalProfitInUsd:
          type: string
          description: Total profit (realized + unrealized) in USD
          example: '1018427683.08'
        totalProfitRatio:
          type: string
          description: Total profit ratio
          example: '4.5074290081'
        totalTrades:
          type: string
          description: Total number of all trades
          example: '2527993'
        unrealizedProfitInUsd:
          type: string
          description: Unrealized profit in USD
          example: '1017625099.17'
        unrealizedProfitRatio:
          type: string
          description: Unrealized profit ratio
          example: '4.5038768756'
        updatedAt:
          type:
            - string
            - 'null'
          description: Last updated timestamp
          example: '2026-02-04T11:42:50.000Z'
        walletAddress:
          type: string
          description: Wallet address
          example: 54Pz1e35z9uoFdnxtzjp7xZQoFiofqhdayQWBMN7dsuy
        winRate:
          type: string
          description: Ratio of winning trades to total trades
          example: '0.5575'
        wins:
          type: string
          description: Number of profitable trades
          example: '438944'
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    api_key_auth:
      type: apiKey
      in: header
      name: X-API-KEY

````