This does not save my websocket data in my mongo collection. Please note that I have all the websocket callbacks(on_ticks, on_connect, on_close...) defined in my code and I am seeing tick data in my Python console in real time.
from pymongo import MongoClient
client = MongoClient()
db=client.market_data #market_data is my db name
kws = KiteTicker("4515kn****", "pOYgD0hvSfofC********")
db.tick.insertMany(kws.connect()); #tick is my mongo collection name