On the market is grammatically incorrect. In the market can be used to describe something that exists inside of the market, but most people will use “at” for everything. For example, “I am at the market” instead of “I am in the market” or, “They have pizza at the market” instead of “They have pizza in the market”. Although both would be grammatically correct, “at” is used much more often and sounds more natural to native speakers.