Jump to content
McKay Development

teoformartel

Member
  • Posts

    1
  • Joined

  • Last visited

Everything posted by teoformartel

  1. How to change currency in getMarketItem? Is it possible? I wanna get price of item in another currency(not usd). UPD: ye, "Currently, non-USD currencies are not supported." on CMarketItem wiki When will it be supported? It's very important for me. UPD2: I've just found another nmp package named "steam-market-pricing" that can help me UPD3: I was looking for better solution. So(from "steamcommunity\components\CMarketItem.js"): SteamCommunity.prototype.getMarketItem = function(appid, hashName, currency, callback) { if (typeof currency == "function") { callback = currency; currency = 1; } var self = this; this.httpRequest("https://steamcommunity.com/market/listings/" + appid + "/" + encodeURIComponent(hashName), function(err, response, body) { if (err) { callback(err); return; } var $ = Cheerio.load(body); if($('.market_listing_table_message') && $('.market_listing_table_message').text().trim() == 'There are no listings for this item.') { callback(new Error("There are no listings for this item.")); return; } var item = new CMarketItem(appid, hashName, self, body, $); item.updatePrice(currency, function(err) { if(err) { callback(err); } else { callback(null, item); } }); }, "steamcommunity"); }; Yep. I can set currency. So wiki on github is outdated. P.S lowestPrice and highestBuyOrder is set to the correct currency but medianSalePrices' currency is usd so, I checked it medianSalePrices can be converted from usd to XXX by exchange rate but lowestPrice and highestBuyOrder cant
×
×
  • Create New...