☰
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
13.8K
All Categories
0
Incidents
154
Node JS client
40
Go client
793
.Net API client
378
Kite Publisher
537
.Net / VBA / Excel (3rd party)
457
Algorithms and Strategies
993
Java client
1.1K
API clients
404
PHP client
4K
Python client
346
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.3K
General
In this Discussion
August 2016
soumyadeep
August 2016
garpitg
August 2016
Vivek
MODE_LTP giving MODE_QUOTE
garpitg
August 2016
in
Market data (WebSockets)
Hi, I am using python client and subscribing a stock using MODE_LTP (I should get 8bytes) but I am getting MODE_QUOTE (44 bytes) please have a look.
Vivek
August 2016
@garpitg
We have tested now and it works as intended. I think you are not setting the mode properly. Please refer docs for examples.
garpitg
August 2016
@vivek
Please have a look
08/11/2016 14:20:48,[{'last_price': 1244.85, 'volume': 2453079, 'sell_quantity': 157808, 'last_quantity': 29, 'change': -1.7792330755878318, 'average_price': 1245.34, 'ohlc': {'high': 1265.0, 'close': 1267.4, 'open': 1265.0, 'low': 1236.1}, 'depth': {'sell': [], 'buy': []}, 'mode': 'quote', 'tradeable': True, 'buy_quantity': 123662, 'instrument_token': 3050241}]
08/11/2016 14:20:49,on_error <=== Changed MODE_QUOTE to MODE_LTP
08/11/2016 14:20:49,on_close
08/11/2016 14:21:10,[{'last_price': 1244.85, 'volume': 2455275, 'sell_quantity': 156103, 'last_quantity': 3, 'change': -1.7792330755878318, 'average_price': 1245.34, 'ohlc': {'high': 1265.0, 'close': 1267.4, 'open': 1265.0, 'low': 1236.1}, 'depth': {'sell': [], 'buy': []}, 'mode': 'quote', 'tradeable': True, 'buy_quantity': 125423, 'instrument_token': 3050241}]
08/11/2016 14:20:48 ==> MODE_QUOTE
08/11/2016 14:21:10 ==> MODE_LTP
I may be overlooking something but I am not able to differentiate in both the tick data. Please help.
Vivek
August 2016
@garpitg
Are you using python library?
garpitg
August 2016
edited August 2016
@vivek
, Yes
Vivek
August 2016
@garpitg
I have tested this issue with
this sample script
and you can see that after changing the mode the output is fine.
garpitg
August 2016
@vivek
, Strange !! What is the default mode ?
garpitg
August 2016
Ok..ok.. Got it !! Ignore this thread !! You can close it !!
soumyadeep
August 2016
Hi
@garpitg
can you please let us know what the problem was before closing the thread? Will help the community.
garpitg
August 2016
@soumyadeep
set_mode() takes list of instruments and I was passing just the number and since the default mode is QUOTE, I was getting 44 bytes.
Vivek
August 2016
@garpitg
Yeah the default mode is
MODE_QUOTE
.
This discussion has been closed.
08/11/2016 14:20:48,[{'last_price': 1244.85, 'volume': 2453079, 'sell_quantity': 157808, 'last_quantity': 29, 'change': -1.7792330755878318, 'average_price': 1245.34, 'ohlc': {'high': 1265.0, 'close': 1267.4, 'open': 1265.0, 'low': 1236.1}, 'depth': {'sell': [], 'buy': []}, 'mode': 'quote', 'tradeable': True, 'buy_quantity': 123662, 'instrument_token': 3050241}]
08/11/2016 14:20:49,on_error <=== Changed MODE_QUOTE to MODE_LTP
08/11/2016 14:20:49,on_close
08/11/2016 14:21:10,[{'last_price': 1244.85, 'volume': 2455275, 'sell_quantity': 156103, 'last_quantity': 3, 'change': -1.7792330755878318, 'average_price': 1245.34, 'ohlc': {'high': 1265.0, 'close': 1267.4, 'open': 1265.0, 'low': 1236.1}, 'depth': {'sell': [], 'buy': []}, 'mode': 'quote', 'tradeable': True, 'buy_quantity': 125423, 'instrument_token': 3050241}]
08/11/2016 14:20:48 ==> MODE_QUOTE
08/11/2016 14:21:10 ==> MODE_LTP
I may be overlooking something but I am not able to differentiate in both the tick data. Please help.
MODE_QUOTE
.