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