It is narrated from Sayyiduna Hakim bin Hizam (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) sent him with a dinar to buy a goat for sacrifice for him. He bought a goat for one dinar and sold it for two dinars, then went back and bought a goat for one dinar, and gave the other dinar to the Prophet (peace and blessings be upon him). He (peace and blessings be upon him) gave the dinar in charity and prayed that he be blessed in his trade.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب القراض / 11618