The proliferation of distributed generation and the electrification of heat and transport pose significant challenges to distribution system operators (DSOs), and transmission system operators (TSOs). These challenges include the choice between network upgrades or operating increasingly constrained networks, with a reliance on the flexibility of distributed energy resources (DERs). This paper presents a novel market based coordination scheme, which allows both the DSO and TSO to access DER flexibility, while respecting distribution system limits. The DSO's objective in this work is to minimise the cost incurred by DSO adjustments to DERs, required to ensure stable distribution network operation. The methodology presented has the advantages of being compatible with existing TSO balancing market operation, and scalable enough to include multiple DSO markets coordinating with the TSO. The approach is demonstrated on a section of GB distribution network, using high DER growth scenario data for the year 2030. The case studies demonstrate the proposed DSO market mechanism to maintain thermal and voltage limits during periods of peak demand and DER output. The DSO is given priority in using DERs to solve distribution network constraints, however, significant flexibility remains for the TSO even during periods of peak demand and maximum export.