This paper studies the effects of altruism and spitefulness in a two-sided market in which agents behave strategically and trade according to the Shapley–Shubik mechanism. By assuming that altruistic agents have concerns for others on the opposite side of the market, it shows that agents always find advantageous to trade. However, they prefer to stay out of the market and consume their endowments when there are altruistic agents who have concerns for the welfare of those on the same side of the market, or when there are spiteful agents. These non-trade situations occur either because the necessary first-order conditions for optimality are violated or because agents’ payoff functions are not concave