Skip to main content
Module

x/steam_trader/mod.ts>EconItem

https://deno.land/x/steam_trader
Latest
class EconItem
Re-export
import { EconItem } from "https://deno.land/x/steam_trader@v0.4.0/mod.ts";

In order to uniquely identify an item, You need It's App ID, It's context ID, and It's Asset ID.

Asset IDs are not unique globally. Only guaranteed to be unique inside of a given AppID+ContextID combination.

Constructors

new
EconItem(item: SteamEconItem)

Properties

optional
actions: Array<EconItemAction>
amount: number

Value for unstackable items is always 1. Stacked items always have the same asset ID.

appid: number
optional
assetid: string

not available if is_currency is true

optional
background_color: string

defaults to empty string if unavailable

optional
cache_expiration: string

RFC 3339 UTC formatted time that Steam's cache of the response should be invalidated. This will be useful, for example, if the item becomes tradable at a later time.

optional
classid: string

A classid "owns" an instanceid. classid is all you need to get a general overview of an item. instanceid is for getting the finer details.

optional
commodity: boolean

true if, on the Steam Community Market, this item will use buy orders. false if not.

optional
contextid: string
optional
currencyid: string | number
optional
descriptions: Array<EconItemDescription>
fraudwarnings: Array<string>
optional
icon_url: string
optional
icon_url_large: string
optional
instanceid: string

Only usable when classid is available. instanceid allows you to get finer details such as how many kills are on a strange/StatTrak weapon, or custom names/descriptions.

is_currency: boolean
optional
item_expiration: string

RFC 3339 UTC formatted time of when the item can no longer be used. Any Market listings will not be purchasable after this time and will be automatically canceled.

optional
market_fee_app: number
optional
market_hash_name: string

this name is the one used in url of market item's page. it may contain appid in the beginning. hash names should be unique inside one appid (and context id), but not necessarilly globally.

optional
market_marketable_restriction: number

How many days for which the item will be unmarketable after being sold on the market.

optional
market_name: string

this name which is shown when item is up for sale. may contain detail such as wear.

optional
market_tradable_restriction: number

How many days for which the item will be untradable after being sold on the market.

optional
marketable: boolean

true if the item can be listed on the Steam Community Market, false if not.

optional
name: string

this name can be localized. it usually does not contain details such as CS:GO skin wear.

optional
tags: Array<EconItemTag>

An array of objects containing the item's inventory tags.

optional
tradable: boolean

true if the item can be traded, false if not.

optional
type: string

The "type" that's shown under the game name to the right of the game icon.

Methods

Returns item image url.

Returns large version of item image url, fallbacks to normal image if unavailable

getTag(category: string)

Returns a specific tag from the item, or null if it doesn't exist

Static Methods

from(offerItem: OfferItem, options?: FromOfferItemOptions)

throws error if getting descriptions and api is unavailable

fromAssetsWithDescriptions(assets: Array<OfferItem>, descriptions: Array<SteamEconItem>): EconItem[]
fromList(offerItemList: Array<OfferItem>, options?: FromOfferItemOptions): Promise<EconItem[]>

throws error if getting descriptions and api is unavailable or response is malformed