示例#1
0
        static SortedSet <string> GetDeletedCurrencies(IEnumerable <string> resp_pairs)
        {
            var our_currencies = WexCurrencyHelper.GetAllCurrencies();

            foreach (string s_pair in resp_pairs)
            {
                string[] two_currs_arr = s_pair.Split(WexPairHelper.PAIR_TO_CURR_SPLIT_CHARS);
                if (two_currs_arr.Count() != 2)
                {
                    throw new Exception("Strange pair " + s_pair);
                }

                foreach (string s_curr in two_currs_arr)
                {
                    WexCurrency wex_curr = WexCurrencyHelper.FromString(s_curr);
                    if (wex_curr != WexCurrency.Unknown)
                    {
                        our_currencies.Remove(wex_curr);
                    }
                }
            }

            SortedSet <string> deleted_currencies = new SortedSet <string>();

            foreach (WexCurrency curr in our_currencies)
            {
                deleted_currencies.Add(WexCurrencyHelper.ToString(curr));
            }
            return(deleted_currencies);
        }
示例#2
0
        /// <summary>
        /// This method can be used to retrieve the address for depositing crypto-currency.
        /// See https://github.com/wex-exchange/api-doc/blob/master/trade-api.md#CoinDepositAddress
        /// </summary>
        /// <param name="crypto_currency">Crypto currency</param>
        /// <returns>address for deposits</returns>
        public string CoinDepositAddress(WexCurrency crypto_currency)
        {
            var args = new Dictionary <string, string>()
            {
                { "method", "CoinDepositAddress" },
                { "coinName", WexCurrencyHelper.ToString(crypto_currency).ToUpperInvariant() }
            };

            string query_answer = QueryExec(args);
            var    json_result  = ParseAnswer(query_answer);

            return(json_result.Value <string>("address"));
        }