In this study, a new market model is proposed to enable the smooth integration of distributed energy resources (DERs) in day-ahead (DA) and balancing (BL) markets. The DA market is a joint energy and reserve market. DERs participate in the local market operated by the distribution market operator (DMO) which is coordinated with the wholesale market. During local market clearing, the DMO considers the technical constraints of the distribution grid to keep the operation of the distribution grid within limits. Moreover, the DMO, through preliminary scheduling, estimates preliminary prices for energy, reserve and balancing services. These can be seen as offer prices by which the DMO will bid into the TMO DA and BL market. The uncertainty of renewable-based DERs is considered through the use of stochastic programming. The proposed market model is compared with a centralised market model. Results show that adding the distribution network constraints to the proposed market model is capable of alleviating overloading and appropriately accounting this effect in terms of increasing the operational cost. Moreover, it has been shown that the scalability of the proposed market model is higher compared to the currently applied centralised market models.