Muwatta Malik, Book 31, Hadith 48 (USC-MSA)

Yahya related to me from Malik that Kathir ibn Farqad asked Abu Bakr ibn Muhammad ibn Amr ibn Hazm about a man who sold food to be delivered at a future date to a man for gold and then with the gold, he bought dates before he had taken delivery of the gold. He disapproved of that and forbade it. Yahya related to me from Malik from Ibn Shihab the like of that. Malik said, ''Said ibn al-Musayyab, Sulayman ibn Yasar, Abu Bakr ibn Muhammad ibn Amr ibn Hazm, and Ibn Shihab forbade that a man sell wheat for gold and then buy dates with that gold before he had received the gold from the transaction in which he sold the wheat. There is no harm for someone to buy dates on delayed terms, on the strength of the gold for which he sold the wheat, from someone other than the person to whom he sold the wheat before taking possession of the gold, and to refer the one from whom he bought the dates to his debtor who bought the wheat, for the gold he is owed for the dates." Malik said, "I asked more than one of the people of knowledge about that and they did not see any harm in it."

وَحَدَّثَنِي عَنْ مَالِكٍ، عَنْ كَثِيرِ بْنِ فَرْقَدٍ، ‏.‏ أَنَّهُ سَأَلَ أَبَا بَكْرِ بْنَ مُحَمَّدِ بْنِ عَمْرِو بْنِ حَزْمٍ عَنِ الرَّجُلِ، يَبِيعُ الطَّعَامَ مِنَ الرَّجُلِ بِذَهَبٍ إِلَى أَجَلٍ ثُمَّ يَشْتَرِي بِالذَّهَبِ تَمْرًا قَبْلَ أَنْ يَقْبِضَ الذَّهَبَ فَكَرِهَ ذَلِكَ وَنَهَى عَنْهُ ‏.‏ وَحَدَّثَنِي عَنْ مَالِكٍ، عَنِ ابْنِ شِهَابٍ، بِمِثْلِ ذَلِكَ ‏.‏ قَالَ مَالِكٌ وَإِنَّمَا نَهَى سَعِيدُ بْنُ الْمُسَيَّبِ وَسُلَيْمَانُ بْنُ يَسَارٍ وَأَبُو بَكْرِ بْنُ مُحَمَّدِ بْنِ عَمْرِو بْنِ حَزْمٍ وَابْنُ شِهَابٍ عَنْ أَنْ لاَ يَبِيعَ الرَّجُلُ حِنْطَةً بِذَهَبٍ ثُمَّ يَشْتَرِيَ الرَّجُلُ بِالذَّهَبِ تَمْرًا قَبْلَ أَنْ يَقْبِضَ الذَّهَبَ مِنْ بَيْعِهِ الَّذِي اشْتَرَى مِنْهُ الْحِنْطَةَ فَأَمَّا أَنْ يَشْتَرِيَ بِالذَّهَبِ الَّتِي بَاعَ بِهَا الْحِنْطَةَ إِلَى أَجَلٍ تَمْرًا مِنْ غَيْرِ بَائِعِهِ الَّذِي بَاعَ مِنْهُ الْحِنْطَةَ قَبْلَ أَنْ يَقْبِضَ الذَّهَبَ وَيُحِيلَ الَّذِي اشْتَرَى مِنْهُ التَّمْرَ عَلَى غَرِيمِهِ الَّذِي بَاعَ مِنْهُ الْحِنْطَةَ بِالذَّهَبِ الَّتِي لَهُ عَلَيْهِ فِي ثَمَنِ التَّمْرِ فَلاَ بَأْسَ بِذَلِكَ ‏.‏ قَالَ مَالِكٌ وَقَدْ سَأَلْتُ عَنْ ذَلِكَ غَيْرَ وَاحِدٍ مِنْ أَهْلِ الْعِلْمِ فَلَمْ يَرَوْا بِهِ بَأْسًا ‏.

sunnah.com

also referenced under: Book 31, Hadith 1340 (In-Book)