I used to sell camels at al-Baqee. I would sell them for dinars but accept dirhams in payment, and sell them for dirhams but accept dinars. So I came to the Prophet ﷺ while he was in the house of Hafsah and said, "Messenger of Allah, I have a question for you. I sell camels at al-Baqee. I sell them for dinars but accept dirhams, and sell them for dirhams but accept dinars."He replied, "There is no harm in taking them at the day's exchange rate, so long as you do not part with anything still outstanding between you."
أخبرني أحمد بن يحيى عن أبي نعيم قال حدثنا حماد بن سلمة عن سماك بن حرب عن سعيد بن جبير
كنت أبيع الإبل بالبقيع فأبيع بالدنانير وآخذ الدراهم فأتيت النبي ﷺ في بيت حفصة فقلت يا رسول الله إني أريد أن أسألك إني أبيع الإبل بالبقيع فأبيع بالدنانير وآخذ الدراهم قال لا بأس أن تأخذها بسعر يومها ما لم تفترقا وبينكما شيء
[Its isnad is hasan]. Abu Dawud narrated it in the Book of Business Transactions, chapter "On Taking Gold in Exchange for Silver," no. 3354, from the hadith of Hammad bin Salama with this wording. It is also found in Al-Kubra, no. 6180. Ibn Hibban graded it sahih, no. 1128, as did Ibn Jarud, no. 655, and Hakim, 2/44, saying it meets the criteria of Muslim, and Dhahabi agreed with him.