예제 #1
0
 public bool Equals(TradeCompleted rhs)
 {
     return
         (rhs != null &&
          OrderId == rhs.OrderId &&
          TradeId == rhs.TradeId &&
          Pair == rhs.Pair &&
          TradeType == rhs.TradeType);
 }
예제 #2
0
        /// <summary>Convert an exchange order into a CoinFlip order completed</summary>
        private TradeCompleted TradeCompletedFrom(TradeCompleted fill, DateTimeOffset updated)
        {
            // This is mainly to mirror the behaviour of the actual exchanges
            var order_id        = fill.OrderId;
            var trade_id        = fill.TradeId;
            var tt              = fill.TradeType;
            var pair            = fill.Pair;
            var amount_in       = fill.AmountIn;
            var amount_out      = fill.AmountOut;
            var commission      = fill.Commission;
            var commission_coin = fill.CommissionCoin;
            var created         = fill.Created;

            return(new TradeCompleted(order_id, trade_id, pair, tt, amount_in, amount_out, commission, commission_coin, created, updated));
        }
예제 #3
0
 public TradeCompleted(TradeCompleted rhs)
     : this(rhs.OrderId, rhs.TradeId, rhs.Pair, rhs.TradeType, rhs.AmountIn, rhs.AmountOut, rhs.Commission, rhs.CommissionCoin, rhs.Created, rhs.Updated)
 {
 }