☰
Login
Signup
Home
›
Market data (WebSockets)
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Categories
Recent Discussions
Activity
Categories
14K
All Categories
0
Incidents
157
Node JS client
40
Go client
794
.Net API client
383
Kite Publisher
537
.Net / VBA / Excel (3rd party)
462
Algorithms and Strategies
1K
Java client
1.1K
API clients
406
PHP client
4.1K
Python client
349
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.4K
General
ReactorNotRestartable
ravidparikh92
November 2018
in
Market data (WebSockets)
I am beggining to learn kiteconnect and was trying out the exampled codes given on github...however i am facing the
ReactorNotRestartable error.
Below is my code I have mentioned the error I get in comments
logging.basicConfig(level=logging.DEBUG)
kws_1=KiteTicker(api_key,access_token)
def on_ticks(ws, ticks):
logging.debug("Ticks: {}".format(ticks))
def on_connect(ws, response):
ws.subscribe([738561, 5633])
ws.set_mode(ws.MODE_FULL, [738561])
def on_close(ws, code, reason):
ws.stop()
# Assign the callbacks.
kws_1.on_ticks = on_ticks
kws_1.on_connect = on_connect
kws_1.on_close = on_close
# Infinite loop on the main thread. Nothing after this will run.
# You have to use the pre-defined callbacks to manage subscriptions.
kws_1.connect()
Sign In
or
Register
to comment.