API

获取单个饰品的价格

GET /prices — 获取单个饰品的价格

操作

GET /prices

行为

按 Steam market hash name 返回单个饰品在各市场的当前报价。

  • 每个市场的每个方向最多一条报价,先按 market_code、再按 side 排序。当多个来源报告同一市场时,仍在售的报价优先于已下架的报价,其次直接取自该市场的数据优先于聚合平台的数据,再次以最近确认的报价(fresh_at)为准。
  • 只有当某市场的所有来源都已下架该饰品时,才返回该市场的下架报价(delisted_at 有值、quantity 为 0,保留最后已知的价格)。
  • 市场数据足够的饰品还会多一条 side 为 mid 的 CSCP 报价:cs.cheap 估值,即各市场在售挂单与求购订单的人民币加权共识,每天更新一次。其 valuation 对象给出置信度(credibility、uncertainty)和两侧共识价;其他报价的 valuation 均为 null。它是估值,不是可成交的报价。
  • 可用 markets(逗号分隔的市场代码;CSCP 选取估值)和 side(ask、bid、mid 或 all)缩小结果范围。
  • market_hash_name 必须完全匹配,包括大小写。
  • 价格为十进制字符串,使用各市场自身的货币(market_currency_code),不做任何换算。
  • 404 表示该饰品在此 app_id 下没有任何报价。如果饰品的报价全部被 markets 或 side 过滤掉,则返回 200,markets 列表为空。

[!note] 此端点按请求计费。失败的请求(包括 404)从不扣费;meta.credit 会报告本次费用和你的预估剩余余额。

用量

{
  "authentication": "user-api-key",
  "credit_cost": 1,
  "premium": false,
  "recommended_interval_seconds": 60,
  "rate_limit": {
    "max_requests": 120,
    "window_seconds": 60
  },
  "unit_pricing": null
}

请求

{
  "parameters": [
    {
      "name": "market_hash_name",
      "in": "query",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 255,
        "description": "饰品的 Steam market hash name,须与 Steam 社区市场上显示的完全一致(精确匹配,区分大小写)。",
        "title": "Market Hash Name"
      },
      "description": "饰品的 Steam market hash name,须与 Steam 社区市场上显示的完全一致(精确匹配,区分大小写)。"
    },
    {
      "name": "app_id",
      "in": "query",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 16,
        "description": "游戏的 Steam 应用 ID。默认为 `730`(Counter-Strike 2)。",
        "default": "730",
        "title": "App Id"
      },
      "description": "游戏的 Steam 应用 ID。默认为 `730`(Counter-Strike 2)。"
    },
    {
      "name": "markets",
      "in": "query",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string",
            "minLength": 1
          },
          {
            "type": "null"
          }
        ],
        "description": "要包含的市场代码,以逗号分隔,例如 `BUFF,UUYP`。代码两侧的空格会被忽略;每个代码只能由大写字母、数字或下划线组成。省略则包含所有市场。",
        "title": "Markets"
      },
      "description": "要包含的市场代码,以逗号分隔,例如 `BUFF,UUYP`。代码两侧的空格会被忽略;每个代码只能由大写字母、数字或下划线组成。省略则包含所有市场。"
    },
    {
      "name": "side",
      "in": "query",
      "required": false,
      "schema": {
        "enum": [
          "ask",
          "bid",
          "mid",
          "all"
        ],
        "type": "string",
        "description": "返回市场的哪一方向:`ask` 为在售挂单,`bid` 为求购订单,`mid` 为 CSCP 估值,`all` 为全部。默认为 `all`。",
        "default": "all",
        "title": "Side"
      },
      "description": "返回市场的哪一方向:`ask` 为在售挂单,`bid` 为求购订单,`mid` 为 CSCP 估值,`all` 为全部。默认为 `all`。"
    }
  ]
}

响应

{
  "200": {
    "description": "请求成功",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/Envelope_ItemPricesOut_"
        }
      }
    }
  },
  "401": {
    "description": "缺少认证信息或认证无效",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ErrorEnvelope"
        }
      }
    }
  },
  "402": {
    "description": "点数不足以完成本次请求",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ErrorEnvelope"
        }
      }
    }
  },
  "403": {
    "description": "凭证有效,但无权调用此操作",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ErrorEnvelope"
        }
      }
    }
  },
  "404": {
    "description": "请求的资源不存在",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ErrorEnvelope"
        }
      }
    }
  },
  "422": {
    "description": "参数或请求体无效",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ErrorEnvelope"
        }
      }
    }
  },
  "429": {
    "description": "对此端点的请求过多;请稍后重试",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ErrorEnvelope"
        }
      }
    }
  },
  "503": {
    "description": "服务暂时不可用;请稍后重试",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ErrorEnvelope"
        }
      }
    }
  }
}

模型

