We introduce expectations-based loss aversion, which can explain the empirically well-documented endowment and attachment effect, into the classical bilateral-trade setting (Myerson and Satterthwaite in J. Econ. Theory 29:265–281, 1983). We derive optimal mechanisms for different objectives and find that relative to no loss aversion, the platform designer optimally provides agents with partial insurance in the ownership dimension and with full insurance in the money dimension. Notably, the former is achieved either by increasing or decreasing the trade frequency, depending on the distribution of types. Finally, we show that the impossibility of inducing materially efficient trade persists with loss aversion.