morpheums / Binance.API.Csharp.Client

C#.NET client for Binance Exchange API.
MIT License
140 stars 87 forks source link

MIN_NOTIONAL Error on Post new order (MARKET) #69

Open H-Moradof opened 4 years ago

H-Moradof commented 4 years ago

when I try to post new order on market sometimes I've got MIN_NOTIONAL error. according to my researches, it's because of the Binance trading rules, but I didn't find a way to handle it.

my website is a cryptocurrency shop and when a customer buys for example Bitcoin, I post new BUY BTCUSDT order (Market)

var taskResult = Task.Run(() => binanceClient.PostNewOrder("BTCUSDT", quantity, 0m, OrderSide.BUY, OrderType.MARKET));

H-Moradof commented 4 years ago

I found this API that returns average of trades in the last 5 minutes (https://api.binance.com/api/v3/avgPrice?symbol=BNBUSDT)

But the point is We don't send price when we post order on Market. It must get from market!

So what can I control it ?

H-Moradof commented 4 years ago

I found this is Binance GitHub page (https://github.com/binance-exchange/binance-official-api-docs/blob/master/errors.md): "Filter failure: MIN_NOTIONAL" price * quantity is too low to be a valid order for the symbol.

We Can't control market price, So It seems we can control the quantity

Is it right?