This depends on the perfection of market information. If both participants can perfectly determine the value of their and their adversary's goods, no one can or will cheat.
So barter should work for metals traders but not cattle traders (but they have other problems...).