IGetCurrencies v1 GET /api/IGetCurrencies/v1

Returns internal currency data for a given game

This API may only be called once every 120 seconds. A Retry-After header with a Unix timestamp at which another request may be made will be provided, if the request was rate limited.

The response from this API is cached globally for 300 seconds.

Documentation

Input
  • format - The response format. Default: json. Valid options: json, jsonp, vdf, pretty.
  • callback - JSONP only. Name of the function.
  • key - Your backpack.tf API key. (XXXXXXXX)
  • raw - If set to 1, adds a value_raw to the priceindex objects which represents the value of the item in the lowest currency without rounding. If a high value is set, the raw value will be an average between the low and high value. Setting raw to 2 prevents this behaviour by adding a new field, value_high_raw.
Output
  • response
    • success - 1 if successful, 0 otherwise.
    • message - If success is 0, this contains the reason for failure.
    • currencies - Currency objects.
      • Internal curency name
        • name - currency name.
        • quality - quality index of the currency.
        • priceindex - internal priceindex of the currency (see IGetPrices documentation).
        • single - plural form of the noun used in the currency's suffix
        • round - number of decimal places the price should be rounded to.
        • craftable - either "Craftable" or "Non-Craftable" to signify the currency's craftability.
        • defindex - defindex (as specified in the app's item schema) of the currency item
        • active - if 1, then this currency should be used when rounding up the currencies of an item. For example, the hat currency will have this value set to 0 because we do not want to price items in multiples of hats.
        • price - item price object (see IGetPrices documentation).
    • name - app (game)'s name.
    • url - url pointing towards the backpack.tf associated with the app.

Example Output

Input GET http://backpack.tf/api/IGetCurrencies/v1?key=XXXXXXXX
key=XXXXXXXX
Output
{
    "response": {
        "success": 1,
        "currencies": {
            "metal": {
                "name": "Refined Metal",
                "quality": 6,
                "priceindex": "0",
                "single": "ref",
                "plural": "ref",
                "round": 2,
                "blanket": 0,
                "craftable": "Craftable",
                "tradable": "Tradable",
                "defindex": 5002,
                "price": {
                    "value": 0.07,
                    "currency": "usd",
                    "difference": 0.005,
                    "last_update": 1485447639,
                    "value_high": 0.08
                }
            },
            "hat": {
                "name": "Random Craft Hat",
                "quality": 6,
                "priceindex": "0",
                "single": "hat",
                "plural": "hats",
                "round": 1,
                "blanket": 1,
                "craftable": "Craftable",
                "tradable": "Tradable",
                "defindex": -2,
                "price": {
                    "value": 1.22,
                    "currency": "metal",
                    "difference": -0.11,
                    "last_update": 1479346779
                }
            },
            "keys": {
                "name": "Mann Co. Supply Crate Key",
                "quality": 6,
                "priceindex": "0",
                "single": "key",
                "plural": "keys",
                "round": 2,
                "blanket": 0,
                "craftable": "Craftable",
                "tradable": "Tradable",
                "defindex": 5021,
                "price": {
                    "value": 26,
                    "currency": "metal",
                    "difference": -1.33,
                    "last_update": 1488163014
                }
            },
            "earbuds": {
                "name": "Earbuds",
                "quality": 6,
                "priceindex": "0",
                "single": "bud",
                "plural": "buds",
                "round": 2,
                "blanket": 0,
                "craftable": "Craftable",
                "tradable": "Tradable",
                "defindex": 143,
                "price": {
                    "value": 1.9,
                    "currency": "keys",
                    "difference": 2.6,
                    "last_update": 1488212532
                }
            }
        },
        "name": "Team Fortress 2",
        "url": "http:\/\/backpack.tf"
    }
}