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

POST /v1/prices/history

这是我们的主要历史端点!返回从与最新价格相同的快照聚合而成的高频 OHLC(开盘价、最高价、最低价、收盘价)价格历史。历史覆盖始于 2025 年 12 月 24 日。每次请求最多 100 个饰品。

支持 Doppler、Gamma Doppler 和 Case Hardened 饰品,并在响应中包含 variants 对象。

访问#

需要 Scale 或 Enterprise API 密钥。

支持的间隔#

间隔最大范围
5m14 天
30m90 天
1h365 天
1d不限

支持的来源#

来源字段
buffask, bid, ask_volume, bid_volume
youpinask, bid, ask_volume, bid_volume
csfloatask, bid, ask_volume
skinportask, ask_volume
steamask, bid, ask_volume, bid_volume
c5gameask, bid, ask_volume

默认返回全部来源。

bucket 是 UTC 间隔边界。open_time 和 close_time 是分桶内实际第一次和最后一次观测时间;见使用 API。

请求#

POSTapi.cs2.sh/v1/prices/history
curl -X POST https://api.cs2.sh/v1/prices/history \
  -H "Authorization: Bearer <<YOUR_API_KEY>>" \
  -H "Accept-Encoding: gzip" --compressed \
  -H "Content-Type: application/json" \
  -d '{
  "items": [
    "USP-S | Printstream (Factory New)"
  ],
  "start": "2026-08-19",
  "end": "2026-08-22",
  "sources": [
    "buff",
    "csfloat"
  ],
  "interval": "1h",
  "currency": "USD"
}'

参数#

字段类型必需描述
itemsstring[]是market_hash_name 值列表(最多 100 个)。
startstring是开始日期/时间(YYYY-MM-DD 或 RFC3339),包含。
endstring否结束日期/时间(YYYY-MM-DD 或 RFC3339),不含。默认现在。
sourcesstring[]否筛选特定来源。默认全部来源。
intervalstring否默认值: 5m. 允许值: 5m, 30m, 1h, 1d. 分桶间隔。5m 最多 14 天,30m 最多 90 天,1h 最多 365 天;1d 不限。
currencystring否默认值: USD. 允许值: AUD, CAD, CHF, CNY, EUR, GBP, JPY, NZD, SGD, USD. 响应中所有价格使用的货币。

响应#

{
  "response_time": "2026-08-23T22:00:06.628202571Z",
  "currency": "USD",
  "start": "2026-08-19T00:00:00Z",
  "end": "2026-08-22T00:00:00Z",
  "interval": "1h",
  "items": {
    "USP-S | Printstream (Factory New)": {
      "market_hash_name": "USP-S | Printstream (Factory New)",
      "count": 72,
      "data": [
        {
          "bucket": "2026-08-19T00:00:00Z",
          "buff": {
            "open_ask": 96.4,
            "high_ask": 96.4,
            "low_ask": 96.4,
            "close_ask": 96.4,
            "ask_volume": 491,
            "open_bid": 93.44,
            "high_bid": 93.44,
            "low_bid": 93.44,
            "close_bid": 93.44,
            "bid_volume": 37,
            "sample_count": 75,
            "open_time": "2026-08-19T00:00:56Z",
            "close_time": "2026-08-19T00:58:50Z"
          },
          "youpin": {
            "open_ask": 96.17,
            "high_ask": 96.17,
            "low_ask": 96.1,
            "close_ask": 96.1,
            "ask_volume": 539,
            "open_bid": 94.46,
            "high_bid": 94.61,
            "low_bid": 94.46,
            "close_bid": 94.61,
            "bid_volume": 65,
            "sample_count": 8,
            "open_time": "2026-08-19T00:06:21.125Z",
            "close_time": "2026-08-19T00:58:45.114Z"
          },
          "csfloat": {
            "open_ask": 95.76,
            "high_ask": 95.76,
            "low_ask": 95.76,
            "close_ask": 95.76,
            "ask_volume": 243,
            "open_bid": 92.1,
            "high_bid": 92.1,
            "low_bid": 92.1,
            "close_bid": 92.1,
            "sample_count": 60,
            "open_time": "2026-08-19T00:00:06.014Z",
            "close_time": "2026-08-19T00:54:39.374Z"
          },
          "skinport": {
            "open_ask": 105.49,
            "high_ask": 105.49,
            "low_ask": 105.49,
            "close_ask": 105.49,
            "ask_volume": 64,
            "sample_count": 60,
            "open_time": "2026-08-19T00:00:10.488Z",
            "close_time": "2026-08-19T00:59:10.489Z"
          },
          "steam": {
            "open_ask": 148.88,
            "high_ask": 148.88,
            "low_ask": 142.71,
            "close_ask": 148.88,
            "ask_volume": 70,
            "open_bid": 146.02,
            "high_bid": 146.02,
            "low_bid": 146.02,
            "close_bid": 146.02,
            "bid_volume": 2649,
            "sample_count": 20,
            "open_time": "2026-08-19T00:02:12.821Z",
            "close_time": "2026-08-19T00:59:51.255Z"
          },
          "c5game": {
            "open_ask": 99.42,
            "high_ask": 99.42,
            "low_ask": 98.63,
            "close_ask": 98.63,
            "ask_volume": 232,
            "open_bid": 172.34,
            "high_bid": 172.34,
            "low_bid": 172.34,
            "close_bid": 172.34,
            "sample_count": 12,
            "open_time": "2026-08-19T00:04:14.685Z",
            "close_time": "2026-08-19T00:08:44.192Z"
          }
        }
      ]
    }
  }
}

响应字段#

HistoryResponse 字段:

字段类型必需描述
response_timestring (date-time)是响应生成时间。
currencystring是响应中所有价格的货币代码:即请求的 currency,默认为 USD。
startstring (date-time)是查询区间的有效起点,向下对齐到间隔边界。包含。
endstring (date-time)是查询区间的有效终点,向上对齐到间隔边界。不含。
intervalstring是允许值: 5m, 30m, 1h, 1d. 请求的分桶间隔。
itemsRecord<string, HistoryItem>是market_hash_name 到 OHLC 时间序列的映射。
errorsItemError[]否与成功结果一起返回的逐饰品失败(部分成功)。

分桶#

字段描述
items.<name>.count有数据的分桶数。
items.<name>.data[]OHLC 分桶。
data[].bucketUTC 对齐的间隔边界。
data[].<source>OHLC 值,加上真实观测窗口(open_time/close_time)和 sample_count。
items.<name>.variants每个变体的相同分桶结构。
  • 每个历史分桶上都存在 bucket。
  • 来源对象仅在该来源在该分桶中有数据时出现。
  • csfloat 包含 ask 与 bid OHLC,但没有 bid_volume;skinport 仅有卖价。
  • 在请求区间内没有分桶的有效请求饰品会从 items 中省略。

完整结构:HistoryItem、HistoryBucket,以及 OHLC 来源数据 下的各来源类型。

错误#

如果只有部分饰品名称失败,端点仍返回 200,其中包含成功的序列和 errors[]。请求范围内没有分桶的有效饰品会从 items 中省略,不会产生饰品错误。见部分成功和请求错误。