JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 62
  • Score
    100M100P100Q63719F
  • License ISC

module to get pricing data for CS:GO weapon skins from Steam Community Market

Package Exports

  • csgo-market

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (csgo-market) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

CSGO-Market - Simplified CSGO skin pricing API

Straight from Steam's community market

Use case:

var csgomarket = require('csgo-market');

var printIt = function(data) {
    console.log(data);
}
csgomarket.getSinglePrice("AK-47", "Vulcan", "Factory New", false, printIt);

Example output from above code (prices will always return in USD):

{ success: true,
  lowest_price: '$80.50',
  volume: '48',
  median_price: '$80.01',
  wep: "AK-47",
  skin: "Vulcan",
  wear: "Factory New",
  stattrak: "false" }

(lowest price: $80.50, median_price: $80.01, 48 on the market.)

getSinglePrice(wep, skin, wear, stattrak, callback)

sends returned json object from steam to the callback function. If the request failed for any reason the json object will hold the following: {success: false}.

  • 'wep' : name of the weapon to be requested.
  • 'skin' : name of the skin to be requested.
  • 'wear' : wear of the skin to be requested. Available are these options: Field-Tested, Minimal Wear, Well-Worn, Battle-Scarred
  • 'stattrak' : boolean which signifies if you want stattrak to be included in the request or not.
  • 'callback' : callback function. Must have a single parameter which is the data returned from the request.

NOTE:

Capitialization is important for passed in values. If you are unsure of the exact name/spelling/capitilization/punctuation of a weapon and/or skin I highly reccomend checking the community market as a reference (http://steamcommunity.com/market/)

Main goals to add in the near future:

  • Function for Knife pricing
  • Function for all wears given a particular gun/skin pair.

This module is still under-development and this is just the first iteration.

If you have any suggestions I am open to add additonal functionality! I'd like to keep it small, but i'd love feedback. Email me @ nick.b.duncan@gmail.com