Narrated Abu Al-Minhal:
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 (radiallaahu `anhumaa) about practicing money exchange. They replied, ‘We were traders in the time of Allah’s Apostle (sallallaahu `alayhi wasallam) and I asked Allah’s Apostle (sallallaahu `alayhi wasallam) about money exchange. He replied, ‘If it is from hand to hand, there is no harm in it; otherwise it is not permissible.”
Dealing in currencies is permissible so long as the exchange takes place in the same sitting as the contract is made. It is permissible to sell euros for dollars so long as the exchange takes place in the same sitting as the contract is made. But when the deal is concerning the same type of currency, such as selling one dollar for two dollars, that is not permissible because it is a type of riba. In that case they should be of equal amounts and the exchange must take place in the same sitting as the contract if the exchange is concerning one type of currency. The evidence for that is the report narrated by ‘Ubaadah ibn al-Saamit (may Allaah be pleased with him) who said: The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “Gold for gold, silver for silver, wheat for wheat, barley for barley, dates for dates, salt for salt, like for like, same for same, hand to hand. If the types are different then sell however you like, so long as it is hand to hand.” Narrated by Muslim, 1587.
It says in Majmoo’ Fataawa Ibn Baaz (19/171-174):
Dealing in currency, buying and selling, is permissible, but that is subject to the condition that the exchange be hand-to-hand if the currencies are different. If a person sells Libyan currency for American or Egyptian or whatever currency hand to hand, there is nothing wrong with that, such as if he buys dollars for Libyan currency hand to hand, exchanging it in one sitting, or he buys Egyptian or English currency etc for the Libyan or whatever currency hand to hand, there is nothing wrong with that. But if there is a delay, then it is not permissible, and if the exchange is not done in the same sitting, it is not permissible, because in that case it is regarded as a kind of riba-based transaction. So the exchange must take place in the same sitting, hand to hand, if the currencies are different. But if they are of the same kind, two conditions must be met: they should be of equal amounts and the exchange should take place in the same sitting, because the Prophet (peace and blessings of Allaah be upon him) said: “Gold for gold, silver for silver…”
The ruling on currency is as mentioned above; if they are different then it is permissible for the amounts exchanged to be different, so long as the exchange takes place in the same sitting. If they are of the same kind, such as dollars for dollars, or dinars for dinars, then the exchange must take place in the same sitting and they should be of the same amount. And Allaah is the source of strength. End quote from IslamQA.
More on it here.