☰
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
405
PHP client
4K
Python client
349
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.4K
General
In this Discussion
November 2016
ahsan
November 2016
sujith
Ticks for two stocks or indexes
ahsan
November 2016
in
Market data (WebSockets)
def on_tick(tick, ws):
print tick
# Callback for successful connection.
def on_connect(ws):
# Subscribe to a list of instrument_tokens (RELIANCE and ACC here).
ws.subscribe([738561, 5633])
# Set RELIANCE to tick in `full` mode.
ws.set_mode(ws.MODE_FULL, [738561])
#------------------------------------------------------------------------------------
Q: How can I get for both RELIANCE and ACC ? If I changed as
ws.set_mode(ws.MODE_FULL, [738561, 5633]])
then only getting tick for RELIANCE.
Please suggest me to get tick for both stocks.
Thanks
Ahsan
sujith
November 2016
Hi
@ahsan
,
You will get data, enable logging and check.
Enable debug logging like this,
import logging
logging.basicConfig(level=logging.DEBUG)
ahsan
November 2016
thanks
This discussion has been closed.
You will get data, enable logging and check.
Enable debug logging like this,
import logging
logging.basicConfig(level=logging.DEBUG)