@Sukhwant280 use this code for feedtoken
feedToken = obj.getfeedToken()
J88913
@J88913
Best posts made by J88913
-
RE: Unable to get live feed.
Latest posts made by J88913
-
RE: Websocket2.0 just stops after running for 1 min without any errors etc.
Watch the video and download the code to get the live data into Excel
Youtube Video -
RE: Websocket 2.0
@rajanprabu sir can u share the correct function so that we can use it? Waiting for @admin to correct it will take a long time for them as their support is very bad.
-
RE: Open interest in websocket
@Deb88 Can you tell me how you get the solution. I am still getting this message only
on open
In on pong function==> b'\x00' -
WebSocketV2 not working to get Live Feed
from SmartApi.smartWebSocketV2 import SmartWebSocketV2
AUTH_TOKEN = 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VybmFtZSI6Iko4ODkxMyIsInJvbGVzIjowLCJ1c2VydHlwZSI6IlVTRVIiLCJpYXQiOjE2NjAxMDc2MDIsImV4cCI6MTc0NjUwNzYwMn0.GxHWWlTKnC-pGIyrz_PLBpwz4Dw2qYdQTTqum5KUKgSsaHFsts1gP1kzgkJELfTAbFmnlyA1dQtgruNP_5vWBQ'
API_KEY = 'IpUZc95q'
CLIENT_CODE = 'J77913'
FEED_TOKEN = '0935239566'
correlation_id = "erroroutp1"
action = 1
mode = 3
token_list = [{"exchangeType": 1, "tokens": ["11536"]}]
sws = SmartWebSocketV2(AUTH_TOKEN, API_KEY, CLIENT_CODE, FEED_TOKEN)
def on_data(wsapp, message):
print("Ticks: {}".format(message))
def on_open(wsapp):
print("on open")
sws.subscribe(correlation_id, mode, token_list)
def on_error(wsapp, error):
print(error)
def on_close(wsapp):
print("Close")Assign the callbacks.
sws.on_open = on_open
sws.on_data = on_data
sws.on_error = on_error
sws.on_close = on_closesws.connect()
I am using the above code but do not get any live feed. Only received following output
on open
In on pong function==> b'\x00'
In on pong function==> b'\x00'
In on pong function==> b'\x00' -
RE: Unable to get live feed.
@Sukhwant280 use this code for feedtoken
feedToken = obj.getfeedToken() -
RE: Python code to convert WEBSOCKET streaming data(tick data) into Pandas Datadframe
@anindya2k Can check this for the free code Youtube Video
-
RE: User Feedback - WebSocket 2.0 Beta Rollout – Python Language
@admin I am getting following error in smartWebSocketv2Example.py on open
In on pong function==> b'ping'
In on pong function==> b'ping'Not able to fetch any data.
-
RE: Can't install smartapi python library using pip
@Sukhwant280 Can you please tell how you resolved this error?