Search code examples
getcurrencyurl-parametersisosteam-web-api

What standard is the currency parameter


When I wanted to get the median price of an item on the steam market I came across this answer. It gets the lowest and median price of an item. The one thing I had trouble understanding which currency number corresponds with what currency and if so, which industry standard is used here.

This is an example URL:

https://steamcommunity.com/market/priceoverview/?appid=730&currency=3&market_hash_name=Tec-9%20%7C%20VariCamo%20(Minimal%20Wear)

In the documentation it says it is ISO 4217:

An optional ISO 4217 currency code. If specified, only prices for this currency need to be

But that's clearly not the case.

  • When I put in 1 as the currency parameter, I get dollar.
  • With 2 I get pounds.
  • And with 3 it responds with euro.
  • ...
  • The max seems to be 41 with the Uruguayan Peso

  • Solution

  • All actual currency codes and other respective information about currencies on Steam can be found in global.js on https://steamcommunity.com/market/. Just open this page. Then open developer console and search for g_rgCurrencyData variable like on image below.

    Location of g_rgCurrencyData variable

    Besides codes there are info about formatting for each currency which is useful when you need to parse data from page or automate some actions.