عَنْ جَابِرِ بْنِ عَبْدِ اللَّهِ الْأَنْصَارِيِّ رَضِيَ اللَّهُ عَنْهُمَا قَالَ نَهَى رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ عَنْ بَيْعِ الْحَيَوَانِ بِالْحَيَوَانِ نَسِيئَةً اثْنَيْنِ بِوَاحِدٍ وَلَا بَأْسَ بِهِ يَدًا بِيَدٍ
It is narrated from Sayyiduna Jabir bin Abdullah (may Allah be pleased with both of them) that the Messenger of Allah (peace and blessings be upon him) forbade selling an animal for another animal on credit, that is, exchanging one animal for two animals on deferred payment. If it is cash for cash, then there is no harm in it.