Steam market price checker for Node.js
![NPM license](https://img.shields.io/npm/l/steam-market-pricing.svg)
Installation
Install using:
npm install steam-market-pricing
Usage
Get single item data
Input:
var market = require('steam-market-pricing');
market.getItemPrice(730, 'MP9 | Storm (Minimal Wear)', function(err, data) {
if(!err) {
console.log(data);
}
});
Output:
{
"success": true,
"lowest_price": "$0.06",
"volume": "237",
"median_price": "$0.04",
"market_hash_name": "MP9 | Storm (Minimal Wear)"
}
Get multiple items data
Input:
var market = require('steam-market-pricing');
var names = [
'MP9 | Storm (Minimal Wear)',
'Sawed-Off | Origami (Well-Worn)'
];
market.getItemsPrice(730, names, function(data) {
for(var i in names) {
console.log(names[i] + ' median price: ' + data[names[i]]['median_price']);
}
});
Output:
MP9 | Storm (Minimal Wear) median price: $0.05
Sawed-Off | Origami (Well-Worn) median price: $0.09
Get single item data using getItemsPrice
Input:
var market = require('steam-market-pricing');
market.getItemsPrice(730, 'MP9 | Storm (Minimal Wear)', function(data) {
console.log(data);
});
Output:
{
"Sawed-Off | Origami (Well-Worn)": {
"success": true,
"lowest_price": "$0.09",
"volume": "160",
"median_price": "$0.07"
}
}
Note: You can't handle response errors using getItemsPrice() method, any error will show as success
: false
.
Methods
getItemPrice(appid, name, callback, [currency])
Requests steam item market details
getItemsPrice(appid, names, callback, [currency])
Requests multiple steam items market details. Any error will be shown as success
: false
.
License
MIT