☰
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.1K
All Categories
0
Incidents
158
Node JS client
43
Go client
801
.Net API client
386
Kite Publisher
538
.Net / VBA / Excel (3rd party)
465
Algorithms and Strategies
1K
Java client
1.1K
API clients
408
PHP client
4.1K
Python client
349
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.4K
General
In this Discussion
August 2020
sujith
using sleep in on_ticks - getting "ERROR Connection error: 1006 - ..."
rajagopal
August 2020
in
Market data (WebSockets)
I am using the below code to insert tick to DB. every 3 sec and then sleep. I keep getting
2020-08-20 09:25:58,125 kiteconnect.ticker: ERROR Connection error: 1006 - connection was closed uncleanly (None)
def on_ticks(ws, ticks):
# Callback to receive ticks.
# process the tick and insert into DB
time.sleep(3)
def on_close(ws, code, reason):
now = datetime.now()
marketclosetime = now.replace(hour=15, minute=30, second=0, microsecond=0)
if now > marketclosetime:
ws.stop()
Tagged:
Python Client
WebSocket
sujith
August 2020
You can refer to FAQs
here
.
Sign In
or
Register
to comment.