Hi Jan,
I recently bump into an exception while using the CancelFuturesOrderByClientOrderIdAsync method on IFuturesOrderClientIdRestClient
Below is the stack trace, but unfortunately, I didn't collect the exchange with the place.
Looking into the code, I suspect that is because CoinEx responded with a null Data, and the line
return order.AsExchangeResult(Exchange, request.Symbol!.TradingMode, new SharedId(order.Data.FirstOrDefault()?.Data?.Id.ToString() ?? request.OrderId));
crashed on the FirstOrDefault.
Maybe you could protect the code for this case ?
In any way, this is not a hurry for me.
Thanks for all your efforts.
Eric
System.ArgumentNullException: Value cannot be null. (Parameter 'source') at
System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument) + 0x34 at
System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1, Boolean&) + 0x20 at
CoinEx.Net.Clients.FuturesApi.CoinExRestClientFuturesApi.<CryptoExchange-Net-SharedApis-IFuturesOrderClientIdRestClient-CancelFuturesOrderByClientOrderIdAsync>d__123.MoveNext() + 0x1ea
Hi Jan,
I recently bump into an exception while using the
CancelFuturesOrderByClientOrderIdAsyncmethod onIFuturesOrderClientIdRestClientBelow is the stack trace, but unfortunately, I didn't collect the exchange with the place.
Looking into the code, I suspect that is because CoinEx responded with a
nullData, and the linereturn order.AsExchangeResult(Exchange, request.Symbol!.TradingMode, new SharedId(order.Data.FirstOrDefault()?.Data?.Id.ToString() ?? request.OrderId));crashed on the
FirstOrDefault.Maybe you could protect the code for this case ?
In any way, this is not a hurry for me.
Thanks for all your efforts.
Eric