t3sted
-
Posts
2 -
Joined
-
Last visited
Posts posted by t3sted
-
-
I just started using this module and I'm having trouble getting Steam inventory history. The following code always returnsĀ "Error: Malformed page: no trade found":
// set options for the inventory history request const options = { direction: 'past', // retrieve trades that occurred further in the past than startTime resolveVanityURLs: true, // resolve custom profile URLs to Steam IDs }; // make the API request to retrieve the inventory history data community.getInventoryHistory(options, (err, history) => { if (err) { console.error(err); process.exit(); } // print the inventory history to the console console.log(`Inventory history (${history.trades.length} trades):`); for (const trade of history.trades) { console.log(`- ${trade.date.toISOString()}: Traded with ${trade.partnerName}`); console.log(` Received: ${trade.itemsReceived.map(item => item.name).join(', ')}`); console.log(` Given: ${trade.itemsGiven.map(item => item.name).join(', ')}`); } process.exit(); });
Does anyone know why this might be happening? TYIA
getInventoryHistory() returning "Error: Malformed page: no trade found"
in node-steamcommunity
Posted
Thanks for your reply. Everyone who's written Steam APIs seems to conflate trade history and inventory history. I'm really after complete inventory history; unfortunately, trade history doesn't account for market transactions. I suppose some combination of the two might be my only option.