Skip to content

Commit

Permalink
change max borrowable query from error to warn
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Jan 7, 2024
1 parent b7a397b commit ad8ea86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/bbgo/order_executor_general.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,15 @@ func (e *GeneralOrderExecutor) updateMarginAssetMaxBorrowable(
) {
maxBorrowable, err := marginService.QueryMarginAssetMaxBorrowable(ctx, market.BaseCurrency)
if err != nil {
log.WithError(err).Errorf("can not query margin base asset %s max borrowable", market.BaseCurrency)
log.WithError(err).Warnf("can not query margin base asset %s max borrowable", market.BaseCurrency)
} else {
log.Infof("updating margin base asset %s max borrowable amount: %f", market.BaseCurrency, maxBorrowable.Float64())
e.marginBaseMaxBorrowable = maxBorrowable
}

maxBorrowable, err = marginService.QueryMarginAssetMaxBorrowable(ctx, market.QuoteCurrency)
if err != nil {
log.WithError(err).Errorf("can not query margin quote asset %s max borrowable", market.QuoteCurrency)
log.WithError(err).Warnf("can not query margin quote asset %s max borrowable", market.QuoteCurrency)
} else {
log.Infof("updating margin quote asset %s max borrowable amount: %f", market.QuoteCurrency, maxBorrowable.Float64())
e.marginQuoteMaxBorrowable = maxBorrowable
Expand Down

0 comments on commit ad8ea86

Please sign in to comment.