【问题标题】:Retrieve item's price history on Steam market在 Steam 市场上检索物品的价格历史记录
【发布时间】:2015-01-21 02:12:44
【问题描述】:

关于 Steam 市场中的物品,我想知道是否有办法检索物品在一段时间内的价格历史记录。

我知道 Steam 为想要将市场特定数据集成到他们自己的网站的开发人员提供了一个特殊的 api,但我无法找到任何有关以 json 形式检索商品价格历史记录的信息。

你们中有人已经这样做了吗?

【问题讨论】:

    标签: json steam steam-web-api


    【解决方案1】:

    我进行了更多研究,并找到了检索商品价格历史记录的方法。

    作为好奇的例子,这个随机物品“Specialized Killstreak Brass Beast”的价格历史可以这样检索:

    http://steamcommunity.com/market/pricehistory/?country=DE&currency=3&appid=440&market_hash_name=Specialized%20Killstreak%20Brass%20Beast

    【讨论】:

    • 对于这个API 响应我无法从PHP 调用,我必须登录到浏览器然后我才能得到响应,否则它只给我[] 作为响应。
    【解决方案2】:

    如果从代码调用

    url ="http://steamcommunity.com/market/pricehistory/"
    

    查询字符串有效载荷为:

    {
        "country" = "US",      # two letter ISO country code
        "currency"= 1,       # 1 is USD, 3 is EUR, not sure what others are  
        "appid"   = 753,     # this is the application id.  753 is for steam cards  
        "market_hash_name"  ="322330-Shadows and Hexes" # this is the name of the item in the steam market.  
    }
    

    国家代码是ISO Country Code

    您可以从游戏商店页面的 URL 中找到游戏的应用 ID。示例:游戏《CS:GO》的app id是730。Store page

    您可以从市场页面的 URL 中找到市场哈希名称。示例:This CS:GO item 哈希名称为“Glove Case Key”。

    手套箱钥匙的历史价格是here

    【讨论】:

    • 对于这个 API 响应,我无法从 PHP 调用,我必须登录到浏览器然后才能获得响应,否则它只会给我 [] 作为响应。
    猜你喜欢
    • 2015-11-04
    • 2015-10-08
    • 2021-04-23
    • 2017-09-09
    • 1970-01-01
    • 2016-03-12
    • 2021-01-26
    • 2014-05-28
    相关资源
    最近更新 更多