2

I use this URL to get 100 results at a time of CS:GO containers. I substitute {currency} for 3 and {start} for a multiple of 100, my problem is that currency=3 doesn't seem to be euro, it is about 17% off (I have to multiply received value by 0.83 to get a pretty good result):

market_url = ("https://steamcommunity.com/market/search/render/?"
    "category_730_Type%5B%5D=tag_CSGO_Type_WeaponCase"
    "&norender=1"
    "&count=100"
    "&sort_column=name"
    "&sort_dir=asc"
    "&currency={currency}"
    "&start={start}")

From what I understand:

  • category_730_Type%5B%5D=tag_CSGO_Type_WeaponCase is to choose CS:GO crates
  • norender=1 is to not get html
  • count=100 - results per page
  • sort_column=name&sort_dir=asc for ordering
  • currency=3 choose euro as currency <-- doesn't work
  • start=100 start at result 100

But however, I change the currency it doesn't change sell_price nor sell_price_text in response. It still prints:

(...) "sell_listings":68,"sell_price":963,"sell_price_text":"9,63€" (...) Note the €.

Do I have a typo there? Is currency even parsed on the steam part?

To be crystal clear. I would like to get the same price (in euros) as is presented on the steam market (if you have the site in euros).

EDIT: Seems impossible at the moment. If it becomes possible, please post a new answer!

Brambor
  • 604
  • 1
  • 8
  • 25
  • 1
    Do you want it to be in Euros or not? – Bijay Regmi Feb 16 '21 at 00:27
  • @JackSparrow Yes, I would like to get the results in euros. Specifically, I would like to get the same results (price in euros) you would get on steam market https://steamcommunity.com/market/search?q=&category_730_ItemSet%5B%5D=any&category_730_ProPlayer%5B%5D=any&category_730_StickerCapsule%5B%5D=any&category_730_TournamentTeam%5B%5D=any&category_730_Weapon%5B%5D=any&category_730_Type%5B%5D=tag_CSGO_Type_WeaponCase&appid=730 I edited the post to clarify, thanks! – Brambor Feb 16 '21 at 00:55
  • Be sure to include parameter `l`to be set according to language you want to be. Taking the URL you posted above in comment, I modified it to be `https://steamcommunity.com/market/search/render?q=&category_730_ItemSet%5B%5D=any&category_730_ProPlayer%5B%5D=any&category_730_StickerCapsule%5B%5D=any&category_730_TournamentTeam%5B%5D=any&category_730_Weapon%5B%5D=any&category_730_Type%5B%5D=tag_CSGO_Type_WeaponCase&appid=730&norender=1&l=english` to get all the results. – Bijay Regmi Feb 16 '21 at 12:43
  • in every search page you want, you can add `/render` to `https://steamcommunity.com/market/search` page so working URL looks like `https://steamcommunity.com/market/search/render` and you specify params like `norender=1`and `l=english` to get results in english, note that steam automatically determines locale and currency based on browser locale and shows prices automatically in that currency. – Bijay Regmi Feb 16 '21 at 12:47
  • @JackSparrow I don't really think this will get me closer to displaying the steam community market in euros though. – Brambor Feb 18 '21 at 15:05

2 Answers2

4

Get Steam Market (API) results in euro

Unfortunately, it isn't possible. The parameter you're referring to, i.e. currency only allows for specific sub-pages to be called, e.g.:

https://steamcommunity.com/market/priceoverview/?appid=730&currency=3&market_hash_name=Fracture%20Case

(looking for the price of the Fracture Case) - returns:

{"success":true,"lowest_price":"0,39€","volume":"84,984","median_price":"0,39€"}

If you change currency to be equal to 1 (being dollar):

{"success":true,"lowest_price":"$0.49","volume":"84,847","median_price":"$0.48"}

As you can clearly see, currency works perfectly fine with https://steamcommunity.com/market/priceoverview/.


Though as far as I'm aware, https://steamcommunity.com/market/search/render/? doesn't take the currency parameter as an input, i.e. the currency will ultimately be rendered as dollar (or currency=1).

What you could do is to scrape via https://steamcommunity.com/market/search/render/? and looking up the price via https://steamcommunity.com/market/priceoverview/?, though this option will yield pretty inaccurate results (priceoverview only displays a limited amount of details).


On a slight off-topic note: You can convert the price locally (with other APIs or for static currency pairs with a certain factor). Though as you specifically mentioned that you want to do it via the official price (calculating it "manually" ends up with differences, steam-related) that isn't a valid option.

J. M. Arnold
  • 6,261
  • 3
  • 20
  • 38
1

I had the exact same problem and my only solution was including my cookies to the request so steam knows my login and automatically sends prices in my default currency.

"Cookie":  
    "steamMachineAuthXXXXXXXXXXXXXXXXX=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX; "
    "Steam_Language=english; "
    "steamLoginSecure=XXXXXXXXXXXXXXXXX||XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX; "

Note: I changed the actual values to "X" for security reasons.

Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
Reddistone
  • 11
  • 1