public static Funds ReadFromJObject(JObject o) { if (o == null) { return(null); } var funds = new Funds() { Btc = o.Value <decimal>("btc"), Ltc = o.Value <decimal>("ltc"), Nmc = o.Value <decimal>("ntc"), Nvc = o.Value <decimal>("nvc"), Trc = o.Value <decimal>("trc"), Ppc = o.Value <decimal>("ppc"), Ftc = o.Value <decimal>("Ftc"), Usd = o.Value <decimal>("Usd"), Rur = o.Value <decimal>("rur"), Eur = o.Value <decimal>("eur") }; foreach (var val in o) { funds.Balances[val.Key.ToUpper()] = decimal.Parse(val.Value.Value <string>(), NumberStyles.AllowExponent | NumberStyles.Float, CultureInfo.InvariantCulture); } return(funds); }
public static CancelOrderAnswer ReadFromJObject(JObject o) { return(new CancelOrderAnswer { Funds = Funds.ReadFromJObject(o["funds"] as JObject), OrderId = o.Value <int>("order_id") }); }
public static UserInfo ReadFromJObject(JObject o) { return(new UserInfo { Funds = Funds.ReadFromJObject(o["funds"] as JObject), Rights = Rights.ReadFromJObject(o["rights"] as JObject), TransactionCount = o.Value <int>("transaction_count"), OpenOrders = o.Value <int>("open_orders"), ServerTime = o.Value <int>("server_time") }); }
public static TradeAnswer ReadFromJObject(JObject o) { if (o == null) { return(null); } return(new TradeAnswer { Funds = Funds.ReadFromJObject(o["funds"] as JObject), Received = o.Value <decimal>("received"), Remains = o.Value <decimal>("remains"), OrderId = o.Value <int>("order_id") }); }
public static Funds ReadFromJObject(JObject o) { if (o == null) return null; var r = new Funds() { Usd = o.Value<decimal>("usd"), Btc = o.Value<decimal>("btc"), Sc = o.Value<decimal>("sc"), Ltc = o.Value<decimal>("ltc"), Ruc = o.Value<decimal>("ruc"), Nmc = o.Value<decimal>("nmc") }; return r; }
public static Funds ReadFromJObject(JObject o) { if (o == null) { return(null); } var r = new Funds() { Usd = o.Value <decimal>("usd"), Btc = o.Value <decimal>("btc"), Sc = o.Value <decimal>("sc"), Ltc = o.Value <decimal>("ltc"), Ruc = o.Value <decimal>("ruc"), Nmc = o.Value <decimal>("nmc") }; return(r); }
public static Funds ReadFromJObject(JObject o) { if (o == null) return null; var funds = new Funds() { Btc = o.Value<decimal>("btc"), Ltc = o.Value<decimal>("ltc"), Nmc = o.Value<decimal>("ntc"), Nvc = o.Value<decimal>("nvc"), Trc = o.Value<decimal>("trc"), Ppc = o.Value<decimal>("ppc"), Ftc = o.Value<decimal>("Ftc"), Usd = o.Value<decimal>("Usd"), Rur = o.Value<decimal>("rur"), Eur = o.Value<decimal>("eur") }; foreach (var val in o) { funds.Balances[val.Key.ToUpper()] = decimal.Parse(val.Value.Value<string>(), NumberStyles.AllowExponent | NumberStyles.Float, CultureInfo.InvariantCulture); } return funds; }