☰
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
14.5K
All Categories
0
Incidents
171
Node JS client
48
Go client
819
.Net API client
393
Kite Publisher
542
.Net / VBA / Excel (3rd party)
476
Algorithms and Strategies
1K
Java client
1.2K
API clients
408
PHP client
4.2K
Python client
354
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.5K
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.