Buy lyrium from the quartermaster at the mage tower, and everything else (flask concentrator agents etc) at the gnawed noble tavern (in the denerim market district). A legitimate way to get endless money is potent lyrium potions. I went from about 10 gold to 2500 gold in about 3 minutes by getting up to 150 gold to buy the expensive item in the shop, and then used that item to get to 2500. Note that I said 'almost.' If you have the timing right, you get paid twice. (Again, this is for speed the glitch still works even if there is stuff there.) When you bring up the junk category, you will see that there is one button for 'sell all' and another for 'sell item.' Press and hold the sell all button, and almost immediately press the sell one button. Now go to a vendor who has nothing in his junk category. It speeds up the process if the item is by itself. For Console, move an item that sells for a lot into your 'Junk' category. You can then buy it back for the selling price and keep doing this over and over until you the desired amount of gold. When done right, you will have gotten credit for selling the item twice. Now move the item over to the merchant window to sell. While holding left click, press right click. For PC, when you sell an object you have to left click to move it.
Well there is a exploit way to do it by using a glitch, which works on console differently than on PC.