"I asked Messenger of Allah (ﷺ), I said: 'A man came to me asking to buy something that I did not have. Can I buy it from the market for him and then give it to him?' He said: 'Do not sell what is not with you.'"

He said: There are narrations on this topic from 'Abdullah bin 'Umar.
Jami` at-Tirmidhi Book 14, Hadith 32