Steamworks Documentation
GetAssetPrices/v0001
This returns prices and categories for items that users are able to purchase. If any class filters are specified, results should be filtered where any of the items returned contain at least one of the specified key/value pairs. For example, if two filters def_index/40 and def_index/50 are specified, only results for items that have the def_index class property set to 40 or 50 should be returned.

Called by: Web Purchasing

HTTP Method: GET

Parameters:

NameTypeRequiredDescription
keystringThis is the "Asset Server Key" that you provided in your app's Steam Economy Settings on the partner site.
appiduint3232bit App ID of the application associated with the assets.
languagestringISO639-1 language code plus ISO 3166-1 alpha 2 country code of the language to return results in. Some examples include en_US, de_DE, zh_CN, and ko_KR. Default: none
currencystringAn optional ISO 4217 currency code. If specified, only prices for this currency need to be returned.
class_countuint32The number of class identifiers specified for filtering.
class_name#stringThe name of the identifier to filter on. There will be one of these parameters for for each number between 0 and class_count-1. (e.g. class_name0, class_name1, class_name2)
class_value#stringThe value of the identifier to filter on. There will be one of these parameters for for each number between 0 and class_count-1. (e.g. class_value0, class_value1, class_value2)

Returns

The output from this method should be encoded in the JSON format.

Response:
  • result
    • success - True if the method was successful. If the asset server is returning false, it should set error to a string that explains why.
    • error - a string describing why this call failed. This message will be recorded in the error log, which is available under the Economy tab on the Steamworks site.
    • assets - an array of assets that can be purchased.
      • name - The name of the asset. This is the name that will be passed into StartWebAssetTransaction/v0001.
      • prices - Contains a child element for each of the supported currencies unless a currency filter was specified, in which case a price for only that currency should be included. Each child key should be the ISO 4217 currency code and the value should be reported as an unsigned integer. See Supported Currencies for more information on how to report this value.
      • original_prices - If this item is on sale, this contains the non-sale prices for the item in the same fashion as prices. This should be omitted if the item is not on sale.
      • class - An array of game-defined asset class identifiers. See GetContextContents/v0001 for details on the format these class identifiers should take.
      • tags - An array of tags or categories that apply to the item. See the example output for more information. The tags array underneath result contains the localized display name for each tag.
    • tags - Contains a child element for each of the supported tags, regardless of any specified filters. The values should be localized text if the language parameter was specified or a localization token or other identifier if no language was specified.

Example Output

The output below is an example for a request with parameters:
language=english&class_count=3&class_name0=def_index&class_value0=5021&class_name1=def_index&class_value1=58&class_name2=def_index&class_value2=647
{ "result": { "success": true "assets": [ { "name": "5021", "prices": { "USD": 249, "GBP": 199, "EUR": 199, "RUB": 7400 }, "class": [ { "name": "def_index", "value": "5021" } ] , "tags": [ "Tools" ] }, { "name": "58", "prices": { "USD": 74, "GBP": 44, "EUR": 55, "RUB": 2250 }, "original_prices": { "USD": 99, "GBP": 59, "EUR": 74, "RUB": 3000 }, "class": [ { "name": "def_index", "value": "58" } ] , "tags": [ "Weapons" ] }, { "name": "647", "prices": { "USD": 749, "GBP": 499, "EUR": 549, "RUB": 22400 }, "class": [ { "name": "def_index", "value": "647" } ] , "tags": [ "New", "Misc" ] } ] , "tags": { "Headgear": "Hats", "Misc": "Misc", "Weapons": "Weapons", "Tools": "Tools", "Collections": "Collections", "Bundles": "Bundles", "Maps": "Maps", "New": "New Releases" }, } }