diff --git a/pkg/exchange/binance/exchange.go b/pkg/exchange/binance/exchange.go index 141bdf127..f755e350c 100644 --- a/pkg/exchange/binance/exchange.go +++ b/pkg/exchange/binance/exchange.go @@ -60,6 +60,11 @@ func (e *Exchange) QueryMarkets(ctx context.Context) (types.MarketMap, error) { market.MinNotional = util.MustParseFloat(f.MinNotional) } + // The LOT_SIZE filter defines the quantity (aka "lots" in auction terms) rules for a symbol. + // There are 3 parts: + // minQty defines the minimum quantity/icebergQty allowed. + // maxQty defines the maximum quantity/icebergQty allowed. + // stepSize defines the intervals that a quantity/icebergQty can be increased/decreased by. if f := symbol.LotSizeFilter() ; f != nil { market.MinLot = util.MustParseFloat(f.MinQuantity) market.MinQuantity = util.MustParseFloat(f.MinQuantity) @@ -68,9 +73,9 @@ func (e *Exchange) QueryMarkets(ctx context.Context) (types.MarketMap, error) { } if f := symbol.PriceFilter() ; f != nil { - _ = f.MaxPrice - _ = f.MinPrice - _ = f.TickSize + market.MaxPrice = util.MustParseFloat(f.MaxPrice) + market.MinPrice = util.MustParseFloat(f.MinPrice) + market.TickSize = util.MustParseFloat(f.TickSize) } markets[symbol.Symbol] = market diff --git a/pkg/types/market.go b/pkg/types/market.go index b559ea9b3..bb0447da2 100644 --- a/pkg/types/market.go +++ b/pkg/types/market.go @@ -20,6 +20,10 @@ type Market struct { MinAmount float64 MinNotional float64 MinLot float64 + + MinPrice float64 + MaxPrice float64 + TickSize float64 } func (m Market) FormatPrice(val float64) string {