Tick values are refreshing very slowly in websocket streaming.
-
Hi @leena-1234 said in Tick values are refreshing very slowly in websocket streaming.:
It is observed that, there is a delay in tick values update and LTP is not getting reflected fastly so it's value is differing from the actual price on Angel Broking web console
We have noted this we will update you. -
Hello, Do you getting Live Nifty Spot Via Python Code.If So
please mail @ princetech1@gmail.com. -
@admin please provide me nifty Spot Live feed Python Code.
-
HI @princetech1 you can get it though websocket or ltp API.
-
@admin What will be the code or JSON request format to get BankNifty Spot/ Nifty Spot/ Finnifty Spot
-
HI @webseos Please go through the instrument dump file.
https://margincalculator.angelbroking.com/OpenAPI_File/files/OpenAPIScripMaster.json -
@princetech1 for the live feed python code watch link text
-
HI @webseos To Get live feed from websocket you need to pass task as "sfi" and pass nifty as token
-
@admin token = 'nifty'
task='sfi'
WS = SmartWebSocket(feedToken, CLIENT_ID)def on_tick(ws, tick):
print("Ticks: {}".format(tick))def on_open(ws):
#print("on Open")
ws.subscribe(task,token)def on_connect(ws, response):
ws.send_request(token)def on_close(ws, code, reason):
ws.stop()Assign the callbacks.
WS.on_ticks = on_tick
WS.on_connect = on_connect
WS.on_open = on_open
WS.on_close = on_closeWS.connect( )
print(WS)please check and make the neccesary update in above Code=>
-
@admin I want to get spot Nifty and Not Futures.
-
@J88913 that link is not useful=> Nothing special to get Hinted.
-
@admin Exception while retriving IP Address,using local host IP address HTTPSConnectionPool(host='api.ipify.org', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000000003B68358>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed'))
__on_open################
{'task': 'cn', 'channel': 'NONLM', 'token': '090809502', 'user': 'SWWR1025', 'acctid': 'SWWR1025'}
2021-08-19 19:09:21.993348 : Start task in the background
{'task': 'hb', 'channel': '', 'token': '090809502', 'user': 'SWWR1025', 'acctid': 'SWWR1025'}=> above is the data generated after my previosly posted python code.
-
This post is deleted! -
HI @princetech1 our team is working on websocket code we will update you once it is fixed.
-
@admin Can you show a sample code to get NIFTY/ BankNifty SPOT LTP Data. I think it always same, because NIFTY spot has no expiry
Query : Also can we get LTP of a premium related to a strike / expiry , e,g NIFTY 16000 CE 26 August 2021
Can we get LIVE premium ?
-
@admin What is SFI ? What is websocket's specialty over LTP or Historical API (Daily to 1 min)
Can we get many stock's data at once by multithreading?
-
@admin I saw this , filtered out stock equity info of 1522 stocks symbol and token to a JSON file, but didnot parsed FNO data yet because of too much strike prices , expiry data,
Saw different bank nifty , nifty strike, but could not find spot
Can you tell the symbol to FIND exact JSON record for NIFTY Bank NIFTY Spot -
HI @webseos said in Tick values are refreshing very slowly in websocket streaming.:
@admin What is SFI ? What is websocket's specialty over LTP or Historical API (Daily to 1 min)
Can we get many stock's data at once by multithreading?- You need to go through below documentation to understand all terms related to web socket.
2)We only provide data for the symbol whose token are available in instrument dump file.
- You need to go through below documentation to understand all terms related to web socket.
-
@J88913 ,@admin
i got the code from the link you have given but getting below error.
would you be able to help?
Error info: Handshake status 503 Service Unavailable
Handshake status 503 Service Unavailable
Error info: __on_close() takes 2 positional arguments but 4 were given
__on_close() takes 2 positional arguments but 4 were given -
HI @puna123 said in Tick values are refreshing very slowly in websocket streaming.:
@J88913 ,@admin
i got the code from the link you have given but getting below error.
would you be able to help?
Error info: Handshake status 503 Service Unavailable
Handshake status 503 Service Unavailable
Error info: __on_close() takes 2 positional arguments but 4 were given
__on_close() takes 2 positional arguments but 4 were givenwe will update you on this.