【问题标题】:Getting CS:GO Market Price history获取 CS:GO 市场价格历史
【发布时间】:2016-06-30 04:52:38
【问题描述】:

我正在尝试从这个情节中获取蒸汽市场的数据:

我正在尝试使用此网址获取此数据

http://steamcommunity.com/market/pricehistory/?appid=730&market_hash_name=AK-47%20%7C%20Frontside%20Misty%20%28Field-Tested%29

根据 Steam 市场页面中的 Economy.js 文件

new Ajax.Request( 'http://steamcommunity.com/market/pricehistory/', {
        method: 'get',
        parameters: {
            appid: this.m_item.appid,
            market_hash_name: GetMarketHashName( this.m_item )
        },
        onSuccess: function( transport ) { SellItemDialog.OnPriceHistorySuccess( transport ); },
        onFailure: function( transport ) { SellItemDialog.OnPriceHistoryFailure( transport ); }
} );

但是当尝试在我的浏览器中打开 http://steamcommunity.com/market/pricehistory/?appid=730&market_hash_name=AK-47%20%7C%20Frontside%20Misty%20%28Field-Tested%29 时,我总是得到空 [] 结果。

另一方面,当我在浏览器中登录我的帐户时,结果不是空的,一切都很好。 但是这个情节总是可以在我的http://steamcommunity.com/market/listings/730/AK-47%20%7C%20Frontside%20Misty%20%28Field-Tested%29页面上找到,不管我是否在我的帐户中。

如何在不经过身份验证的情况下正确获取这些数据?

【问题讨论】:

标签: json ajax steam


【解决方案1】:

只需从市场列表页面中抓取历史记录。

【讨论】:

    【解决方案2】:

    我一直在开发一种 API,可以为您提供尽可能多的 CSGO 市场销售数据。我正在跟踪 6,269 件商品,其中 ~1,028,619,499 个成功销售,价值 ~1,155,921,513 美元

    可用于这些图形值的一个端点是http://csgolyzer.com/api/history/{market_hash_name}?key={your_api_key}

    这会返回这个响应:

    [
        {
            median_price: "0.34",
            sold_at: "2015-12-20 01:00:00"
        },
        {
            median_price: "0.32",
            sold_at: "2015-12-21 01:00:00"
        },
        ...
    ]
    

    API 文档可在此处获得:http://csgolyzer.com/docs

    还有其他端点可以获取有关市场销售的更多数据,并且 API 费率比自己查询 Steam 更好。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-11-04
      • 2015-01-21
      • 2011-03-23
      • 2016-02-06
      • 2016-03-12
      • 2021-04-23
      • 2022-10-23
      • 1970-01-01
      相关资源
      最近更新 更多