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

# Get wallet PnL details

> Retrieve wallet PnL broken down by token with project enrichment. Supports API key auth or x402 fallback.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/data/wallets/pnl-details
openapi: 3.1.0
info:
  title: Kanarie API
  description: >-
    Crypto content search, project intelligence, mindshare, fundamentals, and
    wallet data APIs.
  version: 1.0.0
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
servers:
  - url: https://api.kanarie.xyz
    description: Production
security:
  - bearerAuth: []
  - kanarieApiKey: []
tags:
  - name: Health
    description: Service health endpoints.
  - name: Content
    description: Search content and rank project or handle mentions.
  - name: Projects
    description: Search, filter, map, and analyze crypto projects.
  - name: Data
    description: Virality and fundamentals datasets.
  - name: Wallets
    description: Smart money and wallet PnL datasets.
paths:
  /api/v1/data/wallets/pnl-details:
    post:
      tags:
        - Wallets
      summary: Get wallet PnL details
      description: >-
        Retrieve wallet PnL broken down by token with project enrichment.
        Supports API key auth or x402 fallback.
      operationId: postWalletsPnlDetails
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PnlDetailsRequest'
            examples:
              details:
                value:
                  wallet: 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU
                  duration: 7d
                  limit: 10
                  include_attributes:
                    - mindshare
                    - developments
                    - recent_content
      responses:
        '200':
          $ref: '#/components/responses/PnlDetailsSuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    PnlDetailsRequest:
      type: object
      required:
        - wallet
      properties:
        wallet:
          type: string
          description: Solana wallet address.
        token_addresses:
          type: array
          maxItems: 100
          items:
            type: string
        duration:
          $ref: '#/components/schemas/PnlDuration'
        sort_type:
          $ref: '#/components/schemas/SortDirection'
        sort_by:
          type: string
          enum:
            - last_trade
        limit:
          type: integer
          minimum: 1
          maximum: 100
          default: 10
        offset:
          type: integer
          minimum: 0
          maximum: 10000
          default: 0
        include_attributes:
          type: array
          items:
            $ref: '#/components/schemas/PnlDetailAttribute'
        recent_content_limit:
          type: integer
          minimum: 1
          maximum: 25
          default: 5
        recent_content_days_back:
          type: integer
          minimum: 1
          maximum: 30
          default: 7
    PnlDuration:
      type: string
      enum:
        - all
        - 90d
        - 30d
        - 7d
        - 24h
    SortDirection:
      type: string
      enum:
        - asc
        - desc
    PnlDetailAttribute:
      type: string
      enum:
        - project_description
        - recent_content
        - technical_analysis
        - mindshare
        - developments
    GenericSuccessResponse:
      type: object
      required:
        - success
      properties:
        success:
          type: boolean
        error:
          type:
            - string
            - 'null'
        data:
          type:
            - object
            - array
            - 'null'
          additionalProperties: true
          items:
            $ref: '#/components/schemas/ObjectAny'
        analysis:
          $ref: '#/components/schemas/ObjectAny'
        results:
          type: array
          items:
            $ref: '#/components/schemas/ObjectAny'
        projects:
          type: array
          items:
            $ref: '#/components/schemas/ObjectAny'
        metadata:
          $ref: '#/components/schemas/ObjectAny'
      additionalProperties: true
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
        details:
          type: array
          items:
            type: string
        reason:
          type: string
      additionalProperties: true
    PaymentRequiredResponse:
      type: object
      required:
        - x402Version
        - error
        - accepts
      properties:
        x402Version:
          type: integer
          example: 2
        error:
          type: string
          example: Payment required
        accepts:
          type: array
          items:
            type: object
            additionalProperties: true
      additionalProperties: true
    RateLimitResponse:
      type: object
      required:
        - error
        - limit
        - plan
        - window
        - retryAfter
      properties:
        error:
          type: string
          example: Rate limit exceeded
        limit:
          type: integer
        plan:
          type: string
          enum:
            - free
            - casual
            - pro
            - enterprise
          example: casual
        window:
          type: string
          example: 15 minutes
        retryAfter:
          type: integer
          example: 900
    ObjectAny:
      type: object
      additionalProperties: true
  responses:
    PnlDetailsSuccess:
      description: Wallet PnL details by token with enrichment.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GenericSuccessResponse'
          examples:
            success:
              value:
                success: true
                data:
                  meta: {}
                  tokens:
                    - symbol: SOL
                      pnl: 5000
                      project_id: 1
                  summary: {}
                metadata:
                  wallet: 7xK...
                  duration: 7d
                  total_tokens: 10
    BadRequest:
      description: The request body or query parameters failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            validation:
              value:
                error: Validation failed
                details:
                  - limit must be a number between 1 and 100
    Unauthorized:
      description: The API key header is missing.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missing:
              value:
                error: >-
                  Missing API key. Expected Authorization: Bearer <api-key> or
                  x-kanarie-api-key: <api-key>.
    PaymentRequired:
      description: >-
        x402 payment is required when no API key is present, API-key auth fails
        client-side checks, or an API key exceeds plan limits on an x402-enabled
        endpoint.
      headers:
        X-Payment-Required:
          description: Encoded x402 payment requirements.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PaymentRequiredResponse'
    Forbidden:
      description: >-
        The API key is invalid, inactive, expired, or unauthorized for the
        request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            invalid:
              value:
                error: Invalid API key
    RateLimited:
      description: >-
        The API key exceeded a route limit on an API-key-only path. x402-enabled
        endpoints normally return payment requirements for over-limit requests.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitResponse'
    InternalError:
      description: The API encountered an internal error while processing the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            internal:
              value:
                error: Internal server error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Kanarie API key
      description: >-
        Preferred Kanarie API key authentication using Authorization: Bearer
        <api-key>.
      x-default: YOUR_KANARIE_API_KEY
    kanarieApiKey:
      type: apiKey
      in: header
      name: x-kanarie-api-key
      description: Kanarie API key header for current clients.
      x-default: YOUR_KANARIE_API_KEY

````