Jump to content
McKay Development

getInventoryHistory() returning "Error: Malformed page: no trade found"


Recommended Posts

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) {
            // 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(', ')}`);

Does anyone know why this might be happening? TYIA

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...