when Executing the following code
'''
NewOrderRequest newOrderRequestStop = new NewOrderRequest("BTC-PERPETUAL", dirStop);
// newOrderRequest.Price = 45000;
newOrderRequestStop.OrderType = OrderType.StopMarket;
newOrderRequestStop.Quantity = 1000;
newOrderRequestStop.Label = "Testing From the bot";
newOrderRequestStop.StopPrice = 42000;
newOrderRequestStop.StopTrigger = StopTrigger.LastPrice;
OrderOperationResponse orderOperationResponseStop = await deribitApi.Send(newOrderRequestStop);
if (!orderOperationResponseStop.Succeeded) {
Concole.WriteLine("Error " + orderOperationResponseStop.Error.Code + " " + orderOperationResponseStop.Error.Message + " " + orderOperationResponseStop.Error.Data);
} else {
Concole.WriteLine((orderOperationResponse.ToString());
}
'''
I get the following exception

when I remove this line
''' newOrderRequestStop.StopTrigger = StopTrigger.LastPrice;'''
everything seems fine
when Executing the following code
'''
'''
I get the following exception
when I remove this line
''' newOrderRequestStop.StopTrigger = StopTrigger.LastPrice;'''
everything seems fine