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

# Get Wallet PnL History

> Get a cash-flow-adjusted historical wallet P&L chart

<Note>**25** credits per request</Note><Accordion title="Multipliers" icon="rectangle-history-circle-plus"><Note>In **Query** field **"connectionId"**: credits are multiplied by the number of values.</Note><Note>If the value of **"connectionId"** in **Query** is **"all"**, multiplier is **250** credits.</Note><Note>In **Query** field **"blockchain"**: credits are multiplied by the number of values.</Note><Note>If the value of **"blockchain"** in **Query** is **"all"**, multiplier is **250** credits.</Note><Warning>Multipliers can be applied multiple times.</Warning><Info>[**Detailed multipliers explanation**](/docs/multipliers)</Info></Accordion><hr />

<AccordionGroup>
  <Accordion title="You will get">
    * Chronological period P\&L and P\&L percentage points
    * An aggregate across the synchronized requested wallet networks
    * An empty result when no requested network has synchronized history
  </Accordion>

  <Accordion title="Required">
    * address: Wallet address
    * connectionId or blockchain: One value, comma-separated values, or all
    * interval: hourly, daily, weekly, monthly, or yearly
    * Exactly one time mode: range, or both from and to
  </Accordion>

  <Accordion title="Optional">
    * currency: Defaults to USD
  </Accordion>

  <Accordion title="Example: September 2025 calendar month">
    Use **from=2025-09-01** and **to=2025-10-01** because from is inclusive and to is exclusive. Keep **interval=daily** for daily points, or use **interval=monthly** for one value covering the month.
  </Accordion>
</AccordionGroup>


## OpenAPI

````yaml /api-reference/openapi.json get /v1/wallet/pl/history
openapi: 3.0.0
info:
  title: CoinStats Public API
  description: >-
    CoinStats Public API — programmatic access to market data, news, NFTs,
    wallets, exchange connections, and user portfolios. Authenticate every
    request with the `X-API-KEY` header (or an OAuth Bearer token in the
    `Authorization` header). Generate keys at https://openapi.coinstats.app.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.coinstats.app
security: []
tags:
  - name: CoinStats
    description: ''
  - name: Market Data
    description: >-
      The Market Data section of the API provides endpoints to access a wide
      range of market-related information, including cryptocurrency coins,
      ticker data, and fiat currency rates. This category offers comprehensive
      data to help users monitor and analyze the cryptocurrency market, track
      prices, and gain insights into market trends
  - name: News
    description: >-
      The News section of the API allows you to access news articles and updates
      related to cryptocurrencies and the blockchain industry. It provides
      valuable information from various sources to keep you informed about the
      latest developments
  - name: NFTs
    description: >-
      The NFT section of the API provides endpoints to interact with
      Non-Fungible Tokens (NFTs), which are unique digital assets stored on a
      blockchain. These endpoints allow you to retrieve information about NFTs,
      including collections, assets, trending NFTs, and specific assets
      associated with wallet addresses.
  - name: Wallet Data
    description: >-
      The Wallet section of the API provides a comprehensive set of endpoints to
      manage and interact with wallets. It enables users to retrieve wallet
      balances, monitor syncing status, fetch transaction data, and synchronize
      wallet information with the blockchain. By integrating these endpoints
      into your application, you can offer robust wallet functionality to your
      users.
  - name: Exchange Connection
    description: >-
      The Exchange Connection section of the API provides a comprehensive set of
      endpoints to manage and interact with exchanges. It enables users to
      retrieve exchange balances, monitor syncing status, fetch transaction
      data. By integrating these endpoints into your application, you can offer
      robust exchange portfolio tracking functionality to your users.
  - name: User Portfolio
    description: >-
      The Portfolio section of the API provides a comprehensive set of endpoints
      to manage and interact with Share Portfolios. It enables users to retrieve
      current Portfolio Coins and Transactions.
  - name: Usage
    description: The Usage section provides account-level API usage data.
  - name: Status
    description: The Status section provides API availability checks.
  - name: Prediction · Markets
    description: >-
      Polymarket markets: list/trend/detail, live CLOB prices and order book,
      OHLC candles, and price history. Prices are probabilities in 0..1, money
      is USD, dates are ISO 8601.
  - name: Prediction · Events
    description: >-
      Polymarket events — groups of related markets (e.g. one market per
      candidate). List, trend, and fetch an event with its child markets.
  - name: Prediction · Traders
    description: >-
      Trader leaderboard plus deep per-trader analytics: profile, open
      positions, trade history, daily PnL, category stats, aggregate trade
      stats, and composite score.
  - name: Prediction · Analytics
    description: >-
      Platform-wide analytics: overview stats, smart-money and whale traders,
      trending-by-smart-money markets, and composite market signals.
  - name: Prediction · Search
    description: Full-text search across Polymarket events, markets, and traders.
