We study portfolio optimization and indifference pricing in markets where illiquidity may affect the transfer of wealth over time and between investment classes. We extend well-known results on arbitrage bounds, attainable claims and duality to illiquid markets and general swap contracts where both claims and premiums may have multiple payout dates. In addition to classical frictionless markets and markets with transaction costs, our model covers nonlinear illiquidity effects that arise in limit order markets.