javascript api always subscribe to quote mode not full mode

soni000000000
If i subscribe to full mode still i am getting 44 byte of data.
  • sujith
    Can you paste your code?
  • soni000000000
    var ticker = new KiteTicker("xxxx", "ZO7692", "xxxx");
    var items=[53471239,53710343,53727751,53710087,53737223,53556743,53781767,53711111];
    ticker.connect();
    ticker.on("tick", onTick);
    ticker.on("connect", onConnect);

    function onTick(ticks) {
    $.each( ticks, function( key, value ) {
    console.log(value);
    });
    };

    function onConnect() {
    ticker.subscribe(items);
    ticker.setMode(ticker.modeFull, [items]);
    }
  • soni000000000
    Output by console.log
    {mode: "quote", tradeable: true, Token: 53471239, LastTradedPrice: 39208, LastTradeQuantity: 1, …}
    AverageTradePrice
    :
    39216.68
    ClosePrice
    :
    39353
    Depth
    :
    {buy: Array(0), sell: Array(0)}
    HighPrice
    :
    39280
    LastTradeQuantity
    :
    1
    LastTradedPrice
    :
    39208
    LowPrice
    :
    39198
    NetPriceChangeFromClosingPrice
    :
    -0.36845983787767134
    OpenPrice
    :
    39280
    Token
    :
    53471239
    TotalBuyQuantity
    :
    524
    TotalSellQuantity
    :
    708
    VolumeTradedToday
    :
    885
    mode
    :
    "quote"
    tradeable
    :
    true



    For every trade depth is zero. Also response length is always 44 byte which is for quote mode.
  • sujith
    You seem to be using an old version of kiteconnectjs. You can upgrade to the latest version and try again.
    You can check out new syntax here.
Sign In or Register to comment.