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

# Mean Coin Age

> Mean Coin Age is the mean, over unspent outputs, of age in days multiplied by amount — like Coin Days Destroyed, but over the coins that are still held rather than the ones being spent.

## What it measures

Mean Coin Age is the mean, over unspent outputs, of age in days multiplied by amount — like Coin Days Destroyed, but over the coins that are still held rather than the ones being spent. Mean Coin Dollar Age additionally weights each output by the USD price when it was created.

**📖 Data Guide:** [Mean Coin Age (MCA)](/data-guide/utxo/mean-coin-age-mca) — definition, interpretation, and chart examples.

## Assets and windows

| Asset class | What it covers | Assets | Windows |
| - | - | - | - |
| **Bitcoin** | the native asset of Bitcoin, `asset=btc` | `btc` | `block` · `hour` · `day` |

The default window is `day`.

## Response fields

The time key depends on the window: `datetime` for `day` and `hour` and `blockheight` plus `datetime` for `block`.

| Field | Type | Description |
| - | - | - |
| `mca` | number | Mean Coin Age — the mean, over unspent outputs, of the output's age in days multiplied by its amount. |
| `mcda` | number | Mean Coin Dollar Age — the mean, over unspent outputs, of the output's age in days multiplied by its amount and by the USD price when it was created. |


## OpenAPI

````yaml openapi/v2-onchain.json GET /indicator/holder-composition/mca
openapi: 3.0.0
info:
  version: 2.0.0-beta
  title: CryptoQuant Data API v2 — On-chain
  description: >-
    On-chain endpoints of the CryptoQuant Data API v2 — network activity,
    exchange and mining pool flows, indicators, and capitalization, for Bitcoin
    and for Ethereum with the ERC-20 and stablecoin assets issued on it. One
    path serves every asset: the asset is a query parameter, not part of the
    path. Built on the v1 conventions: the `status`/`result` envelope, Bearer
    token authentication, and the `window`/`from`/`to` time parameters.
  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: Network Data
  - name: Exchange Flows
  - name: Mining Pool Flows
  - name: Inter-Entity Flows
  - name: Indicator
  - name: Market Data
paths:
  /indicator/holder-composition/mca:
    get:
      tags:
        - Indicator
      summary: Mean Coin Age
      description: >-
        Mean Coin Age is the mean, over unspent outputs, of age in days
        multiplied by amount — like Coin Days Destroyed, but over the coins that
        are still held rather than the ones being spent. Mean Coin Dollar Age
        additionally weights each output by the USD price when it was created.
      operationId: V2IndicatorHolderCompositionMca
      parameters:
        - name: asset
          in: query
          required: true
          description: >-
            Asset to query, by its CryptoQuant alias (no chain suffix — `usdt`,
            not `usdt_eth`). 1 asset is available on this endpoint, across the
            asset class `btc`. Enumerate them with `/v2/discovery/endpoints`.
          schema:
            type: string
          example: btc
        - name: chain
          in: query
          required: false
          description: >-
            Chain the asset lives on. Optional for an asset that exists on
            exactly one chain, required when the same alias exists on several.
          schema:
            type: string
            enum:
              - bitcoin
        - name: window
          in: query
          required: false
          description: >-
            Aggregation window. Which windows are valid depends on the asset —
            see the endpoint page. Defaults to `day`.
          schema:
            type: string
            enum:
              - block
              - hour
              - day
            default: day
        - name: from
          in: query
          required: false
          description: >-
            Inclusive start time, `YYYYMMDDTHHMMSS` (UTC). If `window=day`,
            `YYYYMMDD` is also accepted.
          schema:
            type: string
        - name: to
          in: query
          required: false
          description: >-
            Inclusive end time, `YYYYMMDDTHHMMSS` (UTC). If `window=day`,
            `YYYYMMDD` is also accepted.
          schema:
            type: string
        - name: limit
          in: query
          required: false
          description: Maximum rows returned (default 100, max 10000).
          schema:
            type: integer
            default: 100
            maximum: 10000
        - name: format
          in: query
          required: false
          description: 'Response format: `json` (default) or `csv`.'
          schema:
            type: string
            enum:
              - json
              - csv
            default: json
      responses:
        '200':
          description: Mean Coin Age time-series.
          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: >-
                                Interval start, `YYYY-MM-DD HH:MM:SS` (UTC).
                                Present for every window.
                            blockheight:
                              type: integer
                              description: >-
                                Block height. Present only when `window` is
                                `block`.
                            mca:
                              type: number
                              description: >-
                                Mean Coin Age — the mean, over unspent outputs,
                                of the output's age in days multiplied by its
                                amount.
                            mcda:
                              type: number
                              description: >-
                                Mean Coin Dollar Age — the mean, over unspent
                                outputs, of the output's age in days multiplied
                                by its amount and by the USD price when it was
                                created.
      security:
        - AccessToken: []
      x-codeSamples:
        - lang: Shell
          source: >-
            curl -X GET
            "https://api.cryptoquant.com/v2/indicator/holder-composition/mca?asset=btc&window=day"
            \

            -H "Authorization: Bearer <YOUR_API_KEY>"
        - lang: JavaScript
          source: >-
            fetch("https://api.cryptoquant.com/v2/indicator/holder-composition/mca?asset=btc&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/indicator/holder-composition/mca?asset=btc&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/indicator/holder-composition/mca?asset=btc&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/indicator/holder-composition/mca?asset=btc&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.
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int32
          description: HTTP status code.
        message:
          type: string
          description: Text description of the error or success.
  securitySchemes:
    AccessToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        For each API request, include the `Authorization` HTTP header with
        `Bearer {access_token}`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.