Trade mechanism selection in markets with frictions