Trader selling a commodity which he does not own and then going to the market to buy it
This type of sale involves
selling items not in real possession of the seller. Accordingly, you are not allowed to sell this commodity to the buyer until it first comes into your possession. Once you take possession of it, it becomes permissible for you to sell it to him at an agreed upon and profitable price that may not be too much for the buyer. However, if the buyer entrusts you to buy him a certain commodity, it is not permissible for you to charge more money than the stated price of the commodity. There is nothing wrong, however, if he gives you money as a gift in return for your effort.
May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.