paths:
  /v1/wallet/pl/history:
    get:
      tags:
        - Wallet Data
      summary: Get a cash-flow-adjusted historical wallet P&L chart
      operationId: get-wallet-pl-history
      parameters:
        - name: range
          required: false
          in: query
          description: Preset time range. Mutually exclusive with from/to.
          schema:
            example: 1m
            type: string
            enum:
              - 24h
              - 1w
              - 1m
              - 3m
              - 6m
              - 1y
              - all
        - name: from
          required: false
          in: query
          description: >-
            Inclusive custom-range start. Use YYYY-MM-DD (UTC midnight) or an
            ISO timestamp with timezone. Must be provided with to and without
            range.
          schema:
            example: '2026-07-25T00:00:00.000Z'
            type: string
        - name: to
          required: false
          in: query
          description: >-
            Exclusive custom-range end. Use YYYY-MM-DD (UTC midnight) or an ISO
            timestamp with timezone. Must be provided with from and without
            range.
          schema:
            type: string
            example: '2026-08-24T00:00:00.000Z'
        - name: interval
          required: true
          in: query
          description: >-
            Chart bucket interval. Hourly is available only for 24h or a custom
            window of at most 24 hours entirely within the latest 24 hours.
          schema:
            type: string
            enum:
              - hourly
              - daily
              - weekly
              - monthly
              - yearly
            example: daily
        - name: currency
          required: false
          in: query
          description: Currency for P&L values. Defaults to USD.
          schema:
            default: USD
            example: USD
            type: string
        - name: address
          required: true
          in: query
          description: Wallet address whose synchronized history should be used.
          schema:
            example: '0x1234567890abcdef1234567890abcdef12345678'
            type: string
        - name: connectionId
          required: false
          in: query
          description: >-
            A connection ID, comma-separated connection IDs, or all. Takes
            precedence over blockchain.
          schema:
            example: ethereum,base-wallet
            type: string
        - name: blockchain
          required: false
          in: query
          description: >-
            A blockchain, comma-separated blockchains, or all. Used only when
            connectionId is omitted.
          schema:
            example: ethereum,base
            type: string
      responses:
        '200':
          description: Cash-flow-adjusted historical wallet P&L chart
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProfitLossChartResponseDto'
        '400':
          description: Bad Request
          content:
            application/json:
              example:
                statusCode: 400
                message: Bad Request
                requestId: 11111111-2222-3333-4444-555555555555
                path: <requested-endpoint>
        '401':
          description: Unauthorized
          content:
            application/json:
              example:
                statusCode: 401
                message: Unauthorized
                requestId: 11111111-2222-3333-4444-555555555555
                path: <requested-endpoint>
        '403':
          description: Forbidden
          content:
            application/json:
              example:
                statusCode: 403
                message: Forbidden
                requestId: 11111111-2222-3333-4444-555555555555
                path: <requested-endpoint>
        '404':
          description: Not Found
          content:
            application/json:
              example:
                statusCode: 404
                message: Not Found
                requestId: 11111111-2222-3333-4444-555555555555
                path: <requested-endpoint>
        '409':
          description: Conflict (for some endpoints)
          content:
            application/json:
              example:
                statusCode: 409
                message: Transactions not synced
                requestId: 11111111-2222-3333-4444-555555555555
                path: <requested-endpoint>
        '429':
          description: Too Many Requests
          content:
            application/json:
              example:
                statusCode: 429
                message: Rate limit exceeded
                requestId: 11111111-2222-3333-4444-555555555555
                path: <requested-endpoint>
        '503':
          description: Service Unavailable
          content:
            application/json:
              example:
                statusCode: 503
                message: Service Unavailable. Please Contact Support
      security:
        - X-API-KEY: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: >-
            curl
            "https://api.coinstats.app/v1/wallet/pl/history?address=0x1234567890abcdef1234567890abcdef12345678&connectionId=ethereum&from=2025-09-01&to=2025-10-01&interval=daily&currency=USD"
            -H "X-API-KEY: <api-key>"
components:
  schemas:
    ProfitLossChartResponseDto:
      type: object
      properties:
        result:
          type: array
          items:
            $ref: '#/components/schemas/ProfitLossChartPointDto'
        meta:
          $ref: '#/components/schemas/ProfitLossChartMetaDto'
      required:
        - result
        - meta
    ProfitLossChartPointDto:
      type: object
      properties:
        date:
          type: string
          description: ISO timestamp of the period-ending portfolio value snapshot.
          example: '2026-08-24T00:00:00.000Z'
        profitLoss:
          type: number
          description: Cash-flow-adjusted profit or loss for the period.
          example: 123.45
        profitLossPercent:
          type: number
          description: >-
            Period profit or loss divided by its starting value, as a
            percentage.
          example: 1.27
      required:
        - date
        - profitLoss
        - profitLossPercent
    ProfitLossChartMetaDto:
      type: object
      properties:
        currency:
          type: string
          example: USD
        range:
          type: string
          enum:
            - 24h
            - 1w
            - 1m
            - 3m
            - 6m
            - 1y
            - all
          nullable: true
          description: Selected preset, or null for a custom range.
          example: 1m
        interval:
          type: string
          enum:
            - hourly
            - daily
            - weekly
            - monthly
            - yearly
          example: daily
        from:
          type: string
          nullable: true
          description: >-
            Effective range start. For all, this is the earliest returned point
            or null when empty.
          example: '2026-07-25T00:00:00.000Z'
        to:
          type: string
          example: '2026-08-24T00:00:00.000Z'
        lastSyncedAt:
          type: string
          nullable: true
          description: >-
            Oldest synchronization time among the wallet networks included in
            the chart. Returned for wallet charts; null when no synchronized
            wallet history is available.
          example: '2026-08-24T12:34:56.000Z'
      required:
        - currency
        - range
        - interval
        - from
        - to
  securitySchemes:
    X-API-KEY:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        API key required to access the endpoints. Generate one from your
        dashboard at https://openapi.coinstats.app and pass it in the
        `X-API-KEY` request header. Never expose your key in client-side code.

````