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
static async Task Main(string[] args)
{
Console.WriteLine("Hello World!");
var apikey = "<>";
var apisecret = "<>";
var user = new BinanceApiUser(apikey, apisecret);
var api = new BinanceApi();
//var sth = await api.GetOrderBookTopsAsync(); // this will fail!
var sth2 = await api.GetOrderBookTopAsync("ETHBTC");
var sth3 = await api.GetOrderBookAsync("ETHBTC", 10);
Console.WriteLine("End");
Console.ReadKey();
}
The first line var sth = await api.GetOrderBookTopsAsync(); will crash the program with error:
Binance.BinanceApiException
HResult=0x80131500
Message=BinanceApi.GetOrderBookTopsAsync failed to parse JSON api response: "
...
Inner Exception 1:
ArgumentException: OrderBookTop ask price must be greater than the bid price. (Parameter 'Price')
It's about the AskPrice, some symbols that which in BREAK mode comes with zero AskPrice. Then in constructor of OrderBookTop it throws that Exception because BidPrice is not zero and AskPrice is zero. I guess API v1's behavior is changed.
Using
.Net Core 3.1
console app:The first line
var sth = await api.GetOrderBookTopsAsync();
will crash the program with error:error_details.txt
binance
0.2.0-beta902
The text was updated successfully, but these errors were encountered: