As identified by Yodabird19:
would it make sense to have the mod read messages like Successful exchange! or Shop does not have enough in stock. (perhaps double-checking via measuring changes to the player's inventory contents) to infer changes in a shop's stock without relying on a player tabbing through the exchange list menu explicitly?
I noticed when I bought out fairhill's prismarine shop that tradex still listed the shop as having stock, since I didn't tab through the list a second time after completing my purchases

As identified by Yodabird19: