I think I may have solved the issue:
So far it seems to be working properly without any double trades.
I added a small delay after the method does the trade.
public async Task<OrderResponse> StopOrderSell(StopOrders order)
{
OrderResponse response;
try
{
response = await coinbaseProClient.OrdersService.PlaceStopOrderAsync
(
OrderSide.Sell,
ProductType.BtcUsd,
order.CryptoAmount,
order.LimitPrice,
order.StopPrice
);
await Task.Delay(500);
return response;
}
catch (Exception)
{
throw;
}
return response;
}