Hi, Being new with Python (though pretty good at C) I am stuck as I am unable to extract the price value from the response received from kite.ltp
I use >>> cmp=kite.ltp("NFO:NIFTY18JUNFUT") >>> cmp {'NFO:NIFTY18JUNFUT': {'instrument_token': 12374274, 'last_price': 10711.9}}
How do I (what code would do the job) extract the last_price value from this response into a float type variable say price? so that i can use it like if (price > 10000) etc.
I am facing same issue in extracting the Order Status from the Big Response received with
StockName1="NFO:NIFTY18JUNFUT"
LTP=kite.ltp(StockName1).get(StockName1,"").get("last_price","")
print (LTP)