This paper tackles the shortcomings of the traditional centralized stock exchange systems, such as high transaction fees, centralized governance susceptible to attacks and lack of openness regarding the market actions and algorithms, by proposing an innovative architecture using blockchain to develop a decentralized stock exchange and an open continuous market. The proposed blockchain based solution solves the drawbacks of the centralized stock exchange architecture by ensuring the integrity and security of the owner’s assets and orders, self-enforcing smart agreements between parties as well as achieving democratic and reliable decisions regarding the execution and settlement of the orders through consensus algorithms. The proposed architecture uses smart contracts to enforce the validation of the owner’s rights and the correct execution and settlement of the orders, thus eliminating the need of a central authority that ensures the correctness of the stock exchange process. The solution was validated by implementing a prototype in Ethereum for a subset of rules for the Bucharest Stock Exchange. The experimental results show that the decentralized solution can offer lower transaction fees by replacing the commissions owed to brokers and central authorities with mining fees that are used to compensate the miners for their honest work in keeping the integrity of the system.