grid2: improve log

This commit is contained in:
c9s 2022-12-06 15:45:28 +08:00
parent 0cf43ffb11
commit 47759236e0

View File

@ -363,7 +363,7 @@ func (s *Strategy) handleOrderFilled(o types.Order) {
Tag: "grid", Tag: "grid",
} }
s.logger.Infof("SUBMIT ORDER: %s", orderForm.String()) s.logger.Infof("SUBMIT GRID REVERSE ORDER: %s", orderForm.String())
if createdOrders, err := s.orderExecutor.SubmitOrders(context.Background(), orderForm); err != nil { if createdOrders, err := s.orderExecutor.SubmitOrders(context.Background(), orderForm); err != nil {
s.logger.WithError(err).Errorf("can not submit arbitrage order") s.logger.WithError(err).Errorf("can not submit arbitrage order")
@ -372,13 +372,6 @@ func (s *Strategy) handleOrderFilled(o types.Order) {
} }
} }
type InvestmentBudget struct {
baseInvestment fixedpoint.Value
quoteInvestment fixedpoint.Value
baseBalance fixedpoint.Value
quoteBalance fixedpoint.Value
}
func (s *Strategy) checkRequiredInvestmentByQuantity(baseBalance, quoteBalance, quantity, lastPrice fixedpoint.Value, pins []Pin) (requiredBase, requiredQuote fixedpoint.Value, err error) { func (s *Strategy) checkRequiredInvestmentByQuantity(baseBalance, quoteBalance, quantity, lastPrice fixedpoint.Value, pins []Pin) (requiredBase, requiredQuote fixedpoint.Value, err error) {
// check more investment budget details // check more investment budget details
requiredBase = fixedpoint.Zero requiredBase = fixedpoint.Zero