コード例 #1
0
 public OrderCanceledMessageData(
     OrderEventType eventType,
     string symbol,
     long orderId,
     OrderType type,
     string clientOrderId,
     string orderSource,
     decimal orderPrice,
     decimal orderSize,
     decimal orderValue,
     OrderStatus orderStatus,
     string remainingAmount,
     string accumulativeAmount,
     DateTimeOffset lastActivityTime)
 {
     EventType          = eventType;
     Symbol             = symbol;
     OrderId            = orderId;
     Type               = type;
     ClientOrderId      = clientOrderId;
     OrderSource        = orderSource;
     OrderPrice         = orderPrice;
     OrderSize          = orderSize;
     OrderValue         = orderValue;
     OrderStatus        = orderStatus;
     RemainingAmount    = remainingAmount;
     AccumulativeAmount = accumulativeAmount;
     LastActivityTime   = lastActivityTime;
 }
コード例 #2
0
 public OrderSubmittedMessageData(
     OrderEventType eventType,
     string symbol,
     long accountId,
     long orderId,
     string clientOrderId,
     string orderSource,
     decimal orderPrice,
     decimal orderSize,
     decimal orderValue,
     OrderType type,
     OrderStatus orderStatus,
     DateTimeOffset orderCreateTime)
 {
     EventType       = eventType;
     Symbol          = symbol;
     AccountId       = accountId;
     OrderId         = orderId;
     ClientOrderId   = clientOrderId;
     OrderSource     = orderSource;
     OrderPrice      = orderPrice;
     OrderSize       = orderSize;
     OrderValue      = orderValue;
     Type            = type;
     OrderStatus     = orderStatus;
     OrderCreateTime = orderCreateTime;
 }
コード例 #3
0
        public async Task SaveEvent(OrderDTO order, OrderEventType eventType)
        {
            List <OrderEvent> result = await GetOrderEvent(order.Id);

            _repository.Create(new OrderEvent(order.Id, order.ToJson(),
                                              eventType.Name, result.Count == 0 ? 1 : (result.Max(x => x.Version)) + 1), "");
            await _repository.SaveAsync();
        }
コード例 #4
0
 public ConditionalOrderCanceledMessageData(
     OrderEventType eventType,
     OrderStatus orderStatus,
     string symbol,
     string clientOrderId,
     OrderSide orderSide,
     DateTimeOffset orderTriggerTime)
 {
     EventType        = eventType;
     Symbol           = symbol;
     ClientOrderId    = clientOrderId;
     OrderSide        = orderSide;
     OrderStatus      = orderStatus;
     OrderTriggerTime = orderTriggerTime;
 }
コード例 #5
0
 public ConditionalOrderTriggerFailureMessageData(
     OrderEventType eventType,
     string symbol,
     string clientOrderId,
     OrderSide orderSide,
     OrderStatus orderStatus,
     int errorCode,
     string errorMessage,
     DateTimeOffset orderTriggeringFailureTime)
 {
     EventType     = eventType;
     Symbol        = symbol;
     ClientOrderId = clientOrderId;
     OrderSide     = orderSide;
     OrderStatus   = orderStatus;
     ErrorCode     = errorCode;
     ErrorMessage  = errorMessage;
     OrderTriggeringFailureTime = orderTriggeringFailureTime;
 }
コード例 #6
0
 public OrderTradedMessageData(
     OrderEventType eventType,
     string symbol,
     decimal tradePrice,
     decimal tradeVolume,
     long orderId,
     OrderType type,
     string clientOrderId,
     string orderSource,
     decimal orderPrice,
     decimal orderSize,
     decimal orderValue,
     long tradeId,
     DateTimeOffset tradeTime,
     bool aggressor,
     OrderStatus orderStatus,
     decimal remainingAmount,
     decimal accumulativeAmount)
 {
     EventType          = eventType;
     Symbol             = symbol;
     TradePrice         = tradePrice;
     TradeVolume        = tradeVolume;
     OrderId            = orderId;
     Type               = type;
     ClientOrderId      = clientOrderId;
     OrderSource        = orderSource;
     OrderPrice         = orderPrice;
     OrderSize          = orderSize;
     OrderValue         = orderValue;
     TradeId            = tradeId;
     TradeTime          = tradeTime;
     Aggressor          = aggressor;
     OrderStatus        = orderStatus;
     RemainingAmount    = remainingAmount;
     AccumulativeAmount = accumulativeAmount;
 }
コード例 #7
0
 /// <summary>
 /// Instantiate a new instance of this class.
 /// </summary>
 /// <param name="data">The order change event data.</param>
 public OrderChangeEventArgs(OrderChange data)
 {
     EventData = data;
     Type      = data.Type;
 }