Esempio n. 1
0
 private async Task OnWebSocketOrderReceivedAsync(object sender,
                                                  GdaxWssOrderReceived order)
 {
     await _tradeHandler.Handle(new ExecutionReport(new Instrument(Name, order.ProductId),
                                                    order.Time, order.Price ?? 0, order.Size,
                                                    order.Side == GdaxOrderSide.Buy ? TradeType.Buy : TradeType.Sell,
                                                    order.OrderId.ToString(), OrderExecutionStatus.New));
 }
Esempio n. 2
0
 private async Task OnWebSocketOrderReceivedAsync(object sender, GdaxWssOrderReceived order)
 {
     await HandleOrderEventAsync(order.ProductId, order.Sequence, OrderBookEventType.Add,
                                 new OrderBookItem
     {
         Id     = order.OrderId.ToString(),
         IsBuy  = order.Side == GdaxOrderSide.Buy,
         Symbol = order.ProductId,
         Price  = order.Price ?? 0,
         Size   = order.Size
     });
 }