All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
This transaction will be permissible if the following conditions are met:
First, the amount that is deposited in the stock exchange covers the amount that is required to be purchased from another currency. This applies if it covers it by itself, and also in case it covers it by means of an interest-free loan made by the stock exchange, for which it does not receive any benefit, and no penalty clause is made for late payment.
Second, the amount to be purchased must be received and the compensation for it must be delivered immediately, according to the applicable procedures, whether in cash or by depositing each sum in the account of its due claimant.
Third, the purchased amount should be sold in the same way it was purchased in terms of receipt and delivery.
Allaah Knows best.