The present research aims to formulate competition in a retail energy market in the presence of an Integrated Demand Response (IDR) program to reduce prosumer costs and increase retailer profits. This gives prosumers more degrees of freedom to reduce their energy costs. The retail energy market includes retailers and prosumers equipped with an energy hub containing a boiler for producing heat and combined heat and power (CHP). Retailers aim to maximize profit, whereas prosumers seek to minimize their costs. Hence, a multi-leader-follower game with a bi-level program emerges in which the upper level deals with the profit maximization of each retailer while the lower level considers the cost minimization of each prosumer. The strategic behaviour of each retailer is modelled as a Mathematical Program with Equilibrium Constraints (MPEC) problem. Simultaneously solving all MPECs, which leads to an Equilibrium Problem with Equilibrium Constraints (EPEC), determines the market equilibrium point. The equilibrium point is achieved using mathematical, analytical methods and linearization of nonlinear constraints by accurate techniques. Two different case studies are developed to investigate how the number of retailers influences the market equilibrium point. The first case includes two retailers, while the second case considers an increase in the number of retailers. The results demonstrate that with an increase in retailers' number, their competition increases, causing the prosumers costs to reduce. Furthermore, our results suggest the IDR impact on reduced prosumers cost and increased retailers profit.