ticker mode is always quote

vivekvs
dear,

in node js , i am getting ticker mode is always quote. i tried the following

ticker.setMode('full', [instrumentToken]);

ticker.setMode(ticker.modeFull, [instrumentToken]);

still i am not able to get market depth . kindly help
  • vivekvs
    y no reply
  • sujith
    You can enable debug logs and check. We don't have any issue with Websocket API subscription and set mode. It is being used on all our apps and other Kite Connect apps that are in production.
  • vivekvs
    let a= ticker.setMode('full', [instrumentToken]);


    ticker.setMode(ticker.modeFull, [instrumentToken]); these are the two codes i used for that . kindly help
  • sujith
    You need to subscribe first and then set mode. Are you sure you are doing the same?
  • vivekvs
    yes. this is my function . kindly help function subscribe() {

    //console.log(global.instrumentsForMining.map(i=>i.tradingsymbol));

    try {
    const instrumentToken = global.instrumentsForMining.map(i=>parseInt(i.instrument_token));
    ticker.unsubscribe([]);







    ticker.subscribe(instrumentToken);






    ticker.setMode(ticker.modeFull, [instrumentToken]);



    } catch (error) {
    console.error(`Error subscribing to ${global.instrumentData.name}:`, error);
    }
    }.




    and this is the sample tick


    { "tradable": true, "mode": "quote", "instrument_token": 9348354, "last_price": 235.85, "last_traded_quantity": 100, "average_traded_price": 214.08, "volume_traded": 188750, "total_buy_quantity": 64100, "total_sell_quantity": 47650, "ohlc": { "open": 192.05, "high": 239, "low": 183.2, "close": 191.35 }, "change": 23.255813953488374 }
  • sujith
    You need to wait till the subscription is acknowledged by the Kite Ticker. One way to do it is wait for the first tick in the on_tick and set mode there or add some delay between subscription message and set mode message.
  • vivekvs
    i tried both the ways still the mode is 'quote' .pls help
  • vivekvs
    hi bro pls help
  • sujith
    @vivekvs,
    Kite Connect is purely an execution platform. We don't provide support for coding. You can hire some freelancer on the forum who can do the job for you.
  • vivekvs
    bro , i am not getting full mode quote . dont be arrogant . if u cant fix it tell me that instead of teaching me coding . i may assume that u dont know how to fix this or point me the issue
Sign In or Register to comment.