onOrderUpdate function, will this function will receive as soon order got fulfilled / cancelled ? I am planning to write some code like below for e.g:
// is it like once the order is executed, the order update is triggered & will receive the order details per below func onOrderUpdate(order kiteconnect.Order) { fmt.Printf("Order: %s", order.OrderID) if order.Status == "CANCELLED" && order.TransactionType == "BUY" {
// do something } if order.Status == "COMPLETE" && order.TransactionType == "BUY" { // do something } if order.Status == "COMPLETE" && order.TransactionType == "SELL" { // do something }
}
BCoz when i ran above code in real market , the onOrderUpdate function didn't call. I am confused.
onOrderUpdate
properly. Go through the nodejs websocket example here.