You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi.
I wrote some programm, it works for me on win10 and VS2017. But my friend can't launch it. He uses win10 and VS2017 too. When i use something like this,
var res = api.PlaceAsync(new LimitOrder(user)
{
Symbol = Symbol.BTC_USDT,
Side = OrderSide.Buy,
Quantity = 0.0001m,
Price = 11500
}).Result;
I fails with exception:
Inner Exception 1:
BinanceHttpException: [BadRequest]: 'Bad Request' - Illegal characters found in parameter 'quantity'; legal range is '^([0-9]{1,20})(\.[0-9]{1,20})?$'. (-1100)
What could it be? Thanks!
The text was updated successfully, but these errors were encountered:
I'm trying to run it on Win8 and VS2017 and I have the same problem. I start debugging and found some difference in request parameters:
This is my request and it works.
And it fails. The reason was in quantity=0,0001. The problem was in ",". And I replace request.AddParameter("quantity", quantity);
to request.AddParameter("quantity", quantity.ToString().Replace(",", "."));
The issue is the decimal to string conversion with ToString() that uses CurrentCulture.NumberFormat with a NumberDecimalSeparator property value of "," rather than "." depending upon location. I'll specify CultureInfo.InvariantCulture (which uses ".") in the decimal to string conversion to fix this. Thanks.
Hi.
I wrote some programm, it works for me on win10 and VS2017. But my friend can't launch it. He uses win10 and VS2017 too. When i use something like this,
I fails with exception:
What could it be? Thanks!
The text was updated successfully, but these errors were encountered: