I had this showerthought that the forex market is pretty much currency bartering. The forex market seems to be different from commodity or stock markets in that you exchange one currency for another. How does the forex market resemble and differ from bartering?
No by definition forex is not bartering. By definition (see here) bartering is
Barter is an act of trading goods or services between two or more parties without the use of money (or a monetary medium such as a credit card). In essence, bartering involves the provision of one good or service by one party in return for another good or service from another party.).
In forex market you are exchanging money for money. Even if you would want to consider the foreign currency a good on an account that it is not legal tender in your country of residence (which would be debatable), you are still exchanging money for that good - not another good. So this cannot be barter exchange by definition.