Hadith 4018
وَعَنِ ابْنِ عَبَّاسٍ أَنَّ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ تَنَفَّلَ سيفَه ذَا الفَقارِ يومَ بدْرٍ رَوَاهُ أَحْمد وَابْن مَاجَهْ وَزَادَ التِّرْمِذِيُّ وَهُوَ الَّذِي رَأَى فِيهِ الرُّؤْيَا يَوْم أحد
Ibn 'Abbas said that the Prophet got his sword Dhul Fiqar as private booty at the battle of Badr. Ibn Majah transmitted it, and Tirmidhi added that it was that about which he had the vision at the battle of Uhud.