Answer
I say, and with God's success: The method followed in immediate sales in the stock exchanges is that when the sale contract is made, it is recorded in the stock exchange's computer to prove this sale, and the stock exchange guarantees the performance of the seller's and buyer's obligations. However, the seller delivers the sold item, and the buyer pays the price at a later time, which varies in different exchanges; in some, it is after hours from the day of the contract itself, in others it is after one day, and in some after two or three days, and it is usually not more than three days.
It is essential to ensure before the sale that the shares are owned by the seller at the time of sale, so as not to sell what one does not own. If the shares are owned by the seller, then the delay in delivering the sold item and the price does not harm, because the delay is for procedural reasons. However, he must ensure before selling them that he has taken possession of them; because selling before possession is not permissible. Usually, what transfers to the buyer's ownership at the contract is only the ownership of the shares, while possession does not occur until the delivery time. This was explained by our Sheikh in the jurisprudence of sales (1: 371-375), and God knows best.