Esempio n. 1
0
        public string GetDepositAddress(IExchangeMarket aMarket)
        {
            if (!IsCredentialsSet)
            {
                throw new Exception("No Credentials were set");
            }

            using (var lClient = new BitfinexClient())
            {
                var lAddressResponse = lClient.GetDepositAddressAsync(aMarket.SellingCurrencyInfo.Name.ToLowerInvariant(), WithdrawWallet.Exchange).Result;
                if (!lAddressResponse.Success)
                {
                    throw new Exception($"Failed to get deposit address for bitfinex. Details: {lAddressResponse.Error}");
                }
                return(lAddressResponse.Data.Address);
            }
        }