binance: fix futures not emit filled event

This commit is contained in:
ankion 2022-08-11 10:35:36 +08:00
parent d31b812471
commit 68a65f1913

View File

@ -268,6 +268,17 @@ func (s *Stream) handleOrderTradeUpdateEvent(e *OrderTradeUpdateEvent) {
s.EmitTradeUpdate(*trade)
order, err := e.OrderFutures()
if err != nil {
log.WithError(err).Error("futures order convert error")
return
}
// Update Order with FILLED event
if order.Status == types.OrderStatusFilled {
s.EmitOrderUpdate(*order)
}
case "CALCULATED - Liquidation Execution":
log.Infof("CALCULATED - Liquidation Execution not support yet.")
}