Sunan Ibn Majah
Sunan Ibn Majah 749
حَدَّثَنَا عَبْدُ اللَّهِ بْنُ سَعِيدٍ الْكِنْدِيُّ، حَدَّثَنَا أَبُو خَالِدٍ الأَحْمَرُ، عَنِ ابْنِ عَجْلاَنَ، عَنْ عَمْرِو بْنِ شُعَيْبٍ، عَنْ أَبِيهِ، عَنْ جَدِّهِ، قَالَ نَهَى رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ عَنِ الْبَيْعِ وَالاِبْتِيَاعِ وَعَنْ تَنَاشُدِ الأَشْعَارِ فِي الْمَسَاجِدِ .
Unreviewed translation. All hadiths in this collection are available in five languages. Titles and introductions may remain in Arabic.
'Abdullah ibn Sa'id al-Kindi narrated to us: Abu Khalid al-Ahmar narrated to us, from Ibn 'Ajlan, from 'Amr ibn Shu'ayb, from his father, from his grandfather, who said: The Messenger of Allah (peace and blessings be upon him) forbade buying and selling and the recitation of poetry in mosques.
Notes and open questions — unreviewed
The source uses تناشد الأشعار, referring to people reciting/repeating poetry to one another.