It looks like you're new here. If you want to get involved, click one of these buttons!
def fetchPrice(orderId):
logging.info('Fetching order price %s', orderId)
kite = getKite()
try:
price = kite.order_history(order_id=orderId)[(len(kite.order_history(order_id=orderId)))-1]['average_price']
logging.info('Order status fetched for orderId = %s price = %s', orderId, price)
return price
except Exception as e:
logging.info('Order status fetch failed: %s', e.message)