WebSocket streaming did not work the whole day today. However, I'm able to fetch LTP data using ltpData method. Was something wrong with streaming today?
-
I still use the websocket streaming in the following manner:
from smartapi import SmartWebSocket
from smartapi import SmartConnect
import pyotpss = SmartWebSocket(FEED_TOKEN, CLIENT_ID)
def on_message(ws, message): <code> def on_open(ws): print("Connection opened") ss.subscribe(TASK, TOKEN) logger.info("Connection opened, subscriptions done") def on_error(ws, error): global EXIT_ALL #print("Inside error code") logger.info(error) str_Errors = traceback.format_exc() def on_close(ws): print("Connection Closed") logger.info("Connection closed") # Assign the callbacks. t2 = threading.Thread(target=trade_Execution) t2.start() ss._on_open = on_open ss._on_message = on_message ss._on_error = on_error ss._on_close = on_close ss.connect()
is this version of websocket outdated etc?
-
@nbmaiti Yes correct. Only V2 works.
-
@Ashok
old websocket 1 streaming stopped and not working? - topic:timeago_earlier,11 days
-
@projectSB where u able to connect to live stream? any help would be appreciated. Not able to get live feed for nifty and banknifty
- topic:timeago_earlier,about a month
-
-
@projectSB Neither no one is liable if V1 fails in between a trade right :).
Looks like there is no active support/budget for API from AB and I have seen for public contribution for code changes. unfortunately it is what it is. -
@techsharad Sorry I donot have expertise with Java.
-
@Ashok Yes, I checked out their documentation. But I am waiting for a formal release, with the classes from PyPi etc. The reason is that: yes, the fix may work temporarily, but if something breaks down during actual trade execution who will be liable?
@admin V2 is still a Beta, when will it go Live? I mean I would want to install the latest modules from PyPi etc. like we did for V1.
Please provide an ETA, so that we plan accordingly. -
@Ashok said in WebSocket streaming did not work the whole day today. However, I'm able to fetch LTP data using ltpData method. Was something wrong with streaming today?:
trading
hey @Ashok can you help me out to migrate v2 with Java SDK.
-
@projectSB I am exactly on the same boat/equally mad as an user. The formal release/support structure is not working anymore with smart API.
I think the V2 migration is in line with angelone migration and underlying API's. Thought V2 is not prefect, it does works and I am trading using it for couple of days. OM me for more details of the document below is not clear.
https://smartapi.angelbroking.com/docs/WebSocket2
Regards
Ashok. -
@Ashok That's not fair. At least there should be a general notification etc.
Any way, what do I need to do to get migrated to V2? are there code level changes required?
or is it just the modules that needs to be updated?@admin - Please need your assistance here. As per other posts, the V2 is still having issues right?
So why switch off the V1 till everything is resolved in V2? -
@projectSB Yes, AB have switched off V1 without any notice.