The aim of this paper is to present the design of an energy and flexibility market that operates in coordination with both wholesale and local markets. By utilizing greater flexibility through the integration with transmission and distribution networks, the market can adapt to changing operational conditions over time. The market operator uses information from the TSO-DSO to implement the necessary submarket type based on network conditions.The market operator, in turn, will select the proper sub-market based on technical and economic specifications, from the operators, i.e., the required energy, flexibility, and associated costs. The proposed method offers a decentralized and non-iterative coordinated market for energy and flexibility at both the transmission and distribution levels, guided by the principle that, electricity flows naturally from low-cost to high-cost nodes in an uncongested network. The market operator directs energy and flexibility to higher cost buses using an appropriate market mechanism. Consequently, the existing network is oriented towards being congestion-free. Simulation results demonstrate that the proposed market not only aligns with TSO-DSO operational priorities but also approaches the outcomes of a centralized market in terms of optimality. Also, the proposed method requires less calculation time for than previously coordinated market execution methods, such as TSO-leader and DSO-leader.