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

# 지갑 - 손익 계산

> 지갑 토큰의 손익 계산



## OpenAPI

````yaml /ko/api-reference/openapi-data-ko.yaml POST /v2/wallet/{chain}/{walletAddress}/calculate-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: 블록체인 관련 작업
  - name: Token
    description: 토큰 관련 작업
  - name: Trade
    description: 거래 관련 작업
  - name: Wallet
    description: 지갑 관련 작업
  - name: Dex
    description: DEX 관련 작업
  - name: Ranking
    description: 랭킹 관련 작업
  - name: DexPool
    description: DEX 풀 관련 작업
  - name: Watchlist
    description: 워치리스트 관련 작업
  - name: KYT
    description: KYT 관련 작업
  - name: Webhook
    description: Webhook 관련 작업
  - name: RedPacket
    description: 레드패킷 관련 작업
  - name: IPFS
    description: IPFS 관련 작업
  - name: DexScreener
    description: DexScreener 관련 작업
paths:
  /v2/wallet/{chain}/{walletAddress}/calculate-pnl:
    post:
      tags:
        - Wallet
      summary: 지갑 - PNL 계산
      description: 지갑 토큰의 손익 계산
      operationId: calculate.pnl
      parameters:
        - name: chain
          in: path
          description: 지원되는 네트워크에 나열된 체인 이름
          required: true
          schema:
            $ref: '#/components/schemas/ChainSymbol'
          example: sol
        - name: walletAddress
          in: path
          description: 지갑 주소
          required: true
          schema:
            type: string
          example: MJKqp326RZCHnAAbew9MDdui3iCKWco7fsK9sVuZTX2
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CalculatePnlInput'
        required: true
      responses:
        '200':
          description: 성공 응답
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
components:
  schemas:
    ChainSymbol:
      type: string
      description: Supported blockchain chains
      enum:
        - sol
        - eth
        - bsc
    CalculatePnlInput:
      type: object
      properties:
        tokenAddresses:
          type:
            - array
            - 'null'
          items:
            type: string
          description: PnL 계산 대상 토큰 주소 목록
          example:
            - 6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
            - So11111111111111111111111111111111111111112
    SuccessResponse:
      type: object
      required:
        - success
      properties:
        success:
          type: boolean
          description: 작업 성공 상태
          example: true
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    api_key_auth:
      type: apiKey
      in: header
      name: X-API-KEY

````