Change in kite.quote behaviour

kyaboltitu
Hi, previously the response structures of kite.quote("NSE:NIFTY50") and kite.quote("NSE:INFY") used to match. This is no longer the case, and causing issues in our program. Is this an error, or a permanent change on your side. Also, if it is a permanent change, did we miss out on any communication regarding the same ?
  • rakeshr
    @kyaboltitu
    For nifty 50 index quote, you need to use kite.quote(['NSE:NIFTY 50']) or ['256265'].
  • kyaboltitu
    Sorry, that is what I meant .. ("NSE:NIFTY 50) v/s ("NSE:INFY"). Previously both returned same response structure .. however, now the response structure are different.

    NSE:NIFTY 50 Response -

    {'NSE:NIFTY 50': {'instrument_token': 256265,
    'last_price': 10923.45,
    'net_change': 70.55000000000109,
    'ohlc': {'close': 10852.9,
    'high': 10925.45,
    'low': 10876.65,
    'open': 10902.75},
    'timestamp': datetime.datetime(2018, 7, 10, 11, 52, 21)}}

    NSE:INFY Response -

    {'NSE:INFY': {'average_price': 1309.78,
    'buy_quantity': 194998,
    'depth': {'buy': [{'orders': 11, 'price': 1313.05, 'quantity': 335},
    {'orders': 9, 'price': 1313, 'quantity': 188},
    {'orders': 5, 'price': 1312.95, 'quantity': 68},
    {'orders': 1, 'price': 1312.9, 'quantity': 13},
    {'orders': 1, 'price': 1312.85, 'quantity': 13}],
    'sell': [{'orders': 9, 'price': 1313.1, 'quantity': 603},
    {'orders': 8, 'price': 1313.15, 'quantity': 112},
    {'orders': 4, 'price': 1313.2, 'quantity': 120},
    {'orders': 7, 'price': 1313.25, 'quantity': 116},
    {'orders': 6, 'price': 1313.3, 'quantity': 959}]},
    'instrument_token': 408065,
    'last_price': 1313.05,
    'last_quantity': 26,
    'last_trade_time': datetime.datetime(2018, 7, 10, 11, 53, 23),
    'net_change': 14.200000000000045,
    'ohlc': {'close': 1298.85, 'high': 1315.45, 'low': 1301.65, 'open': 1308.5},
    'oi': 0,
    'oi_day_high': 0,
    'oi_day_low': 0,
    'sell_quantity': 257940,
    'timestamp': datetime.datetime(2018, 7, 10, 11, 53, 23),
    'volume': 1272986}}
  • rakeshr
    @kyaboltitu
    Are you talking about depth not showing for Nifty index w.r.t Eq or un-arrangement of parameter?
    API response will not always be in same structure , as Json response is in the form of nested string dictionary.
  • Niyas
    @rakeshr
    For kite.quote(['NSE:NIFTY 50']), you said API response will not always be in same structure.But still yesterday it was same format.But today, is there any change?
  • kyaboltitu
    There is a change, we used to get OI, OI change fields as 0 until yesterday for Nifty 50 quotes as well. Those fields are not even being provided today in the response structure. @Niyas @rakeshr
  • Ajax
    @kyaboltitu: I have raised such concerns multiple times with kite team that they need to be professional with the APIs, atleast because its a paid service that they are providing. The least they should do is notify clients of any API contract changes. Yet, the contacts are changed on the fly and we come to know about these from our failing programs.

    They need to understand that its not a hobby project. This is a financial system and a large number of clients and money is involved.
  • rakeshr
    @Ajax @kyaboltitu
    Yeah,we had made changes and removed unnecessary fields for INDICES.We had tested same at our end, and all API clients were working fine.
  • kyaboltitu
    @rakeshr : As @Ajax mentioned, why are we not being alerted for such changes ? We are making programs which run on this. Isn't it basic communication 101 ?
  • kyaboltitu
    @rakeshr Also, what do we mean by un-necessary, they are just irrelevant - why not just maintain a standard response structure for a single function call. The communication aspect is one thing. Basically, a function call should always return a standard response structure unless really necessary.
  • rakeshr
    @kyaboltitu
    We had only removed unnecessary field like OI from index, which had no significance.
  • prakash.jj
    It may not be significant...but our code fails because of different structure for index and stocks....pls maintain same response structure for an API call...that's at least the basic framework any API framework uses...
Sign In or Register to comment.