
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@node-steam/market-pricing
Advanced tools
Market-Pricing is a wrapper for the unofficial Steam Market Pricing API using Typescript and Promises.
You can install Market-Pricing through the command line by using the following command:
yarn add @node-steam/market-pricing
import {
Currency,
Application,
} from '@node-steam/data';
import {
Market,
} from '@node-steam/market-pricing';
const API = new Market({ id: Application.CSGO, currency: Currency.EUR });
new Market(Options)API class
Options.id: numberApplication ID of the game you want to query skin/s for
We provide a enum for the most common used games.
Options.currency: numberOptional currency integer
We provide a enum for all available currencies
default = 1
Options.country: stringOptional ISO-3166 country code
Options.address: stringOptional local interface to bind for network connections
Options.timeout: numberOptional number of milliseconds before declaring the request as timed out
We recommend zeit/ms to easily convert human readable time to milliseconds. (Or just use a calculator 😏)
Options.timings: booleanOptional - if set request timings will be returned
default = false
Options.raw: booleanOptional - if set all objects will be returned in their raw form when set to true
default = false
Options.base: stringOptional - base domain
default = 'https://steamcommunity.com'
Options.path: stringOptional - base path
default = '/market/priceoverview'
Options.useragent: stringOptional - custom user agent for the HTTP request
default = `N|Steam Market-Pricing v${version} (https://github.com/node-steam/market-pricing)`
Options.gzip: booleanOptional - if set GZIP compression will be used for the connection
default = true
Options.strictSSL: booleanOptional - if set strict SSL will be forced for the connection
default = true
API.getPrice(skin: string, options?: object, callback?: function)Get price for a skin
const x = await API.getPrice('★ Bayonet');
> {
id: '★ Bayonet',
price: {
type: 'euro',
code: 'EUR',
sign: '€',
lowest: 135.44,
median: 136.61,
},
volume: 8,
};
API.getPrices(skins: string[], options?: object, callback?: function)Get prices for a array of skins
const x = await API.getPrices([ '★ Falchion Knife', '★ Karambit' ]);
> [
{
id: '★ Falchion Knife',
price: {
type: 'euro',
code: 'EUR',
sign: '€',
lowest: 59.86,
median: 57.50,
},
volume: 27,
},
{
id: '★ Karambit',
price: {
type: 'euro',
code: 'EUR',
sign: '€',
lowest: 215,
median: 214.74,
},
volume: 6,
}
];
Info:
You can request the raw item by setting
{ raw: true }in the options. This is not recommended though.
Raw:
{
success: true,
lowest_price: "215,--€",
volume: "6",
median_price: "214,74€"
}
This Module:
{
id: '★ Karambit',
price: {
type: 'euro',
code: 'EUR',
sign: '€',
lowest: 215,
median: 214.74,
},
volume: 6,
}
The prices aren't available as a string, but rather split up in object properties with more precise information:
Example:
Price you would get from the API:
{
lowest_price: "57,86€",
median_price: "59,63€"
}
Price you get from this module:
{
type: 'euro',
code: 'EUR',
sign: '€',
lowest: 59.86,
median: 57.74,
}
The volume (of available skins) is a integer instead of a string
The examples are shown using await for simplicity - if you don't want to make your function async you can always use .catch().then() or a callback instead.
Async:
const item = await API.getPrice('★ Bayonet');
// do something with the <item>
Promise:
API.getPrice('★ Bayonet')
.catch((error) => {
console.error(error);
})
.then((item) => {
// do something with the <item>
});
Callback:
API.getPrice('★ Bayonet', (error, item) => {
if (error) {
return console.log(error);
}
// do something with the <item>
});
Interested in contributing to Market-Pricing? Contributions are welcome, and are accepted via pull requests. Please review these guidelines before submitting any pull requests.
Install required global modules:
yarn global add typescript tslint typedoc ava
Installing dependencies:
yarn
Compile:
yarn compile
Test:
yarn test
Generate Docs:
yarn docs
This module is thoroughly tested with ava
Note: All responses from the steam API are currently mocked because of rate limiting. Might change in the future, not sure how to proceed about this though.
FAQs
Module to access the Steam Market Pricing API
The npm package @node-steam/market-pricing receives a total of 37 weekly downloads. As such, @node-steam/market-pricing popularity was classified as not popular.
We found that @node-steam/market-pricing demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.