Sahih al-Bukhari Book 34, Hadith 13
The Prophet (ﷺ) said, "A time will come when one will not care how one gains one's money, legally or
illegally."
While we were offering the prayer with the Prophet (ﷺ) a caravan carrying food came from Sham. The people looked towards the caravan (and went to it) and only twelve persons remained with the Prophet. So, the Divine Inspiration came; "But when they see some bargain or some amusement, they disperse headlong to it." (62.11)
I used to practice money exchange, and I asked Zaid bin 'Arqam about it, and he narrated what the Prophet said in the following: Abu Al-Minhal said, "I asked Al-Bara' bin `Azib and Zaid bin Arqam about practicing money exchange. They replied, 'We were traders in the time of Allah's Messenger (ﷺ) and I asked Allah's Messenger (ﷺ) about money exchange. He replied, 'If it is from hand to hand, there is no harm in it; otherwise it is not permissible."