We propose a market solution to the problem of resource allocation subject to quantitative constraints, such as those imposed by considerations of diversity or geographical distribution. Constraints are “priced,” and agents are charged to the extent that their purchases a ect the value (at equilibrium prices) of the relevant constraints. The result is a constrained-efficient market equilibrium outcome. The outcome is fair whenever the constraints do not single out individual agents, which happens, for example with geographical distribution constraints. In economies with endowments, moreover, our equilibrium outcomes are constrained efficient and approximately individually rational.