MODE_LTP giving MODE_QUOTE

garpitg
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
    @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
    @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
    @garpitg Are you using python library?
  • garpitg
    garpitg edited August 2016
    @vivek , Yes
  • Vivek
    @garpitg I have tested this issue with this sample script and you can see that after changing the mode the output is fine.
  • garpitg
    @vivek , Strange !! What is the default mode ?
  • garpitg
    Ok..ok.. Got it !! Ignore this thread !! You can close it !!
  • soumyadeep
    Hi @garpitg can you please let us know what the problem was before closing the thread? Will help the community.
  • garpitg
    @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
    @garpitg Yeah the default mode is MODE_QUOTE.
This discussion has been closed.