Beispiel #1
0
        public Kraken.Cryptocurrency[] AvailableCryptocurrency()
        {
            var balances = this.AvailableBalances();

            if (balances.IsNullOrEmpty())
            {
                return(null);
            }

            string[] keys = Balances.Keys.ToArray();
            List <Kraken.Cryptocurrency> result = new List <Kraken.Cryptocurrency>();

            foreach (var b in balances)
            {
                result.AddIfValueIsNotNull(Kraken.ToCryptocurrency(b.AssetName));
            }

            return(result.ToArray());
        }
Beispiel #2
0
        public static Cryptocurrency[] ToCryptocurrency(Asset[] values)
        {
            if (values == null)
            {
                return(null);
            }

            List <Cryptocurrency> results = new List <Cryptocurrency>();

            foreach (Asset a in values)
            {
                string name = a.GetEnumName();

                if (Kraken.IsCryptocurrency(a))
                {
                    results.Add(Kraken.ToCryptocurrency(a));
                }
            }

            return(results.ToArray());
        }
 public Kraken.Cryptocurrency[] TradableCryptocurrency(string _sasset)
 {
     return(Kraken.ToCryptocurrency(TradableAsset(_sasset)));
 }
Beispiel #4
0
 public static Cryptocurrency ToCryptocurrency(Asset value)
 {
     return(Kraken.ToCryptocurrency(value.GetEnumName()).Value);
 }