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

# PnL Index

> CryptoQuant's P&L Index uses the MVRV ratio, NUPL and LTH/STH SOPR to build a single bitcoin valuation indicator.

## What it measures

The P\&L (Profit & Loss) Index combines several on-chain profitability metrics — the MVRV ratio, NUPL, and the LTH/STH SOPR ratio — into a single normalized bitcoin valuation indicator. By aggregating these signals, it captures the aggregate profit/loss state of the market in one value, smoothing out the noise of any individual metric.

## How to interpret it

The index oscillates around a neutral zone, with extremes flagging stretched valuations:

* **Values above 1 (red line)** indicate bitcoin price is overvalued — the market is broadly in heavy unrealized profit, which historically coincides with cycle tops and elevated selling pressure.
* **Values below -1.38 (green line)** indicate bitcoin price is undervalued — the market is broadly in unrealized loss, historically marking accumulation zones and cycle bottoms.

## Key thresholds

* **Overvalued:** above 1 (red line)
* **Undervalued:** below -1.38 (green line)

To determine whether bitcoin is in a bull or bear market, compare the P\&L Index against its 365-day moving average: trading above the moving average signals a bull regime, while trading below it signals a bear regime.

<Card title="Run this metric in CryptoQuant Analytics" icon="chart-line" href="https://cryptoquant.com/analytics/query/646cfa3c63e4017215b7f3c7?v=646cfa3c63e4017215b7f3c9" />


## OpenAPI

````yaml openapi/v2.json GET /community/bitcoin-pnl-index
openapi: 3.0.0
info:
  version: 2.0.0-beta
  title: CryptoQuant Data API v2
  description: >-
    The CryptoQuant Data API v2 serves curated, research-grade indicators built
    on the v1 conventions — the `status`/`result` response envelope, Bearer
    token authentication, and the `window`/`from`/`to` time parameters. Each
    metric ships with an interpretation guide covering what it measures, key
    thresholds, and how to combine it with other metrics.
  termsOfService: https://cryptoquant.com/terms-of-service
  contact:
    name: API Support
    email: contact@cryptoquant.com
servers:
  - url: https://api.cryptoquant.com/v2
    description: Default server
security: []
tags:
  - name: Community-built Indicators
paths:
  /community/bitcoin-pnl-index:
    get:
      tags:
        - Community-built Indicators
      summary: PnL Index
      description: >-
        CryptoQuant's P&L Index uses the MVRV ratio, NUPL and LTH/STH SOPR to
        build a single bitcoin valuation indicator.
      operationId: V2getBitcoinPnlIndex
      parameters:
        - name: window
          in: query
          required: false
          description: Time interval for aggregation.
          schema:
            type: string
            default: day
          example: day
        - name: from
          in: query
          required: false
          description: >-
            Starting time, formatted as YYYYMMDDTHHMMSS (UTC). If `window=day`,
            YYYYMMDD is also accepted.
          schema:
            type: string
        - name: to
          in: query
          required: false
          description: >-
            Ending time, formatted as YYYYMMDDTHHMMSS (UTC). If `window=day`,
            YYYYMMDD is also accepted.
          schema:
            type: string
        - name: limit
          in: query
          required: false
          description: Maximum number of data rows to return. Ranges from 1 to 10,000.
          schema:
            type: integer
            default: 100
            minimum: 1
            maximum: 10000
      responses:
        '200':
          description: market regime
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - result
                properties:
                  status:
                    $ref: '#/components/schemas/Status'
                  result:
                    type: object
                    properties:
                      window:
                        type: string
                      data:
                        type: array
                        items:
                          type: object
                          properties:
                            datetime:
                              type: string
                              description: >-
                                The datetime, formatted as YYYY-MM-DD HH:MM:SS
                                (UTC).
                              example: '2026-06-14 00:00:00'
                            pnl_index:
                              type: number
                              example: -0.58300629
                            pnl_index_365day_ma:
                              type: number
                              example: 0.10380787
                            buy:
                              type: number
                              example: 0
                            neutral:
                              type: number
                              example: 1
      security:
        - AccessToken: []
      x-codeSamples:
        - lang: Shell
          source: >-
            curl -X GET
            "https://api.cryptoquant.com/v2/community/bitcoin-pnl-index?window=day"
            \

            -H "Authorization: Bearer <YOUR_API_KEY>"
        - lang: JavaScript
          source: >-
            fetch("https://api.cryptoquant.com/v2/community/bitcoin-pnl-index?window=day",
            { headers: { "Authorization": "Bearer <YOUR_API_KEY>"} })
              .then(response => response.json())
              .then(data => console.log(data))
        - lang: NodeJS
          source: |-
            require('axios')
              .get("https://api.cryptoquant.com/v2/community/bitcoin-pnl-index?window=day", { headers: { Authorization: 'Bearer <YOUR_API_KEY>' } })
              .then(response => console.log(response))
        - lang: Ruby
          source: >-
            require 'net/http'

            uri =
            URI("https://api.cryptoquant.com/v2/community/bitcoin-pnl-index?window=day")

            req = Net::HTTP::Get.new(uri)

            req["Authorization"] = "Bearer <YOUR_API_KEY>"

            res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) {
            |http| http.request(req) }

            puts res.body
        - lang: Python
          source: >-
            import requests

            headers = {'Authorization': 'Bearer <YOUR_API_KEY>'}

            url =
            "https://api.cryptoquant.com/v2/community/bitcoin-pnl-index?window=day"

            print(requests.get(url, headers=headers).json())
components:
  schemas:
    Status:
      type: object
      description: >-
        Returned with every response; indicates whether the request was
        successful.
      example:
        code: 200
        message: success
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int32
          description: HTTP status code.
          example: 200
        message:
          type: string
          description: Text description of the error or success.
          example: success
  securitySchemes:
    AccessToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      x-default: Bearer <YOUR_API_KEY>
      description: >-
        For each API request, include the `Authorization` HTTP header with
        `Bearer <YOUR_API_KEY>`.

````