Unable to get Full Market Depth

I am trying to subscribe to Symbols with Full Market Depth I am not getting any Info over Socket.
but If i subscribe to Symbols with LTP I am getting info Over Socket.
End Point : wss://ws.kite.trade
{"a": "mode","v": ["full",[738561, 5633]]} is not working, I am not getting any Data Over Socket
{"a": "subscribe", "v": [738561, 5633]} is working fine,

Please look into this and Let me Know If I am doing anything Wrong

Note : I am coding with Python but not using Kite Python Lib. I coded my Own Using API Document
  • lazydragonfist
    And One More thing, I see I will be able to subscribe upto 1000 per Socket,
    Are we still able to Open Three Sockets at a Time ?
  • sujith
    The packet format has changed with the new websockets API. Now full mode will have a timestamp with the tick. You can take a look at new packet structure.
    You can subscribe for up to 2000 instruments now. You can use three websocket connection per Kite Connect app.
    We will update documentation.
  • lazydragonfist
    Yes, I saw Structure and New Info but I am not getting Any Info expect heartbeat (It keep Connection Live)
  • sujith
    Can you paste the code here?
  • lazydragonfist
    lazydragonfist edited May 2018
    url = "wss://ws.kite.trade?api_key=" + KiteAPIKey + "&access_token=" + Kite_access_token
    ws = websocket.WebSocket()
    subscript = '{"a": "mode", "v": ["full", [738561, 56332]]}'
    while(MarketHrs == True):
    data = ws.recv()

    Please Ignore Symbol IDs I am sending Correct One, To make code simple I added two IDs,
  • sujith
    After calling connect you need to wait till onConnected callback is called and inside that you need to subscribe and then setMode.
  • sujith
    Make sure you subscribe and then set mode not the other way around.
  • lazydragonfist
    As I told you I am not using an Kite Libs,
    I am using Python and Build My Own Lib using Documentation V3,
    I am able to get {"a": "subscribe", "v": [738561, 5633]}
    but not Full Data,

    I am already experienced in Kite V1 API and using it and Developing it from 1 Year,
    So Please look into it and let me know If the Code or any thing I am missing.
  • lazydragonfist
    And some time I am getting 403 Error in Websocket
  • lazydragonfist
    I think if a New Public_key is Generated then Old One won't work even for Web Socket. It Used work Fine Before in V1
  • sujith
    I am not referring to any of the Kite Connect clients. I am talking about Kite Ticker's behavior. You can't set mode without subscribing for a token.
    I have tested it at our end and it seems to be working fine.
    Yes, you need a valid access token to connect to new Kite Ticker.
  • lazydragonfist
    Yes, I am Subscribing for Tokens
    To Get Full Market Data I am using
    {"a": "mode","v": ["full",[738561, 5633]]} which is not working, I am not getting any Data Over Socket

    When Subscribing using this
    {"a": "subscribe", "v": [738561, 5633]} is working fine,
  • sujith
    You need to subscribe and then only set mode.
  • lazydragonfist
    O! Ok, You mean I need to Subscribe with {"a": "subscribe", "v": [738561, 5633]}
    and send {"a": "mode","v": ["full",[738561, 5633]]} to set Mode and Get Full Market Depth Right ?
  • lazydragonfist
    Now I am getting this Error

    {"type":"error","data":"Can't subscribe to more than 500 instruments."}

    I said 1000 Per Socket and 3 Sockets are Allowed. That Makes 3000 No ?
  • lazydragonfist
    My getting Full Market Depth Issues Seems Solved. But Now I am not able to Subscribe more than 500 instruments
Sign In or Register to comment.