Global

Members


<constant> API_BASE_URL

Constants for Warframe Market API v2
Source:

Methods


attachmentFromComponents(components, query [, platform])

Build an attachment from the provided components
Parameters:
Name Type Argument Default Description
components Array.<MarketComponent> collected array of components with market data
query string Search query that these components match
platform string <optional>
'pc' Platform for the request, defaults to 'pc'
Source:
Returns:
Discord-ready attachment describing the item
Type
Object

calculateMedian(sortedPrices)

Calculate median of sorted array
Parameters:
Name Type Description
sortedPrices Array.<number> Sorted price array
Source:
Returns:
Type
number

calculatePercentile(sortedPrices, percentile)

Calculate percentile of sorted array
Parameters:
Name Type Description
sortedPrices Array.<number> Sorted price array
percentile number Percentile (0-100)
Source:
Returns:
Type
number

calculateStatistics(orders, options)

Calculate statistics from orders
Parameters:
Name Type Description
orders Array.<Order> Orders array
options Object Calculation options
Source:
Returns:
Statistics
Type
Object

calculateStatistics(orders, options)

Calculate statistics from order list
Parameters:
Name Type Description
orders Array.<Order> Array of orders
options Object Calculation options
Properties
Name Type Argument Default Description
type string <optional>
'sell' Order type ('buy' or 'sell')
onlineOnly boolean <optional>
true Only include online users
includeOutliers boolean <optional>
true Include price outliers
Source:
Returns:
Statistics object
Type
Object

<async> checkVersions()

Check API versions
Source:
Returns:
Type
Promise.<Object>

<async> checkVersions()

Check versions from server
Source:
Returns:
Type
Promise.<Object>

clear()

Clear entire cache
Source:

clearCache()

Clear all caches
Source:

delete(key)

Delete specific key from cache
Parameters:
Name Type Description
key string Cache key
Source:

extractLocalized(i18n, locale)

Extract localized data from i18n object
Parameters:
Name Type Description
i18n Object i18n object
locale string Preferred locale
Source:
Returns:
Localized data
Type
Object

<async> fetchWithTimeout(url, options, timeout)

Make HTTP request with timeout
Parameters:
Name Type Description
url string URL to fetch
options Object Fetch options
timeout number Timeout in milliseconds
Source:
Returns:
Type
Promise.<Response>

fieldValue(mComponent)

Build a field from provided nexus & market components (v1)
Parameters:
Name Type Description
mComponent MarketComponent market component
Source:
Returns:
built field
Type
Object

fieldValueV2(mComponent)

Build a field from v2 market component with trader info
Parameters:
Name Type Description
mComponent MarketComponent market component (v2)
Source:
Returns:
built field
Type
Object

formatPriceRange(stats)

Format price range string
Parameters:
Name Type Description
stats Object Statistics object
Source:
Returns:
Type
string

formatPriceRange(stats)

Format price range string
Parameters:
Name Type Description
stats Object Statistics object
Source:
Returns:
Type
string

formatStatistics(stats, type)

Format statistics for display
Parameters:
Name Type Description
stats Object Statistics object
type string Order type
Source:
Returns:
Type
string

formatStatistics(stats, type)

Format statistics for display
Parameters:
Name Type Description
stats Object Statistics object
type string Order type ('buy' or 'sell')
Source:
Returns:
Type
string

<async> get(key, collection, fetchFn)

Get item from cache or fetch it
Parameters:
Name Type Description
key string Cache key
collection string Collection name (items, rivens, etc.)
fetchFn function Function to fetch data if cache miss
Source:
Returns:
Type
Promise.<*>

<async> get(path, options)

Make GET request
Parameters:
Name Type Description
path string API path
options Object Request options
Properties
Name Type Argument Description
platform string <optional>
Platform header
locale string <optional>
Language header
query Object <optional>
Query parameters
Source:
Returns:
Type
Promise.<Object>

getAgeHours()

