def on_message()

in websockets-finnhub/finnhub-websockets.py [0:0]


def on_message(ws, message):
    message_json = json.loads(message)
    message_json["@timestamp"] = datetime.datetime.utcnow().isoformat()
    res = es.index(index="websockets-data", body=message_json)
    print(message_json)