The two above functions are not updating properly when a user uses the Sell tab of the Auction house. If a user sells an item then the C_AuctionHouse.GetNumOwnedAuctions() and C_AuctionHouse.GetOwnedAuctionInfo() will still return old data. Both of these should be updated properly when a user sells an item.
The only real way to get the updated returned results is to query the server yet again using C_AuctionHouse.QueryOwnedAuctions(). Doing this however causes issues with the Sell Tab afterwards, preventing users from selling items properly as it will not allow it to trigger PostItem().
Currently only way to monitor that an item has been sold is watching “COMMODITY_SEARCH_RESULTS_UPDATED”. This is because “OWNED_AUCTIONS_UPDATED” is not fired when a user posts something to sell. The event should technically fire as the users Owned Auctions has indeed been updated.
In order to streamline things and prevent multiple queries to the server, C_AuctionHouse.GetNumOwnedAuctions() and C_AuctionHouse.GetOwnedAuctionInfo() should always be updated when a user posts something to sell. This allows addon authors to pull data that is up to date without having to query the server.