How to get 1st Buy (bid) and 1st (sell) ask price from depth

shivesh1987
Hi Sir,

I am doing below code. Till "buy" I am getting it. But I want to retrieve 1st buy and 1st sell price from depth

Code -

symbol='NFO:ICICIBANK21DECFUT'
f2=quoteMethod1(symbol)

#print(f2)

current=f2['NFO:ICICIBANK21DECFUT']['depth']['buy']
print (current)




output -

[{'price': 731.05, 'quantity': 1375, 'orders': 1}, {'price': 731, 'quantity': 5500, 'orders': 4}, {'price': 730.95, 'quantity': 1375, 'orders': 1}, {'price': 730.9, 'quantity': 1375, 'orders': 1}, {'price': 730.85, 'quantity': 2750, 'orders': 2}]



Now how can I get 1st price like "731.05" ?????
  • SRIJAN
    SRIJAN edited November 2021
    You should learn some python instead of asking about basic python here on the forum. Its about kite connect api,not to teach you basic python.
Sign In or Register to comment.