Reputation: 71
I'm trying to get a data from steam market from this plot:
I'm trying to get this data using this url
http://steamcommunity.com/market/pricehistory/?appid=730&market_hash_name=AK-47%20%7C%20Frontside%20Misty%20%28Field-Tested%29
According to economy.js file from steam market page
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 ); }
} );
But when try to open http://steamcommunity.com/market/pricehistory/?appid=730&market_hash_name=AK-47%20%7C%20Frontside%20Misty%20%28Field-Tested%29
in my browser i always get empty [] result.
On the other hand, when I'm logged in my account in browser, the result is not empty and everything is fine. But this plot is always available at the http://steamcommunity.com/market/listings/730/AK-47%20%7C%20Frontside%20Misty%20%28Field-Tested%29 page for me and it does not matter i'm in my account or not.
How to get this data properly and without auth?
Upvotes: 0
Views: 1743
Reputation: 682
I've been working on an API that gives you as much data as possible from the CSGO market sales. I'm tracking 6,269 items with ~1,028,619,499 successful sales worth ~$1,155,921,513.
One endpoint that could be used for those graph values is http://csgolyzer.com/api/history/{market_hash_name}?key={your_api_key}
This returns this response:
[
{
median_price: "0.34",
sold_at: "2015-12-20 01:00:00"
},
{
median_price: "0.32",
sold_at: "2015-12-21 01:00:00"
},
...
]
The API docs are available here: http://csgolyzer.com/docs
There are also other endpoints for more data about Market Sales and the API rates are better than querying Steam yourself.
Upvotes: 1