I'm not schooled in economics at all, but...
Supply and demand.
Magical items are very expensive, most of them. Let's look at longsword +1... It costs 2315 gp's. It means something like knights full gear and a horse. If you go to a large city and try to sell it, why anyone would buy it? And why would anyone buy it right a way? Even if the city as "GP limit" of 25000 or so, I still find it kind of amusing that anyone would buy it right away. In my game people usually have their money invested in some way. It's highly unusual to have loose money around in medieval setting, because banking is not (really) invented. Just think of a diamond worth 2000 gp's, and you try to sell it. Now that's hard even these days.
And magic should always get people on their toes. Once in history there was a sword that changed the gender of the wielder... And a sword that caused the wielder to attack random people once a month. As a result, you have to get Analyze Dweomer from a certain overpriced wizard. In other words: Get certification for the item, which will have an insane cost (for low-level items). Just look at Microsoft and licence costs, so you know how it is.
Just as an example:
My players have been selling lot of masterwork weapons and armor in the city. Adamantium items needs certification from guildmaster, which is costly. Overall, the supply of masterwork weapons go over the demand pretty fast and suddenly merchants get difficult. "Sorry, we don't need this... We don't have the money". At the moment, merchants pay players only after they have found a customer for the items.