The Indian stock market ended in green on Wednesday as buying was seen in the energy, commodities, and the PSE sectors.