Distributed power market trading has the characteristics of large number of participants, scattered locations, small single trading scale, and point-to-point trading. The traditional centralized power trading model has the problems of large load, low efficiency, high cost, reliance on third parties and unreliable data. With the characteristics of decentralization and nontampering, blockchain can establish a point-to-point trusted trading environment and provide effective solutions to the above problems. Therefore, this paper proposed a distributed power market trading framework based on blockchain. In this framework, the distributed power supply characteristics and trading needs of each participant are analyzed, a complete distributed trading process based on blockchain is designed. In addition, we have studied the key technologies of distributed power market trading. With the goal of power service reputation and maximum revenue of distributed power providers, we have established a matching degree model, a distributed power market trading optimization model, and designed a smart contract-based power market trading optimization strategy and power trading settlement strategy. Finally, we designed experiments to verify the performance of the proposed framework.