To ensure the secure operation of a power market, transmission networks must maintain an appropriate margin to account for various uncertainties. The uncertainties have increased significantly by the increasing penetration of renewable energy generation. A steady-state security distance (SSD) is an effective security margin that describes the distance of an operation point (OP) from steady-state security region boundaries. It captures both the available capacity and topological location of each transmission line that are important considerations for the ability of each line to withstand uncertainties. The proposed SSD-based transmission capacity margin is integrated into the market clearing model. The proposed SSD-constrained market clearing (SSDC-MC) model ensures that the SSD between the scheduled OP and security boundaries does not fall below a specified threshold. The SSDC-MC is formulated as a bi-level optimization problem. A novel algorithm is developed by dynamically identifying the binding constraints in the lower-level model. The SSDs are expressed as piecewise analytic functions of the scheduled OP. As a result, the bi-level problem is transformed into a single-level one. Two test cases are used to compare the SSDC-MC method with a different transmission margin determination method, which imposes constraints on loading of all transmission lines.