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"
"¤cy={currency}"
"&start={start}")
From what I understand:
category_730_Type%5B%5D=tag_CSGO_Type_WeaponCase
is to choose CS:GO cratesnorender=1
is to not get htmlcount=100
- results per pagesort_column=name&sort_dir=asc
for orderingcurrency=3
choose euro as currency <-- doesn't workstart=100
start at result 100But 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!
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¤cy=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.