Why are they getting an alert? Why should the game allow that?
To this extent you're asking for them to remove bazaar API calls.
The why/how of it is very simple. known total price of all listed items on bazaar - new total price of all listed items on bazaar = purchase made from their bazaar of that difference.
simple logic to trigger an alert that tells you "someone bought something totaling this value, you can potentially mug X% of that"