Get order age in hours
Source:
Returns:
Type
number

<async> getAllOrders(slug, platform)

Get all orders for an item
Parameters:
Name Type Description
slug string Item slug
platform string Platform (pc, ps4, xbox, switch)
Source:
Returns:
Type
Promise.<Array.<Order>>

getBestOrders(orders, options)

Get best orders (sorted)
Parameters:
Name Type Description
orders Array.<Order> Orders array
options Object Options
Source:
Returns:
Type
Object

getBestOrders(orders, options)

Get best orders (lowest sell / highest buy)
Parameters:
Name Type Description
orders Array.<Order> Array of orders
options Object Options
Properties
Name Type Argument Default Description
limit number <optional>
5 Number of orders to return
onlineOnly boolean <optional>
true Only online users
Source:
Returns:
{ buy: Order[], sell: Order[] }
Type
Object

getIconUrl( [baseUrl])

Get full icon URL
Parameters:
Name Type Argument Default Description
baseUrl string <optional>
'https://warframe.market/static/assets/' Base URL for assets
Source:
Returns:
Type
string

<async> getItemBySlug(slug)

Get item by slug
Parameters:
Name Type Description
slug string Item slug
Source:
Returns:
Type
Promise.<Item>

<async> getItemSet(slug)

Get all items in a set
Parameters:
Name Type Description
slug string Item slug
Source:
Returns:
Type
Promise.<{id: string, items: Array.<Item>}>

<async> getItems()

Get list of all tradable items
Source:
Returns:
Type
Promise.<Array.<Item>>

getLocalized(field [, lang])

Get localized field
Parameters:
Name Type Argument Description
field string Field name
lang string <optional>
Language code (defaults to instance locale)
Source:
Returns:
Localized value
Type
*

getLocalizedField(i18n, field, locale, defaultValue)

Get field from i18n object with fallback
Parameters:
Name Type Description
i18n Object i18n object
field string Field name
locale string Preferred locale
defaultValue * Default value if not found
Source:
Returns:
Type
*

getOnlineBuyers(limit)

Get best online buyers
Parameters:
Name Type Default Description
limit number 5 Number of buyers to return
Source:
Returns:
Type
Array.<{ingameName: string, platinum: number, quantity: number, status: string, activity: string}>

getOnlineSellers(limit)

Get best online sellers
Parameters:
Name Type Default Description
limit number 5 Number of sellers to return
Source:
Returns:
Type
Array.<{ingameName: string, platinum: number, quantity: number, status: string, activity: string}>

<async> getRecentOrders(platform)

Get recent orders (last 4 hours)
Parameters:
Name Type Description
platform string Platform (pc, ps4, xbox, switch)
Source:
Returns:
Type
Promise.<Array.<Order>>

getThumbUrl( [baseUrl])

Get full thumbnail URL
Parameters:
Name Type Argument Default Description
baseUrl string <optional>
'https://warframe.market/static/assets/' Base URL for assets
Source:
Returns:
Type
string

<async> getTopOrders(slug, options)

Get top orders for an item (RECOMMENDED for price checks)
Parameters:
Name Type Description
slug string Item slug
options Object Options
Properties
Name Type Argument Description
platform string Platform (pc, ps4, xbox, switch)
rank number <optional>
Filter by rank
rankLt number <optional>
Filter by rank less than
charges number <optional>
Filter by charges
chargesLt number <optional>
Filter by charges less than
amberStars number <optional>
Filter by amber stars
amberStarsLt number <optional>
Filter by amber stars less than
cyanStars number <optional>
Filter by cyan stars
cyanStarsLt number <optional>
Filter by cyan stars less than
subtype string <optional>
Filter by subtype
Source:
Returns:
Type
Promise.<{buy: Array.<Order>, sell: Array.<Order>}>

has(key)

Check if key exists in cache (and is valid)
Parameters:
Name Type Description
key string Cache key
Source:
Returns:
Type
boolean

