Skip to main content
GET/v1/pricing/:marketHashName/history/marketsPRO+

按市场价格历史

饰品的按市场历史价格序列:与 /v1/pricing/:marketHashName/history 相同的时间分桶,但按市场拆分为每个市场一条 series,而非单一跨市场聚合。用 markets 过滤特定平台。价格为整数美分。

这是价格历史的按市场版本:不再是一条混合序列,而是 series[] 中每个市场一条,各自携带自己的 history[] 分桶(avgPrice、bestBidCents / bestAskCents、spreadBps 等)。用它对比同一件饰品在不同平台的交易情况。

传入 markets CSV(例如 buff163,csfloat)限定返回的平台;省略则返回所有有覆盖的市场。from / to / interval / listingType / salesWindow 的行为与聚合历史接口完全一致。

按游戏区分的版本:GET /v2/pricing/:marketHashName/history/markets 通过必填参数 game=cs2|rust 同时服务两款游戏,见游戏:CS2 与 Rust。

参数

marketHashNamestring必填
路径段。URL 编码的 market_hash_name。
marketsstring可选
查询参数。要返回的市场 id CSV,例如 buff163,csfloat。省略则返回所有有覆盖的市场。
fromstring可选
查询参数。ISO 8601 起始时间。默认:now − 30d。
tostring可选
查询参数。ISO 8601 结束时间。默认:now。
listingTypestring可选
查询参数。SELL_OFFER | BUY_ORDER | SALE_HISTORY。默认:SELL_OFFER。
salesWindowstring可选
查询参数。24h | 7d | 30d | 90d。仅当 listingType=SALE_HISTORY 时有效。
intervalstring可选
查询参数。请求的分桶宽度:MINUTE_5 | MINUTE_15 | HOUR_1 | HOUR_6 | DAY_1。会覆盖由 from/to 推导的粒度,并对齐到最接近的已存储汇总(MINUTE_5/MINUTE_15 → 10m,HOUR_1/HOUR_6 → 1h,DAY_1 → 1d);响应中的 effectiveInterval 报告实际宽度。未知值返回 400。

响应字段

PriceHistoryByMarketResponse饰品的按市场时间分桶价格序列。
canonicalItemIdstring
规范饰品 id。
namestring
Market hash name。
listingTypestring
SELL_OFFER | BUY_ORDER | SALE_HISTORY。
salesWindowstringnullable
仅当 listingType=SALE_HISTORY 时设置。
effectiveIntervalstring
实际返回的分桶宽度:10m | 1h | 1d。可能与请求的 interval 不同,后者会对齐到这些已存储的汇总粒度。
每个市场一条。

嵌套与共享结构链接到 API 对象 参考页。

错误

400未知的 interval / listingType,或日期范围无效。
401缺少 Authorization 头、认证方案不支持,或密钥未知、未激活、已过期、已吊销。
403密钥有效,但订阅未激活/已过期,或套餐不含此接口。
429超出速率限制;见 Retry-After 与 X-RateLimit-* 响应头。配额按账号合并计算,所有密钥共享。
5xx上游快照不可用或服务端问题。请退避后重试。

使用此端点的指南(英文)

export SKINPRICER_API_KEY="sp_live_•••"

curl -G "https://pricing.skinpricer.com/v1/pricing/AK-47%20%7C%20Redline%20(Field-Tested)/history/markets" \
  --data-urlencode "interval=DAY_1" \
  -H "Authorization: ApiKey $SKINPRICER_API_KEY"
// npm i @skinpricer/sdk
import { SkinpricerClient } from "@skinpricer/sdk";

const client = new SkinpricerClient({
  apiKey: process.env.SKINPRICER_API_KEY!,
  authScheme: "ApiKey",
});

const { series } = await client.history.byMarket("AK-47 | Redline (Field-Tested)", { interval: "DAY_1" });
for (const s of series) console.log(s.market, s.history.length, "buckets");
import os
import requests

res = requests.get(
    "https://pricing.skinpricer.com/v1/pricing/AK-47%20%7C%20Redline%20(Field-Tested)/history/markets",
    params={"interval": "DAY_1"},
    headers={"Authorization": f"ApiKey {os.environ['SKINPRICER_API_KEY']}"},
    timeout=10,
)
res.raise_for_status()
print(res.json())

需要认证的接口:请在你自己的客户端中携带 API 密钥调用(见代码示例)。

响应 200
{
  "canonicalItemId": "cmlofczf90qj401vsd80dskd1",
  "name": "AK-47 | Redline (Field-Tested)",
  "listingType": "SELL_OFFER",
  "salesWindow": null,
  "effectiveInterval": "1d",
  "series": [
    {
      "market": "buff163",
      "history": [
        {
          "timestamp": "2026-09-22T00:00:00.000Z",
          "avgPrice": 3343,
          "medianPrice": 2942,
          "minPrice": 2532,
          "maxPrice": 5565,
          "listingCount": 8472,
          "totalQuantity": null,
          "volume": null,
          "bestBidCents": 2584,
          "bestAskCents": 2532,
          "spreadBps": -203
        }
      ]
    },
    {
      "market": "csfloat",
      "history": [
        {
          "timestamp": "2026-09-22T00:00:00.000Z",
          "avgPrice": 2524,
          "medianPrice": 2526,
          "minPrice": 2495,
          "maxPrice": 2526,
          "listingCount": 3655,
          "totalQuantity": null,
          "volume": null,
          "bestBidCents": 2500,
          "bestAskCents": 2495,
          "spreadBps": -20
        }
      ]
    }
  ]
}
响应头
X-RateLimit-Limit: <每分钟配额,由套餐决定>
X-RateLimit-Remaining: <本分钟剩余次数>
X-RateLimit-Reset: <距重置的秒数>
X-RateLimit-Remaining-Month: <本月剩余次数,仅限有月度上限的套餐>
X-Request-ID: req_xxxxxxxxxxxxxxxx

使用与许可

API 及其数据的使用受我们的服务条款(英文)约束:不得转售或再分发数据,不得用于构建竞争性服务, 不得超出套餐的速率限制;在条款允许展示数据的场景下须注明数据来源为 SkinPricer。滥用行为可能被限流或封禁。