Markets change rapidly, sometimes week to week. And what's hot one week might not be the next. Unfortunately, you appear to have gotten caught in the crosswinds. Finally, it is difficult to know what went on with your appraisal. If you got a loan to buy the house, the bank sent an appraiser to set a value on the property.
Some appraisers work hard to develop their own price research about a property.
Some simply use the agent's research, ask what the sales price is, and magically, the appraised value exactly matches the contract price. If you have a beef with the way your transaction was handled, take it up with the managing broker of the firm for which your agent works.