If you think about it, gambling is gambling when it's done in the way of gambling, and not just when it's named betting or gambling [or a casino]. Just because the Indian stock market is popularly called the share market here doesn't mean that it cannot be [and isn't being used as] a gargantuan avenue for gambling, and that too in a fully legal and organized way. The stock market of India is used by millions upon millions of individuals and firms for gambling, like a lottery ticket, complete with the thrill and unexpectedness of a lottery.
Looking this way, it's actually foolish to say that betting/gambling is illegal or restricted in India. It is practically legal, and dozens upon dozens of institutions provide services, software as well as advice for this type of gambling.