예제 #1
0
 internal CoinoneOrderInfo(XElement element)
 {
     if (element is null || !element.HasElements)
     {
         return;
     }
     OrderId = element.Element("orderId")?.Value;
     if (long.TryParse(TimestampS = element.Element("timestamp")?.Value, out var r))
     {
         Timestamp = r.UnixTimestampToDateTime();
     }
     if (decimal.TryParse(PriceS = element.Element("price")?.Value, out var e))
     {
         Price = e;
     }
     if (decimal.TryParse(QtyS = element.Element("qty")?.Value, out var w))
     {
         Qty = w;
     }
     if (decimal.TryParse(FeeRateS = element.Element("feeRate")?.Value, out var t))
     {
         FeeRate = t;
     }
     if (CoinoneMyOrderInfo.OrderTypeTryParse(TypeS = element.Element("type")?.Value, out var f))
     {
         Type = f;
     }
 }
예제 #2
0
 public CoinoneMyOrderInformationV2Response(XElement element) : base(element)
 {
     if (element is null || !element.HasElements)
     {
         return;
     }
     OrderId        = element.Element("orderId")?.Value;
     BaseCurrency   = element.Element("baseCurrency")?.Value;
     TargetCurrency = element.Element("targetCurrency")?.Value;
     if (decimal.TryParse(PriceS = element.Element("price")?.Value, out var e))
     {
         Price = e;
     }
     if (decimal.TryParse(AverageExecutedPriceS = element.Element("averageExecutedPrice")?.Value, out var a))
     {
         AverageExecutedPrice = a;
     }
     if (decimal.TryParse(OriginalQtyS = element.Element("originalQty")?.Value, out var w))
     {
         OriginalQty = w;
     }
     if (decimal.TryParse(ExecutedQtyS = element.Element("executedQty")?.Value, out var c))
     {
         ExecutedQty = c;
     }
     if (decimal.TryParse(CanceledQtyS = element.Element("canceledQty")?.Value, out var g))
     {
         CanceledQty = g;
     }
     if (decimal.TryParse(RemainQtyS = element.Element("remainQty")?.Value, out var z))
     {
         RemainQty = z;
     }
     if (MyOrderV2StatusTryParse(element?.Element("status")?.Value, out var h))
     {
         Status = h;
     }
     if (CoinoneMyOrderInfo.OrderTypeTryParse(SideS = element.Element("side")?.Value, out var f))
     {
         Side = f;
     }
     if (long.TryParse(OrderedAtS = element.Element("orderedAt")?.Value, out var r))
     {
         OrderedAt = r.UnixTimestampToDateTime();
     }
     if (long.TryParse(UpdatedAtS = element.Element("updatedAt")?.Value, out var s))
     {
         UpdatedAt = s.UnixTimestampToDateTime();
     }
     if (decimal.TryParse(FeeRateS = element.Element("feeRate")?.Value, out var t))
     {
         FeeRate = t;
     }
     if (decimal.TryParse(FeeS = element.Element("fee")?.Value, out var y))
     {
         Fee = y;
     }
 }