AbstractThe increasing penetration of distributed energy resources (DERs) has led to increasing research interest in the cooperative control of multi‐prosumers in a transactive energy (TE) paradigm. While the existing literature shows that TE offers significant grid flexibility and economic benefits, few studies have addressed the incorporation of security constraints in TE. Herein, a market‐based control mechanism in real‐time markets is proposed to economically coordinate the TE among prosumers while ensuring secure system operation. Considering the dynamic characteristics of batteries and responsive demands, a model predictive control (MPC) method is used to handle the constraints between different time intervals and incorporate the following generation and consumption predictions. Owing to the computational burden and individual privacy issues, an efficient distributed algorithm is developed to solve the optimal power flow problem. The strong coupling between prosumers through power networks is removed by introducing auxiliary variables to acquire locational marginal prices (LMPs) covering energy, congestion, and loss components. Case studies based on the IEEE 33‐bus system demonstrated the efficiency and effectiveness of the proposed method and model.