
from maticalgos.sparkLib import SparkLib

spk = SparkLib(apikeys="8cb64e560067839")

from maticalgos.zmqWsHandler import ZmqDataWs

if __name__ == "__main__":  
    token = spk.generate_token()
    if token['status'] and not token['error'] : 
        accesstoken = token['data'][0]['access_token']
    else: 
        raise(token)
    zm = ZmqDataWs(accesstoken)
    zm._zmqConnect()

# 2024-10-23 09:14:11,673:CRITICAL:maticalgos.zmqWsHandler.zmqdataWS:Error in Tick Data : {'type': 'ERROR', 'Identifier': '61FA42:shoonya1', 'data': 'Error : float() argument must be a string or a real number, not \'NoneType\', data : {\'t\': \'tk\', \'e\': \'NSE\', \'tk\': \'26000\', \'ts\': \'Nifty 50\', \'pp\': \'2\', \'ls\': \'1\', \'ti\': \'0.05\', \'lp\': \'24378.15\', \'pc\': \'-0.38\', \'c\': \'24472.10\', \'ft\': \'1729654982\', \'o\': \'24378.15\', \'h\': \'24378.15\', \'l\': \'24378.15\', \'toi\': \'136400600\'}, Traceback : Traceback (most recent call last):\n  File "/usr/local/lib/python3.10/site-packages/maticalgos/sparkLib/utility/dataws/shoonyaws.py", line 101, in tickHandler\n    "turnover" : float(turnover) ,\nTypeError: float() argument must be a string or a real number, not \'NoneType\'\n', 'message': 'Error - 61FA42:shoonya1', 'Broker': 'SHOONYA', 'spwID': 'shoonya1--1'}
# 2024-10-23 09:14:11,674:CRITICAL:maticalgos.zmqWsHandler.zmqdataWS:Error in Tick Data : {'type': 'ERROR', 'Identifier': '61FA42:shoonya1', 'data': 'Error : float() argument must be a string or a real number, not \'NoneType\', data : {\'t\': \'tk\', \'e\': \'NFO\', \'tk\': \'44963\', \'ts\': \'NIFTY24OCT24C27400\', \'pp\': \'2\', \'ls\': \'25\', \'ti\': \'0.05\', \'lp\': \'1.20\', \'pc\': \'0.00\', \'c\': \'1.20\', \'ft\': \'1729654800\', \'oi\': \'181650\', \'poi\': \'181650\'}, Traceback : Traceback (most recent call last):\n  File "/usr/local/lib/python3.10/site-packages/maticalgos/sparkLib/utility/dataws/shoonyaws.py", line 101, in tickHandler\n    "turnover" : float(turnover) ,\nTypeError: float() argument must be a string or a real number, not \'NoneType\'\n', 'message': 'Error - 61FA42:shoonya1', 'Broker': 'SHOONYA', 'spwID': 'shoonya1--1'}
# 2024-10-23 09:14:11,674:CRITICAL:maticalgos.zmqWsHandler.zmqdataWS:Error in Tick Data : {'type': 'ERROR', 'Identifier': '61FA42:shoonya1', 'data': 'Error : float() argument must be a string or a real number, not \'NoneType\', data : {\'t\': \'tk\', \'e\': \'NFO\', \'tk\': \'45004\', \'ts\': \'NIFTY24OCT24P27650\', \'pp\': \'2\', \'ls\': \'25\', \'ti\': \'0.05\', \'lp\': \'3167.70\', \'pc\': \'0.00\', \'c\': \'3167.70\', \'ft\': \'1729654801\', \'oi\': \'0\', \'poi\': \'0\'}, Traceback : Traceback (most recent call last):\n  File "/usr/local/lib/python3.10/site-packages/maticalgos/sparkLib/utility/dataws/shoonyaws.py", line 101, in tickHandler\n    "turnover" : float(turnover) ,\nTypeError: float() argument must be a string or a real number, not \'NoneType\'\n', 'message': 'Error - 61FA42:shoonya1', 'Broker': 'SHOONYA', 'spwID': 'shoonya1--1'}
# 2024-10-23 09:14:11,674:CRITICAL:maticalgos.zmqWsHandler.zmqdataWS:Error in Tick Data : {'type': 'ERROR', 'Identifier': '61FA42:shoonya1', 'data': 'Error : float() argument must be a string or a real number, not \'NoneType\', data : {\'t\': \'tk\', \'e\': \'NFO\', \'tk\': \'43727\', \'ts\': \'NIFTY24OCT24P24500\', \'pp\': \'2\', \'ls\': \'25\', \'ti\': \'0.05\', \'lp\': \'122.50\', \'pc\': \'0.00\', \'c\': \'122.50\', \'ft\': \'1729654800\', \'oi\': \'3450050\', \'poi\': \'3450050\'}, Traceback : Traceback (most recent call last):\n  File "/usr/local/lib/python3.10/site-packages/maticalgos/sparkLib/utility/dataws/shoonyaws.py", line 101, in tickHandler\n    "turnover" : float(turnover) ,\nTypeError: float() argument must be a string or a real number, not \'NoneType\'\n', 'message': 'Error - 61FA42:shoonya1', 'Broker': 'SHOONYA', 'spwID': 'shoonya1--1'}
# 2024-10-23 09:14:11,674:CRITICAL:maticalgos.zmqWsHandler.zmqdataWS:Error in Tick Data : {'type': 'ERROR', 'Identifier': '61FA42:shoonya1', 'data': 'Error : float() argument must be a string or a real number, not \'NoneType\', data : {\'t\': \'tk\', \'e\': \'NFO\', \'tk\': \'44643\', \'ts\': \'NIFTY24OCT24C26400\', \'pp\': \'2\', \'ls\': \'25\', \'ti\': \'0.05\', \'lp\': \'1.45\', \'pc\': \'0.00\', \'c\': \'1.45\', \'ft\': \'1729654800\', \'oi\': \'301875\', \'poi\': \'301875\'}, Traceback : Traceback (most recent call last):\n  File "/usr/local/lib/python3.10/site-packages/maticalgos/sparkLib/utility/dataws/shoonyaws.py", line 101, in tickHandler\n    "turnover" : float(turnover) ,\nTypeError: float() argument must be a string or a real number, not \'NoneType\'\n', 'message': 'Error - 61FA42:shoonya1', 'Broker': 'SHOONYA', 'spwID': 'shoonya1--1'}
# 2024-10-23 09:14:11,674:CRITICAL:maticalgos.zmqWsHandler.zmqdataWS:Error in Tick Data : {'type': 'ERROR', 'Identifier': '61FA42:shoonya1', 'data': 'Error : float() argument must be a string or a real number, not \'NoneType\', data : {\'t\': \'tk\', \'e\': \'NFO\', \'tk\': \'44182\', \'ts\': \'NIFTY24OCT24C25350\', \'pp\': \'2\', \'ls\': \'25\', \'ti\': \'0.05\', \'lp\': \'2.75\', \'pc\': \'0.00\', \'c\': \'2.75\', \'ft\': \'1729654800\', \'oi\': \'1802025\', \'poi\': \'1802025\'}, Traceback : Traceback (most recent call last):\n  File "/usr/local/lib/python3.10/site-packages/maticalgos/sparkLib/utility/dataws/shoonyaws.py", line 101, in tickHandler\n    "turnover" : float(turnover) ,\nTypeError: float() argument must be a string or a real number, not \'NoneType\'\n', 'message': 'Error - 61FA42:shoonya1', 'Broker': 'SHOONYA', 'spwID': 'shoonya1--1'}
# 2024-10-23 09:14:11,674:CRITICAL:maticalgos.zmqWsHandler.zmqdataWS:Error in Tick Data : {'type': 'ERROR', 'Identifier': '61FA42:shoonya1', 'data': 'Error : float() argument must be a string or a real number, not \'NoneType\', data : {\'t\': \'tk\', \'e\': \'NFO\', \'tk\': \'44835\', \'ts\': \'NIFTY24OCT24C27200\', \'pp\': \'2\', \'ls\': \'25\', \'ti\': \'0.05\', \'lp\': \'1.20\', \'pc\': \'0.00\', \'c\': \'1.20\', \'ft\': \'1729654800\', \'oi\': \'238000\', \'poi\': \'238000\'}, Traceback : Traceback (most recent call last):\n  File "/usr/local/lib/python3.10/site-packages/maticalgos/sparkLib/utility/dataws/shoonyaws.py", line 101, in tickHandler\n    "turnover" : float(turnover) ,\nTypeError: float() argument must be a string or a real number, not \'NoneType\'\n', 'message': 'Error - 61FA42:shoonya1', 'Broker': 'SHOONYA', 'spwID': 'shoonya1--1'}
# 2024-10-23 09:14:11,674:CRITICAL:maticalgos.zmqWsHandler.zmqdataWS:Error in Tick Data : {'type': 'ERROR', 'Identifier': '61FA42:shoonya1', 'data': 'Error : float() argument must be a string or a real number, not \'NoneType\', data : {\'t\': \'tk\', \'e\': \'NFO\', \'tk\': \'43547\', \'ts\': \'NIFTY24OCT24C23900\', \'pp\': \'2\', \'ls\': \'25\', \'ti\': \'0.05\', \'lp\': \'586.15\', \'pc\': \'0.00\', \'c\': \'586.15\', \'ft\': \'1729654800\', \'oi\': \'7625\', \'poi\': \'7625\'}, Traceback : Traceback (most recent call last):\n  File "/usr/local/lib/python3.10/site-packages/maticalgos/sparkLib/utility/dataws/shoonyaws.py", line 101, in tickHandler\n    "turnover" : float(turnover) ,\nTypeError: float() argument must be a string or a real number, not \'NoneType\'\n', 'message': 'Error - 61FA42:shoonya1', 'Broker': 'SHOONYA', 'spwID': 'shoonya1--1'}
# 2024-10-23 09:14:11,674:CRITICAL:maticalgos.zmqWsHandler.zmqdataWS:Error in Tick Data : {'type': 'ERROR', 'Identifier': '61FA42:shoonya1', 'data': 'Error : float() argument must be a string or a real number, not \'NoneType\', data : {\'t\': \'tk\', \'e\': \'NFO\', \'tk\': \'44739\', \'ts\': \'NIFTY24OCT24C26900\', \'pp\': \'2\', \'ls\': \'25\', \'ti\': \'0.05\', \'lp\': \'1.30\', \'pc\': \'0.00\', \'c\': \'1.30\', \'ft\': \'1729654800\', \'oi\': \'165075\', \'poi\': \'165075\'}, Traceback : Traceback (most recent call last):\n  File "/usr/local/lib/python3.10/site-packages/maticalgos/sparkLib/utility/dataws/shoonyaws.py", line 101, in tickHandler\n    "turnover" : float(turnover) ,\nTypeError: float() argument must be a string or a real number, not \'NoneType\'\n', 'message': 'Error - 61FA42:shoonya1', 'Broker': 'SHOONYA', 'spwID': 'shoonya1--1'}
# 2024-10-23 09:14:11,675:CRITICAL:maticalgos.zmqWsHandler.zmqdataWS:Error in Tick Data : {'type': 'ERROR', 'Identifier': '61FA42:shoonya1', 'data': 'Error : float() argument must be a string or a real number, not \'NoneType\', data : {\'t\': \'tk\', \'e\': \'NFO\', \'tk\': \'45029\', \'ts\': \'NIFTY24OCT24C27750\', \'pp\': \'2\', \'ls\': \'25\', \'ti\': \'0.05\', \'lp\': \'1.10\', \'pc\': \'0.00\', \'c\': \'1.10\', \'ft\': \'1729654800\', \'oi\': \'1269025\', \'poi\': \'1269025\'}, Traceback : Traceback (most recent call last):\n  File "/usr/local/lib/python3.10/site-packages/maticalgos/sparkLib/utility/dataws/shoonyaws.py", line 101, in tickHandler\n    "turnover" : float(turnover) ,\nTypeError: float() argument must be a string or a real number, not \'NoneType\'\n', 'message': 'Error - 61FA42:shoonya1', 'Broker': 'SHOONYA', 'spwID': 'shoonya1--1'}
# 2024-10-23 09:14:11,675:CRITICAL:maticalgos.zmqWsHandler.zmqdataWS:Error in Tick Data : {'type': 'ERROR', 'Identifier': '61FA42:shoonya1', 'data': 'Error : float() argument must be a string or a real number, not \'NoneType\', data : {\'t\': \'tk\', \'e\': \'NFO\', \'tk\': \'44556\', \'ts\': \'NIFTY24OCT24P25950\', \'pp\': \'2\', \'ls\': \'25\', \'ti\': \'0.05\', \'lp\': \'1468.30\', \'pc\': \'0.00\', \'c\': \'1468.30\', \'ft\': \'1729654800\', \'oi\': \'2325\', \'poi\': \'2325\'}, Traceback : Traceback (most recent call last):\n  File "/usr/local/lib/python3.10/site-packages/maticalgos/sparkLib/utility/dataws/shoonyaws.py", line 101, in tickHandler\n    "turnover" : float(turnover) ,\nTypeError: float() argument must be a string or a real number, not \'NoneType\'\n', 'message': 'Error - 61FA42:shoonya1', 'Broker': 'SHOONYA', 'spwID': 'shoonya1--1'}
