Legacy V1/V2YouPin Market Cap
GET /v1/indexes/market-cap
Legacy V1/V2 reference. These routes stay supported for existing integrations. V3 returns every price in USD or 29 other currencies, with the marketplace's own value alongside — see /v3/indexes/market-cap.
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
> 0and< 1,000,000RMB (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.
Access
Available on Enterprise.
Query parameters
| Parameter | Description |
|---|---|
resolution | Point density. Defaults to daily. |
days | Lookback for resolution=daily (clamped to 7–365). |
hours | Lookback for resolution=hourly (clamped to 12–168). |
Request
GET https://api.cspriceapi.com/v1/indexes/market-cap
curl -s --compressed "https://api.cspriceapi.com/v1/indexes/market-cap?resolution=daily&days=30" \
-H "x-api-key: YOUR_API_KEY"import requests
response = requests.get(
"https://api.cspriceapi.com/v1/indexes/market-cap",
params={"resolution": "daily", "days": "30"},
headers={"x-api-key": "YOUR_API_KEY"},
timeout=60,
)
response.raise_for_status()
data = response.json()const response = await fetch(`https://api.cspriceapi.com/v1/indexes/market-cap?${new URLSearchParams({"resolution":"daily","days":"30"})}`, {
headers: {
"x-api-key": "YOUR_API_KEY",
},
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
q := url.Values{}
q.Set("resolution", "daily")
q.Set("days", "30")
req, err := http.NewRequest("GET", "https://api.cspriceapi.com/v1/indexes/market-cap?"+q.Encode(), nil)
if err != nil {
panic(err)
}
req.Header.Set("x-api-key", "YOUR_API_KEY")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(resp.Status, len(body), "bytes")
}library(httr2)
response <- request("https://api.cspriceapi.com/v1/indexes/market-cap") |>
req_url_query(resolution = "daily", days = "30") |>
req_headers(`x-api-key` = "YOUR_API_KEY") |>
req_perform()
data <- resp_body_json(response)Response
{
"currency": "CNY",
"resolution": "daily",
"days": 30,
"cleaned": true,
"formula": "sum(price * listing_count)",
"filters": {
"max_price_rmb": 1000000,
"min_listings": 2
},
"current": {
"day": "2026-09-05",
"market_cap_rmb": "1854321000.2500",
"listing_count": 412003
},
"change_7d": "1.24",
"change_range": "-2.10",
"from": "2026-08-07",
"to": "2026-09-05",
"count": 2,
"data": [
{
"day": "2026-08-07",
"market_cap_rmb": "1894000000.0000",
"listing_count": 401220
},
{
"day": "2026-09-05",
"market_cap_rmb": "1854321000.2500",
"listing_count": 412003
}
],
"source": "YouPin Market Cap",
"requestor": "customer@example.com",
"plan": "enterprise",
"timestamp": "2026-09-05T16:00:00.000Z"
}Response fields
| Field | Type | Required | Description |
|---|---|---|---|
currency | string | Yes | – |
resolution | string | Yes | – |
days | integer | No | Present for resolution=daily. |
hours | integer | No | Present for resolution=hourly. |
cleaned | boolean | Yes | true when outlier filters were applied. false when the
precomputed market_cap_daily fallback was used. |
formula | string | No | – |
filters | object | No | – |
filters.max_price_rmb | integer | No | – |
filters.min_listings | integer | No | – |
current | any | No | Latest point in the returned series, or null if empty. |
change_7d | string | No | Percent change vs ~7 days earlier. null if not enough history. |
change_range | string | No | Percent change from the first to the last point in this response. |
from | string (date) | No | First daily point (resolution=daily only). |
to | string (date) | No | Last daily point (resolution=daily only). |
count | integer | Yes | – |
data | any[] | Yes | – |
source | string | Yes | – |
requestor | string (email) | No | – |
plan | string | No | – |
timestamp | string (date-time) | Yes | ISO-8601 UTC timestamp (millisecond precision). |
Errors
400Invalid parameters.401Missing, invalid, disabled or expired API key.403The API key is valid but is not allowed to call this endpoint (endpoint ACL).429Rate limit exceeded (10 requests per second per key). Retry after 1 second.500Internal server error – temporary upstream failure, etc.