isBuyOrder()

Check if order is buy type
Source:
Returns:
Type
boolean

isPartOfSet()

Check if item is part of a set
Source:
Returns:
Type
boolean

isSellOrder()

Check if order is sell type
Source:
Returns:
Type
boolean

isUserOnline()

Check if order is from an online user
Source:
Returns:
Type
boolean

isVaulted()

Check if item is vaulted
Source:
Returns:
Type
boolean

lookupAlias(platformAlias, market)

Look up real platform for platform alias
Parameters:
Name Type Default Description
platformAlias string Alias of platform
market boolean false Whether or not to use market-specific aliases
Source:
Returns:
Real platform identifier
Type
string

normalizeLanguage(lang)

Normalize language code
Parameters:
Name Type Description
lang string Language code
Source:
Returns:
Normalized language code
Type
string

normalizePlatform(platform)

Normalize platform
Parameters:
Name Type Description
platform string Platform alias
Source:
Returns:
Normalized platform
Type
string

pad(str, length, character)

Padding helper (v1 compatibility)
Parameters:
Name Type Default Description
str string String to pad
length number 10 Target length
character string Padding character
Source:
Returns:
Type
string

<async> post(path, body, options)

Make POST request
Parameters:
Name Type Description
path string API path
body Object Request body
options Object Request options
Source:
Returns:
Type
Promise.<Object>

<async> priceCheckQuery(query, platform)

Price check query (v1 compatibility method)
Parameters:
Name Type Description
query string Search query
platform string Platform
Source:
Returns:
Type
Promise.<Object>

<async> queryMarket(query, options)

Query market for item (v1 compatibility method)
Parameters:
Name Type Description
query string Search query
options Object Query options
Properties
Name Type Argument Description
platform string Platform
successfulQuery function <optional>
Callback on success
Source:
Returns:
Type
Promise.<Array.<Summary>>

<async> refresh(key, collection, fetchFn)

Refresh cache entry
Parameters:
Name Type Description
key string Cache key
collection string Collection name
fetchFn function Function to fetch fresh data
Source:
Returns:
Type
Promise.<*>

removeOutliers(sortedPrices)

Remove outliers using IQR method
Parameters:
Name Type Description
sortedPrices Array.<number> Sorted price array
Source:
Returns:
Type
Array.<number>

safeRange(value1, value2)

Calculate the safe value for a provided value
Parameters:
Name Type Description
value1 string provided minimum value
value2 string provided maximum value
Source:
Returns:
safe value
Type
string

safeValue(value)

Calculate the safe value for a provided value
Parameters:
Name Type Description
value string provided value
Source:
Returns:
safe value
Type
string

set(key, value [, collection])

Set item in cache
Parameters:
Name Type Argument Description
key string Cache key
value * Value to cache
collection string <optional>
Collection name for version tracking
Source:

setLocale(locale)

Set locale
Parameters:
Name Type Description
locale string Language code
Source:

setLocale(locale)

Set default locale
Parameters:
Name Type Description
locale string Language code
Source:

setTimeout(timeout)

Set timeout
Parameters:
Name Type Description
timeout number Timeout in milliseconds
Source:

<async> shouldRefresh(collection)

Check if collection should be refreshed
Parameters:
Name Type Description
collection string Collection name
Source:
Returns:
Type
Promise.<boolean>

size()

Get cache size
Source:
Returns:
Type
number

stop()

Stop and cleanup (clears all caches)
Source:

toJSON()

Convert to JSON
Source:
Returns:
Type
Object

toJSON()

Convert to JSON
Source:
Returns:
Type
Object

toString()

Convert to string representation
Source:
Returns:
Type
string

toString()

Convert to string representation
Source:
Returns:
Type
string

toString(opt)

String representation (v1 compatible)
Parameters:
Name Type Default Description
opt string item Option: 'codex', 'item', 'location', 'all'
Source:
Returns:
Type
string