In this study, a general framework for implementingaretail energy market basedonthe Nikaido–Isoda/ relaxation algorithm is proposed as an electricity market structure with large distributed energy resources (DERs) penetration and demand side management of consumers. Moreover, the consumers are able to participate in the market as prosumers (i.e. producer and consumer at the same time). By considering the related uncertainties, the DERs can maximise their expected payoff or profit by undertaking strategies through the price bidding strategy, based on the proposed structure, considering Nash equilibrium. The results show the effectiveness and accuracy of the proposed framework in determining the optimal power set-points of players participating in the market to achieve the objectives.