unable to compare with interger or float

the output I am getting from kite.ltp(['NSE:NIFTY 50']), I am unable to compare it with an integer or float value. Can you help me out
I tried using values() function but again the output is in dict format
  • sujith
    You can check out response format here.
    The response is more like a map which has a key-value pair.
  • mayura
    hi sujith
    thanks for replying

    I want to use the attribute "last_price" which the documentation says is in float format, then how should I use it in python?
  • rakeshr
    Last_price attribute is float value.You can compare it as below:
    quote_nifty=kite.quote('NSE:NIFTY 50')
    last_price = quote_nifty['NSE:NIFTY 50']['last_price']
    if(comparision of last_price(float value) ):
  • mayura
    Thanks a million times bro...you made my day
This discussion has been closed.