.MODE_FULL not giving market depth data

AAAAAAAAAA
AAAAAAAAAA edited June 15 in Python client
    
def on_connect(ws, response):
ws.subscribe(tokens)
ws.set_mode(ws.MODE_FULL, tokens)


t = []

def on_ticks(ws, ticks):
t.append(ticks)


# as per situations, subscribe to new tokens

ws.subscribe(tokens)

I am not seeing market depth in the ticker data that comes. Still getting tickers that still have mode as "quote".

Expected depth as in this page - https://kite.trade/docs/connect/v3/market-quotes/#:~:text=depth": { "buy": [
  • Nivas
    You may refer to the similar discussion here.
  • AAAAAAAAAA
    I see, is there a parameter in ws.subscribe that would allow me to get full quote? I couldnt find one in the docs. If there's no parameter, how can i get the full quote? Thanks
  • AAAAAAAAAA
    @rakeshr is there no parameter in subscribe method to allow me to subscribe to any token to get full quotes?
  • Nivas
    You may refer to the example code here and setup the websocket.
  • AAAAAAAAAA
    AAAAAAAAAA edited 12:39PM
    @Nivas I have all that set up. Is there no way to use the .MODE_FULL setting from on_connect to subscribe method?

    @sujith @rakeshr Please help.

    There are initial tokens I sub to that get FULL quote but later ones using ws.subscribe() do not. How to fix this.

    edit -

    As per this link- https://kite.trade/forum/discussion/4875/web-socket-dynamic-subscription#:~:text=Do you have any specific condition to,,token/list of token)

    Do I have to specify the conditions in on_connect? As you can see from the code, the conditions are defined in on_ticks and thats also where I call the ws.subscribe. My on_connect is simple as shown as is, with the initial instruments being passed in the tokens?

    But on_connect is just called once so I am not sure how to go about it. Kindly help!
Sign In or Register to comment.