{
  "CreditMeta": {
    "properties": {
      "cost": {
        "type": "integer",
        "title": "Cost",
        "description": "本次请求花费的点数。"
      },
      "remaining": {
        "type": "integer",
        "title": "Remaining",
        "description": "本次请求后的预估剩余点数。仅作参考而非账目:并发请求可能导致其略有偏差。"
      }
    },
    "type": "object",
    "required": [
      "cost",
      "remaining"
    ],
    "title": "CreditMeta",
    "description": "计费请求的点数结算信息。"
  },
  "Envelope_ItemPricesOut_": {
    "properties": {
      "data": {
        "$ref": "#/components/schemas/ItemPricesOut",
        "description": "端点返回的数据。"
      },
      "meta": {
        "$ref": "#/components/schemas/Meta",
        "description": "请求元数据。"
      }
    },
    "type": "object",
    "required": [
      "data",
      "meta"
    ],
    "title": "Envelope[ItemPricesOut]"
  },
  "ErrorBody": {
    "properties": {
      "code": {
        "type": "string",
        "title": "Code",
        "description": "稳定的机器可读错误代码。请根据此值进行分支处理,而不是 `message`。"
      },
      "message": {
        "type": "string",
        "title": "Message",
        "description": "面向人类阅读的说明。措辞可能变化。"
      },
      "details": {
        "anyOf": [
          {
            "additionalProperties": true,
            "type": "object"
          },
          {
            "type": "null"
          }
        ],
        "title": "Details",
        "description": "可选的结构化上下文,例如校验错误列表;对于 `credit_insufficient`,则为所需点数和剩余点数。"
      }
    },
    "type": "object",
    "required": [
      "code",
      "message"
    ],
    "title": "ErrorBody",
    "description": "失败请求的详细信息。"
  },
  "ErrorEnvelope": {
    "properties": {
      "error": {
        "$ref": "#/components/schemas/ErrorBody",
        "description": "出了什么问题。"
      },
      "meta": {
        "$ref": "#/components/schemas/Meta",
        "description": "请求元数据。"
      }
    },
    "type": "object",
    "required": [
      "error",
      "meta"
    ],
    "title": "ErrorEnvelope",
    "description": "错误响应:`error` 中为错误信息,`meta` 中为请求元数据。"
  },
  "ItemPricesOut": {
    "properties": {
      "app_id": {
        "type": "string",
        "title": "App Id",
        "description": "Steam 应用 ID,原样回显请求中的值。"
      },
      "market_hash_name": {
        "type": "string",
        "title": "Market Hash Name",
        "description": "饰品的 market hash name,原样回显请求中的值。"
      },
      "markets": {
        "items": {
          "$ref": "#/components/schemas/MarketQuoteOut"
        },
        "type": "array",
        "title": "Markets",
        "description": "该饰品的报价,每个市场的每个方向最多一条,先按市场代码、再按方向排序。`markets` 或 `side` 过滤条件排除了所有报价时为空。"
      }
    },
    "type": "object",
    "required": [
      "app_id",
      "market_hash_name",
      "markets"
    ],
    "title": "ItemPricesOut",
    "description": "单个饰品及其全部市场报价。"
  },
  "MarketQuoteOut": {
    "properties": {
      "market_code": {
        "type": "string",
        "title": "Market Code",
        "description": "该报价所属市场的代码,例如 `BUFF`。`CSCP` 表示 cs.cheap 对该饰品的估值:跨市场的人民币加权共识,每天更新,没有数量,`changed_at` 与 `fresh_at` 为其计算时间,详情见 `valuation`。它是估算值,不是任何人都能成交的报价。"
      },
      "provider_code": {
        "type": "string",
        "title": "Provider Code",
        "description": "采集该报价的数据来源代码。数据直接来自该市场时等于 `market_code`;否则为报告该市场价格的聚合平台。"
      },
      "side": {
        "type": "string",
        "enum": [
          "ask",
          "bid",
          "mid"
        ],
        "title": "Side",
        "description": "`ask` 表示在售挂单报价,`bid` 表示求购订单报价,`mid` 表示 `CSCP` 估值(在售共识与求购共识的中间价)。"
      },
      "market_currency_code": {
        "type": "string",
        "title": "Market Currency Code",
        "description": "`market_price_amount` 的货币,例如 `CNY`。价格以该市场自身的货币返回,不做换算。"
      },
      "market_price_amount": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "Market Price Amount",
        "description": "以 `market_currency_code` 计的价格,为十进制字符串(普通记数法,去除末尾的零,从不使用科学记数法);来源未报告价格时为 `null`。已下架的报价保留最后已知的价格。"
      },
      "quantity": {
        "anyOf": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "title": "Quantity",
        "description": "来源报告的市场该方向上的数量;未报告时为 `null`。饰品下架后为 `0`。"
      },
      "is_quantity_minimum": {
        "anyOf": [
          {
            "type": "boolean"
          },
          {
            "type": "null"
          }
        ],
        "title": "Is Quantity Minimum",
        "description": "`quantity` 为下限时为 `true`(来源只报告“至少”这么多);未知时为 `null`。"
      },
      "is_all_items_same_price": {
        "anyOf": [
          {
            "type": "boolean"
          },
          {
            "type": "null"
          }
        ],
        "title": "Is All Items Same Price",
        "description": "所有在售单件的价格都等于 `market_price_amount` 时为 `true`;来源只报告最低价或各件价格不同时为 `false`;未知时为 `null`。"
      },
      "changed_at": {
        "type": "string",
        "title": "Changed At",
        "description": "该报价的价格或数量在来源处最后一次变化的时间,采用 RFC 3339 UTC 格式(例如 `2026-09-24T03:12:08Z`)。"
      },
      "observed_at": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "Observed At",
        "description": "该报价最后一次在来源处被单独观测到的时间,采用 RFC 3339 UTC 格式;未记录时为 `null`。"
      },
      "delisted_at": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "Delisted At",
        "description": "发现该饰品在市场该方向上已不再挂出的时间,采用 RFC 3339 UTC 格式;仍在挂出时为 `null`。已下架的报价保留最后的价格,`quantity` 为 `0`。"
      },
      "fresh_at": {
        "type": "string",
        "title": "Fresh At",
        "description": "来源最后一次确认该报价仍为当前值的时间,采用 RFC 3339 UTC 格式:取 `changed_at`、`observed_at` 与该市场最近一次完整扫描完成时间中的最晚者。"
      },
      "valuation": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/ValuationOut"
          },
          {
            "type": "null"
          }
        ],
        "description": "估值详情,仅出现在 `CSCP` 报价上;所有市场报价上均为 `null`。"
      }
    },
    "type": "object",
    "required": [
      "market_code",
      "provider_code",
      "side",
      "market_currency_code",
      "market_price_amount",
      "quantity",
      "is_quantity_minimum",
      "is_all_items_same_price",
      "changed_at",
      "observed_at",
      "delisted_at",
      "fresh_at",
      "valuation"
    ],
    "title": "MarketQuoteOut",
    "description": "单个市场对某个饰品在某一方向上的报价。"
  },
  "Meta": {
    "properties": {
      "request_id": {
        "type": "string",
        "title": "Request Id",
        "description": "本次请求的唯一标识符,与响应头 `X-Request-ID` 相同。联系支持时请提供。"
      },
      "billable": {
        "anyOf": [
          {
            "type": "boolean"
          },
          {
            "type": "null"
          }
        ],
        "title": "Billable",
        "description": "该请求是否以点数计费。仅出现在计量端点上;`false` 表示该请求免费,例如因为它本身不收费,或已被你的订阅覆盖。"
      },
      "credit": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/CreditMeta"
          },
          {
            "type": "null"
          }
        ],
        "description": "本次请求的费用和你的预估剩余余额。仅在 `billable` 为 `true` 时出现。"
      }
    },
    "type": "object",
    "required": [
      "request_id"
    ],
    "title": "Meta",
    "description": "每个带信封的响应中都包含的请求元数据。"
  },
  "ValuationOut": {
    "properties": {
      "valuation_date": {
        "type": "string",
        "title": "Valuation Date",
        "description": "估值的 UTC 日期(`YYYY-MM-DD`)。每天计算一次,依据该日期之前七天的每日收盘报价。"
      },
      "credibility": {
        "type": "number",
        "title": "Credibility",
        "description": "0 到 1 之间的置信度分数,等于 `e^(-uncertainty)`;越接近 1,各来源越一致。依赖该估值之前请自行设定阈值。"
      },
      "uncertainty": {
        "type": "number",
        "title": "Uncertainty",
        "description": "估值在对数尺度上的标准不确定度(0 或以上)。约 68% 的合理取值落在 价格 × `e^(-uncertainty)` 与 价格 × `e^(uncertainty)` 之间。"
      },
      "is_two_sided": {
        "type": "boolean",
        "title": "Is Two Sided",
        "description": "在售挂单与求购订单都参与计算时为 `true`。为 `false` 时只有在售挂单可用,估值为在售共识减去同类饰品的典型半价差。"
      },
      "ask_amount": {
        "type": "string",
        "title": "Ask Amount",
        "description": "各市场在售挂单的加权共识,按人民币现金买入成本计(含费用),为十进制字符串。"
      },
      "bid_amount": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "Bid Amount",
        "description": "各市场求购订单的加权共识,按扣除费用后到手的人民币现金计,为十进制字符串;价格高于该市场在售挂单的求购订单已被剔除。`is_two_sided` 为 `false` 时为 `null`。"
      },
      "ask_quote_count": {
        "type": "integer",
        "title": "Ask Quote Count",
        "description": "`ask_amount` 中在售挂单来源的数量。"
      },
      "bid_quote_count": {
        "type": "integer",
        "title": "Bid Quote Count",
        "description": "`bid_amount` 中求购订单来源的数量。"
      }
    },
    "type": "object",
    "required": [
      "valuation_date",
      "credibility",
      "uncertainty",
      "is_two_sided",
      "ask_amount",
      "bid_amount",
      "ask_quote_count",
      "bid_quote_count"
    ],
    "title": "ValuationOut",
    "description": "饰品的 CSCP 公允价值详情,取自最新一日的估值。"
  }
}

下载公开 OpenAPI schema