show symbol name in the order submit message

This commit is contained in:
c9s 2020-08-06 14:21:01 +08:00
parent cb2ee2d502
commit 0fffc379fc

View File

@ -279,11 +279,11 @@ func (trader *Trader) ReportPnL() {
}
func (trader *Trader) SubmitOrder(ctx context.Context, order *types.Order) {
trader.Notifier.Notify(":memo: Submitting %s order on side %s with volume: %s", order.Type, order.Side, order.VolumeStr, order.SlackAttachment())
trader.Notifier.Notify(":memo: Submitting %s %s %s order with quantity: %s", order.Symbol, order.Type, order.Side, order.VolumeStr, order)
err := trader.Exchange.SubmitOrder(ctx, order)
if err != nil {
log.WithError(err).Errorf("order create error: side %s volume: %s", order.Side, order.VolumeStr)
log.WithError(err).Errorf("order create error: side %s quantity: %s", order.Side, order.VolumeStr)
return
}
}