I don't know if the problem you are trying to solve is one of supplying prices for players trying to sell or buy magic items, or just finding a way to facilitate general magic item commerce. In the former case, the DMG has a very rough guide for prices based on rarity on page 133. If you are just looking for a way to allow players to buy and sell items, I would suggest using a modified barter system.
In my game, I decided that a believable (not realistic, that's another matter entirely) economy probably couldn't handle the huge sums that players want to transact on the spot. How much do 10,000 gold pieces weigh? How does Joe Shopkeeper store or transport that much gold without every thief in the city after him?
So I have instituted what I would call a magic broker, or agent. This is a person who can connect you with someone who might have the thing you are looking for, or at least something similar. He doesn't have an inventory of vorpal swords, but he knows a guy who has a dagger of poison he'd like to unload, and another guy with a +1 ax... He also knows an adventurer who really needs a potion of giant strength, and another looking for a ring of protection. In short, tell him what "magic surplus" you have, and he keeps a record. When someone comes along who needs it, he will contact you. For a small brokerage fee, of course.
He does have a small inventory of items that he knows will traffic easily (potions of healing, scrolls), but for the most part, he networks adventurers. It's a system that allows you to control the items available (no one can buy the arrow of dragon slaying that would derail your campaign, no matter how much gold they have), while allowing for interesting role play and barter encounters, back alley deals with dubious trading partners, and tough choices for players. All without creating Ye Olde Magic Shoppe.
Obviously, this choice works best in a large campaign city, with a high concentration of adventurers, but if your campaign has one nearby, it's a perfect spot.