7

Im trying to get an item page on market in certain currency, tried to add

Accept-Language: ru-RU\r\n

and

Accept-Language: ru-RU, ru\r\n

and

Accept-Language: ru, ru-RU;q=0.8\r\n

to header but steam ignores it and always gives a page with mixed rubles, euros and dollars.

Also, how can i get a page in xml format? ?format=xml and ?xml=1 dont work, tried with application/xml and */*

Andy
  • 49,085
  • 60
  • 166
  • 233
user3392623
  • 73
  • 1
  • 1
  • 5
  • What is the URL you are attempting to get this information from? – Andy Mar 24 '14 at 20:06
  • http://steamcommunity.com/market/listings/appid/itemname – user3392623 Mar 24 '14 at 20:37
  • 1
    What makes you believe the server is capable of providing the data in the format you want, and it's just a matter of finding the right incantation? It's not like every server in the world speaks XML when asked nicely enough. – Igor Tandetnik Mar 24 '14 at 22:18

3 Answers3

6

Recently Valve added market prices on inventory page when inspecting an item. The price is loaded through AJAX, and through inspecting network requests I found this:

http://steamcommunity.com/market/priceoverview/?country=US&currency=3&appid=730&market_hash_name=AWP%20|%20Electric%20Hive%20(Factory%20New)

You can force currency with this (currency 3 is EUR), returns lowest price on market and median price, JSON format.

ncla
  • 803
  • 9
  • 22
  • Hi, it shows Euro when I put currency as 3, did any update/change happened? – Sid Oct 13 '14 at 19:52
  • 1
    @Sid ups, I messed up, currency 1 is USD, currency 3 is EUR. :) – ncla Oct 14 '14 at 13:54
  • 1
    I figured as much by trial and error. Thank you for this, I can easily get the median. Did you saw this from a document site anywhere? – Sid Oct 14 '14 at 14:42
6

If someone still needs this: http://steamcommunity.com/market/search/render/?start=0&count=10&l=english&currency=5&q=&category_730_ItemSet%5B%5D=any&category_730_TournamentTeam%5B%5D=any&category_730_Weapon%5B%5D=tag_weapon_ak47&category_730_Exterior%5B%5D=tag_WearCategory0&category_730_Quality%5B%5D=tag_strange&appid=730

l param (Language): english, russian, french, etc.

count is how much results to display

start is starting result (start=10&count=10 is 2nd page with 10 results)

currency: 5 = ruble, 3 = USD. There are many others.

http://steamcommunity.com/market/listings/730/StatTrak%E2%84%A2%20AK-47%20%7C%20Blue%20Laminate%20%28Factory%20New%29/render?start=0&count=5&currency=5&language=english

Alex Hide
  • 555
  • 5
  • 18
  • Thank, Alex Hide, this is exactly what I am looking for. – Daniel Oct 23 '14 at 11:44
  • Do you know if this works with URLs "by name" ? Ex: http://steamcommunity.com/market/listings/440/Strange%20Concheror It seems not, to me, but maybe there are tricks. – Gnurfos Dec 04 '14 at 16:32
  • 1
    @Gnurfos http://steamcommunity.com/market/listings/440/Strange%20Concheror/render/?query=&start=10&count=10&country=UK&language=english&currency=3 this maybe – Alex Hide Dec 05 '14 at 00:14
  • Hum it seems to return something, but I cannot make sense of the results, nor make currency vary apparently. Are currencies (or other parameters) documented somewhere ? (there seems to be a currency_id in output, different from the parameter too). Where do you find these URLs too ? Thanks – Gnurfos Dec 05 '14 at 12:28
  • 1
    @Gnurfos, Open steam market, open Developer console in browser or any http sniffer and change market page (ex. from 1 -> 2). You will see http get request. – Alex Hide Dec 06 '14 at 01:41
  • I did that, but it doesn't seem to behave the same way by "scripting" as when I'm logged in. I get listings in mixed currencies whatever the currency parameter (just as in the original question or comments to the accepted answer). It must be reading only cookies, not parameters (or worse: session data, because there's not that many cookies). – Gnurfos Dec 06 '14 at 10:13
  • 1
    @Gnurfos I think what you need is converted_price + converted_fee params. It works well for me even if I clean my cookies. – Alex Hide Dec 06 '14 at 19:38
  • The first link does not work at all. When I go to the link with my logged in account, I just get my default currecy, and when I go to hte link without being logged in I always get USD, even if I change the currency integer. – Saif Bechan Jan 09 '15 at 00:22
  • @SaifBechan Both works fine for me (latest Chrome, incognito tab). – Alex Hide Jan 23 '15 at 21:15
  • Could you add a screenshot of getting different currency outputs using the first link. Maybe euro, usd, and rubbles. In incognito tab I always get USD currency as JSON output, and im from Europe. – Saif Bechan Jan 24 '15 at 14:09
4

Sellers will always list items for sale in the native currency of their Steam Wallet, and buyers will always see Community Market prices expressed in the native currency of their Steam Wallet. For items listed for sale in a different currency than the buyer's Steam Wallet currency, we apply an exchange rate which we update daily.
- Community Market FAQ

Meaning, if you are looking at the market from a browser you are logged in on and you have funds in your wallet that are not in Rubles, you won't see Rubles.

You can, however, get around this. If you log out of the market and visit your URL, there are two parameters you can pass for force language and region changes.

For example, using the ever popular Supply Crate Key: http://steamcommunity.com/market/listings/440/Mann%20Co.%20Supply%20Crate%20Key?l=russian&cc=ru

Notice the l and cc parameters. The l is setting the language to Russian and the cc is setting the region to Russia.

Now, this doesn't appear to work on the entire page. The graph showing historical trends still appears to be in USD, even though the surrounding text is in Russian.

USD Graph

But, the individual listings of items did, in fact, change currencies. Listings

Andy
  • 49,085
  • 60
  • 166
  • 233
  • I know about the parameters, tried to use ut many times but it doesnt work: http://hkar.ru/r2a8 http://hkar.ru/r2a9 Anyway, thanks for the answer – user3392623 Mar 25 '14 at 14:42
  • I just tried this and while the language change worked, the currency change did not seem to be applied. – wonton May 06 '14 at 08:04
  • Same here. Language changes but listings currencies don't. Any idea how to enforce one currency (whatever it is) for all items without being logged in? – Krzysztof Wolny May 23 '14 at 20:46