change max borrowable query from error to warn

This commit is contained in:
c9s 2024-01-07 19:08:54 +08:00
parent b7a397bb4b
commit ad8ea86173
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -125,7 +125,7 @@ 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
@ -133,7 +133,7 @@ func (e *GeneralOrderExecutor) updateMarginAssetMaxBorrowable(
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