Working WebSocket Sample code to retrieve LTP - Python
-
@James-Bond this code is giving following errorrs
ReactorNotRestartable Traceback (most recent call last)
<ipython-input-71-f3a22d8e176e> in <module>()
21 ss.on_close = on_close
22
---> 23 ss.connect( )3 frames
/usr/local/lib/python3.7/dist-packages/twisted/internet/base.py in startRunning(self)
841 raise error.ReactorAlreadyRunning()
842 if self._startedBefore:
--> 843 raise error.ReactorNotRestartable()
844 self._started = True
845 self._stopped = FalseReactorNotRestartable:
-
you can look at the key value and its corresponding explanation here
-
-
@James-Bond yes
-
@lavly what's your sdk version ??
-
is there any way to get low, high , ltp and volumes, & market watch (best 5 bids & ask)?
-
@sudhakar said in Working WebSocket Sample code to retrieve LTP - Python:
is there any way to get low, high , ltp and volumes, &
this you get it in WebSocket..
@sudhakar said in Working WebSocket Sample code to retrieve LTP - Python:
market watch (best 5 bids & ask)
yes via api call.. rate limit is 1 call per seconds if I remember right..
-
@rajanprabu , Can you help with any sample code , API guide is use less,it does not have anything.
-
@sudhakar please provide us your contact details to assist you.
-
@admin and team is very helpful and they will reach out to you.
@James-Bond has compiled some nice set of instructions and codes here which you can look
https://smartapi.angelbroking.com/topic/325/faq-smart-api/5
I will write a complete page with sample scripts sometime soon..
-
@James-Bond
No I am not getting any error on code provided above.
Its working fine. -
@rajanprabu
Any idea on below error. Using google.colab -
I don't use google colab so its difficult to comment. which versions of python sdk r u using ??
-
@rajanprabu
OK..Is code is correct one ?
have used ss.connect() instead ws.connect(). Have changed it but no use at all
-
Please share which version of SDK you are using.. I can only check the code depending on that..