---
title: "YouPin total market cap (Enterprise)"
method: GET
path: "/v1/indexes/market-cap"
tags: ["Indexes"]
---

# YouPin total market cap (Enterprise)

`GET /v1/indexes/market-cap`

## Request

- Base URL: `https://api.cspriceapi.com`
- URL: `https://api.cspriceapi.com/v1/indexes/market-cap`
- Auth: API key in header `x-api-key`

Daily or hourly **aggregate YouPin market cap** — the sum of
`price × listing count` across the YouPin898 catalogue, in CNY.

This is the same cleaned series shown on the public Market Index page:

- unit price must be `> 0` and `< 1,000,000` RMB (drops joke listings)
- at least **2** active listings (a single seller cannot move the index)
- only skins that exist in the internal catalogue

Daily data is cached server-side for 6 hours. Hourly data is cached for
10 minutes and reads the pre-aggregated hourly table when available.

`market_cap_rmb` is a decimal **string**. `cleaned` is `true` when the
outlier filters were applied; `false` means a fast fallback from the
precomputed daily table was used.

## Query parameters

- `resolution` 'daily' | 'hourly'
- `days` integer
- `hours` integer

## Response `200`

Aggregate YouPin market-cap series.

- MarketCapResponse: Aggregate YouPin market-cap envelope.
  - `currency` 'CNY', required
  - `resolution` 'daily' | 'hourly', required
  - `days` integer: Present for `resolution=daily`.
  - `hours` integer: Present for `resolution=hourly`.
  - `cleaned` boolean, required: `true` when outlier filters were applied. `false` when the precomputed `market_cap_daily` fallback was used.
  - `formula` string
  - `filters` object
    - `max_price_rmb` integer
    - `min_listings` integer
  - `current` union: Latest point in the returned series, or `null` if empty.
    - MarketCapPointDaily
      - `day` string, date, required
      - `market_cap_rmb` string, required: Fixed-point decimal value serialized as a string (preserves precision across languages). Parse with an arbitrary-precision decimal library; do **not** parse as a native float.
      - `listing_count` integer, nullable: Sum of listing counts included in the cap.
    - MarketCapPointHourly
      - `ts` integer, required: Unix timestamp of the hour bucket (UTC).
      - `hour` string, date-time, required: ISO-8601 UTC timestamp for the hour bucket.
      - `market_cap_rmb` string, required: Fixed-point decimal value serialized as a string (preserves precision across languages). Parse with an arbitrary-precision decimal library; do **not** parse as a native float.
      - `listing_count` integer, nullable
  - `change_7d` string: Fixed-point decimal value serialized as a string (preserves precision across languages). Parse with an arbitrary-precision decimal library; do **not** parse as a native float.
  - `change_range` string: Fixed-point decimal value serialized as a string (preserves precision across languages). Parse with an arbitrary-precision decimal library; do **not** parse as a native float.
  - `from` string, date, nullable: First daily point (`resolution=daily` only).
  - `to` string, date, nullable: Last daily point (`resolution=daily` only).
  - `count` integer, required
  - `data` union[], required
    - union
      - MarketCapPointDaily
        - `day` string, date, required
        - `market_cap_rmb` string, required: Fixed-point decimal value serialized as a string (preserves precision across languages). Parse with an arbitrary-precision decimal library; do **not** parse as a native float.
        - `listing_count` integer, nullable: Sum of listing counts included in the cap.
      - MarketCapPointHourly
        - `ts` integer, required: Unix timestamp of the hour bucket (UTC).
        - `hour` string, date-time, required: ISO-8601 UTC timestamp for the hour bucket.
        - `market_cap_rmb` string, required: Fixed-point decimal value serialized as a string (preserves precision across languages). Parse with an arbitrary-precision decimal library; do **not** parse as a native float.
        - `listing_count` integer, nullable
  - `source` string, required
  - `requestor` string, email
  - `plan` string
  - `timestamp` string, date-time, required: ISO-8601 UTC timestamp (millisecond precision).

## Other responses

- `400`: Invalid parameters.
- `401`: Missing, invalid, disabled or expired API key.
- `403`: The API key is valid but is not allowed to call this endpoint (endpoint ACL).
- `429`: Rate limit exceeded (10 requests per second per key). Retry after 1 second.
- `500`: Internal server error – temporary upstream failure, etc.

---

[API](https://skmtc.dev/cspriceapi/apis/cs-price-api.md) · [All operations](https://skmtc.dev/cspriceapi/apis/cs-price-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cspriceapi/apis/cs-price-api/revisions/4a18a7641dad?raw)
