full mode misses last traded time

chaklin
Hi i am getting missing fields in ticker for full mode:sample below,. This is happening very frequently:
{'tradable': True, 'mode': 'quote', 'instrument_token': 3520257, 'last_price': 4955.85, 'last_quantity': 3, 'average_price': 4982.03, 'volume': 80848, 'buy_quantity': 43915, 'sell_quantity': 54541, 'ohlc': {'open': 4951.1, 'high': 5010.65, 'low': 4933.0, 'close': 4945.2}, 'change': 0.2153603494297611}
Tagged:
  • sujith
    The response itself says it is quote mode. You need to wait for the next tick if you have changed the mode.
  • chaklin
    Looks like the system is automatically changing to quote mode because I am connecting with full mode on daily basis. Is this a bug?
    I never change my mode. I observed this when I started getting runtime errors as I have fixed the fields that I need to receive and process.
    Also i am not making any 'quote' call anywhere as tickers are active
    below is my code.


    def on_connect(ws, response):
    tickerlog.info("Successfully connected. Response: {} {}".format(response,len(instrument_tokens)))
    if len(instrument_tokens) > 0:
    ws.subscribe(instrument_tokens)
    ws.set_mode(ws.MODE_FULL, instrument_tokens)
    tickerlog.info("Subscribe to tokens in Full mode: {}".format(instrument_tokens))
  • chaklin
    tagging @sujith in case above ask is missed.
  • chaklin
    Hi @sujith some more input. ws connection keeps on closing and reconnecting in two three minutes. hoping it is not connecting in quote mode by default as I am not using any custom reconnect.

    08-Mar-21 09:26:12 - kiteconnect.ticker - ERROR - Connection error: 1006 - connection was closed uncleanly (None)
    08-Mar-21 09:26:12 - ticker - INFO - Connection error: 1006 - connection was closed uncleanly (None)
    08-Mar-21 09:26:12 - kiteconnect.ticker - ERROR - Connection closed: 1006 - connection was closed uncleanly (None)
    08-Mar-21 09:26:12 - ticker - INFO - Connection closed: 1006 - connection was closed uncleanly (None)
    08-Mar-21 09:26:15 - ticker - INFO - Successfully connected. Response: {"peer": "tcp4::443", "headers": {"date": "Mon, 08 Mar 2021 03:56:15 GMT", "connection": "upgrade", "upgrade": "websocket", "sec-websocket-accept": ""}, "version": 18, "protocol": null, "extensions": []} 142

  • rakeshr
    @chaklin
    ws.subscribe(instrument_tokens)
    While subscription of instrument token, default mode is set as Quote. You can check required assignment code here.
    ws.set_mode(ws.MODE_FULL, instrument_tokens)
    Then immediately, your requested mode is set. You can check the code here.
    ws connection keeps on closing and reconnecting in two three minutes. hoping it is not connecting in quote mode by default as I am not using any custom reconnect.
    And, while re-connection(after error), it by default resubscribes to your requested mode(here FULL_MODE). You can check the required code here.
Sign In or Register to comment.