BUFF sale history is now available - POST /v1/archive/buff returns sale prices and daily total supply since September 2024.

POST /v1/archive/youpin

返回三个独立时间间隔的 Youpin 成交价格历史。

  • 12h 频率自 2025 年 11 月 12 日起
  • 4h 频率自 2026 年 6 月 27 日起
  • 1h 频率自 2026 年 7 月 20 日起

Youpin 每个分桶只发布一笔成交(分桶可以是 1h、4h 或 12h)。例如,这意味着 1h 序列每天最多可以包含 24 个点。

如果饰品成交不频繁,同一笔成交也可能出现在多条序列中。因此,建议将 1h、4h 和 12h 视为数据的独立视图。

12:42 的成交
  -> 1h 序列:  分桶 12:00-13:00
  -> 4h 序列:  分桶 12:00-16:00
  -> 12h 序列: 分桶 12:00-00:00

支持几乎所有有成交历史的饰品,包括 Doppler、Gamma Doppler 和 Case Hardened 变体。数据每天约更新 1-2 次。每次请求最多 100 个饰品。

访问#

需要 Scale 或 Enterprise API 密钥。

支持的间隔#

间隔采样分桶
1h每小时一笔成交
4h每 4 小时一笔成交
12h每 12 小时一笔成交

所有被观测到的间隔都在每件饰品的 intervals 映射下一并返回,各自是一条独立序列。

请求#

POSTapi.cs2.sh/v1/archive/youpin
curl -X POST https://api.cs2.sh/v1/archive/youpin \
  -H "Authorization: Bearer <<YOUR_API_KEY>>" \
  -H "Accept-Encoding: gzip" --compressed \
  -H "Content-Type: application/json" \
  -d '{
  "items": [
    "★ Karambit | Doppler (Factory New)"
  ],
  "start": "2026-02-24",
  "end": "2026-08-23",
  "currency": "USD"
}'

参数#

字段类型必需描述
itemsstring[]是market_hash_name 值列表(最多 100 个)。
startstring否开始日期/时间(YYYY-MM-DD 或 RFC3339),包含。默认 180 天前;向下取整到整点。
endstring否结束日期/时间(YYYY-MM-DD 或 RFC3339),不含。默认现在;向上取整到整点。
currencystring否默认值: USD. 允许值: AUD, CAD, CHF, CNY, EUR, GBP, JPY, NZD, SGD, USD. 响应中所有价格使用的货币。

响应#

{
  "response_time": "2026-08-23T22:00:08.796888946Z",
  "currency": "USD",
  "start": "2026-02-24T00:00:00Z",
  "end": "2026-08-23T00:00:00Z",
  "items": {
    "★ Karambit | Doppler (Factory New)": {
      "market_hash_name": "★ Karambit | Doppler (Factory New)",
      "intervals": {
        "1h": {
          "count": 595,
          "data": [
            {
              "bucket": "2026-07-21T16:00:00Z",
              "time": "2026-07-21T16:52:38.307Z",
              "price": 1314.88
            },
            {
              "bucket": "2026-07-21T18:00:00Z",
              "time": "2026-07-21T18:49:58.613Z",
              "price": 8125.64
            }
          ]
        },
        "4h": {
          "count": 324,
          "data": [
            {
              "bucket": "2026-06-27T16:00:00Z",
              "time": "2026-06-27T18:37:02.696Z",
              "price": 1971.09
            },
            {
              "bucket": "2026-06-27T20:00:00Z",
              "time": "2026-06-27T23:59:41.06Z",
              "price": 1995.59
            }
          ]
        },
        "12h": {
          "count": 360,
          "data": [
            {
              "bucket": "2026-02-24T04:00:00Z",
              "time": "2026-02-24T14:31:07.376Z",
              "price": 1505.36
            },
            {
              "bucket": "2026-02-24T16:00:00Z",
              "time": "2026-02-25T03:42:29.407Z",
              "price": 2215.6
            }
          ]
        }
      },
      "variants": {
        "Phase 2": {
          "market_hash_name": "★ Karambit | Doppler (Factory New)",
          "name": "★ Karambit | Doppler (Factory New) | Phase 2",
          "display_name": "Phase 2",
          "version": "p2",
          "intervals": {
            "1h": {
              "count": 295,
              "data": [
                {
                  "bucket": "2026-07-22T22:00:00Z",
                  "time": "2026-07-22T22:01:51.055Z",
                  "price": 1902.37
                }
              ]
            },
            "4h": {
              "count": 267,
              "data": [
                {
                  "bucket": "2026-06-29T00:00:00Z",
                  "time": "2026-06-29T01:20:49.596Z",
                  "price": 2156.42
                }
              ]
            },
            "12h": {
              "count": 356,
              "data": [
                {
                  "bucket": "2026-02-24T04:00:00Z",
                  "time": "2026-02-24T14:03:32.869Z",
                  "price": 2272.73
                }
              ]
            }
          }
        }
      }
    }
  }
}

响应字段#

ArchiveYoupinResponse 字段:

字段类型必需描述
response_timestring (date-time)是响应生成时间。
currencystring是响应中所有价格的货币代码:即请求的 currency,默认为 USD。
startstring (date-time)是查询区间的有效起点,向下对齐到 1h 边界。包含。
endstring (date-time)是查询区间的有效终点,向上对齐到 1h 边界。不含。
itemsRecord<string, ArchiveYoupinItem>是market_hash_name 到 Youpin 成交序列的映射。
errorsItemError[]否与成功结果并存的按饰品失败(部分成功)。

序列#

字段描述
items.<name>.intervals以 1h、4h、12h 为键的映射;每个键是一条独立序列。
intervals.<width>.count该时间窗内的成交点数量。
intervals.<width>.data[]成交点。
data[].bucket采样分桶边界。
data[].time实际成交时间。
data[].price成交价,USD,按成交日期的汇率转换。
items.<name>.variants每个变体的相同结构。
  • 只有当该宽度在时间窗内被观测过时,对应的间隔键才会出现;count: 0 表示已观测但没有成交。
  • count 是该条序列中的数据点数量,不是成交量。
  • 请求的有效饰品若没有 Youpin 成交历史则返回 not_in_archive。

完整结构:ArchiveYoupinItem、ArchiveYoupinSeries、ArchiveYoupinPoint。

错误#

404 not_found 表示请求中的有效饰品在该时间范围内均没有 Youpin 历史。部分结果返回 200 和 errors[];饰品错误代码包括 unknown_item、invalid_format、not_in_archive、unsupported_source 和 unsupported_variant。见部分成功和请求错误。