krishna
@krishna
Best posts made by krishna
Latest posts made by krishna
-
Understanding WebSocket tick data
Hello team,
When I am running the WebSocket usage example provided in the GitHub repo, the data received is not in a consistent format.
Ticks: [{'name': 'tm', 'tvalue': '29/12/2020 14:21:42'}, {'ap': '161.59', 'bp': '159.85', 'bq': '6283', 'bs': '3162', 'c': '163.45', 'cng': '-03.55', 'e': 'nse_cm', 'lo': '159.40', 'ltp': '159.90', 'ltq': '500', 'ltt': '29/12/2020 14:21:42', 'name': 'sf', 'nc': '-02.17', 'sp': '159.95', 'tbq': '1335926', 'tk': '3063', 'to': '2922824084.18', 'tsq': '3460661', 'v': '18087902'}] Ticks: [{'name': 'tm', 'tvalue': '29/12/2020 14:21:43'}, {'e': 'nse_cm', 'ltp': '159.90', 'ltq': '500', 'ltt': 'NA', 'name': 'sf', 'tk': '3063'}] Ticks: [{'name': 'tm', 'tvalue': '29/12/2020 14:21:44'}, {'ap': '161.59', 'bp': '159.90', 'bq': '10', 'bs': '1942', 'c': '163.45', 'cng': '-03.55', 'e': 'nse_cm', 'lo': '159.40', 'ltp': '159.90', 'ltq': '500', 'ltt': '29/12/2020 14:21:42', 'name': 'sf', 'nc': '-02.17', 'sp': '159.95', 'tbq': '1343158', 'tk': '3063', 'to': '2922824084.18', 'tsq': '3459855', 'v': '18087902'}] Ticks: [{'ap': '161.59', 'bp': '159.90', 'bq': '10', 'bs': '1942', 'c': '163.45', 'cng': '-03.55', 'e': 'nse_cm', 'lo': '159.40', 'ltp': '159.90', 'ltq': '500', 'ltt': '29/12/2020 14:21:42', 'name': 'sf', 'nc': '-02.17', 'sp': '159.95', 'tbq': '1348279', 'tk': '3063', 'to': '2922824084.18', 'tsq': '3459855', 'v': '18087902'}] Ticks: [{'name': 'tm', 'tvalue': '29/12/2020 14:21:45'}, {'ap': '161.59', 'bp': '159.90', 'bq': '10', 'bs': '6223', 'c': '163.45', 'cng': '-03.55', 'e': 'nse_cm', 'lo': '159.40', 'ltp': '159.90', 'ltq': '500', 'ltt': '29/12/2020 14:21:42', 'name': 'sf', 'nc': '-02.17', 'sp': '159.95', 'tbq': '1348208', 'tk': '3063', 'to': '2922824084.18', 'tsq': '3464157', 'v': '18087902'}] Ticks: [{'name': 'tm', 'tvalue': '29/12/2020 14:21:46'}, {'e': 'nse_cm', 'ltp': '159.95', 'ltq': '57', 'ltt': 'NA', 'name': 'sf', 'tk': '3063'}] Ticks: [{'ap': '161.59', 'bp': '159.90', 'bq': '10', 'bs': '5223', 'c': '163.45', 'cng': '-03.50', 'e': 'nse_cm', 'lo': '159.40', 'ltp': '159.95', 'ltq': '57', 'ltt': '29/12/2020 14:21:46', 'name': 'sf', 'nc': '-02.14', 'sp': '159.95', 'tbq': '1344216', 'tk': '3063', 'to': '2922985674.18', 'tsq': '3463155', 'v': '18088902'}]
Sometimes the response has two dictionaries with 2 and 6 key/value pairs respectively. Whereas, sometimes it has 2 and 19 key value/pairs. And other times I receive only a single dictionary.
Now, which response do I consider as the live data? Or am I missing something here. Could you please help me with this?
Thanks,
Krishna -
Unable to fetch LTP
Hello team,
I am able to place fetch profile details and place orders using the API, but am facing 404 page not found error when trying to fetch LTP.
I have used the exact same code as provided in the documentation.
Is there any code sample for this ? Could you please help me with this.
Thanks.
Edit: Also when I tried to fetch web socket data, the output is Ticks: [{'ak': 'nk', 'msg': 'hb', 'task': 'hb'}]