Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NOTIONAL Order filter type not implemented! #29

Open
adacaccia opened this issue Apr 23, 2024 · 2 comments
Open

NOTIONAL Order filter type not implemented! #29

adacaccia opened this issue Apr 23, 2024 · 2 comments

Comments

@adacaccia
Copy link

Hello, the followig code snippet demonstrates there's another filter tyoe, not currently implemented:

exchangeInfo, err := anonClient.NewExchangeInfoService().Do(context.Background()).
     ...
for _, s := range exchangeInfo.Symbols {
	if s.Symbol == symbol {
		baseAsset = s.BaseAsset
		quoteAsset = s.QuoteAsset
		// Rileviamo i valori di interesse dai filtri maledetti
		for _, f := range s.Filters {
			if f.FilterType == "LOT_SIZE" {
				minQty, err = strconv.ParseFloat(f.MinQty, 64)
				CheckErr(err)
				maxQty, err = strconv.ParseFloat(f.MaxQty, 64)
				CheckErr(err)
				stepSize, err = strconv.ParseFloat(f.StepSize, 64)
				CheckErr(err)
			}
			if f.FilterType == "MIN_NOTIONAL" {
				minNotional, err = strconv.ParseFloat(f.MinNotional, 64)
				CheckErr(err)
			}
			if f.FilterType == "NOTIONAL" {
				log.Fatalf("Encontered NOTIONAL filter: not in binance-connector-go!")
				//					notional, err = strconv.ParseFloat(f.Notional, 64)
				//					CheckErr(err)
			}
		}
		break
	}
}

And in the log, you read at each call:

2024/04/23 15:23:19 Encontered NOTIONAL filter: not in binance-connector-go!

The commented line:

				//					notional, err = strconv.ParseFloat(f.Notional, 64)

generates a compile time error of "binance_connector.FilterType has no field 'Notional'"

So how to handle NOTIONAL filter errors on both BUY and SELL orders from time to time?
Thanks!

@adacaccia
Copy link
Author

Here's the exact error I get:

panic: code=-1013, msg=Filter failure: NOTIONAL

@alplabin
Copy link
Contributor

alplabin commented Aug 1, 2024

Hey,
The NOTIONAL filter includes the following parameters:

  • minNotional
  • applyMinToMarket
  • maxNotional
  • applyMaxToMarket
  • avgPriceMins

However, there shouldn't be any Notional parameters listed under the NOTIONAL filter type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants