Skip to content

Commit

Permalink
updated the withdraw types for bitfinex
Browse files Browse the repository at this point in the history
  • Loading branch information
andre77 committed Mar 15, 2017
1 parent 7223e51 commit d119a0d
Showing 1 changed file with 32 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,36 @@ public static String toPairString(CurrencyPair currencyPair) {

return currencyPair.base.toString().toLowerCase() + currencyPair.counter.toString().toLowerCase();
}

/**
* can be “bitcoin”, “litecoin” or “ethereum” or “tether” or “wire”.
*
* @param currency
* @return
*/
public static String convertToBitfinexWithdrawalType(String currency) {

if (currency.toUpperCase().equals("BTC"))
return "bitcoin";
if (currency.toUpperCase().equals("LTC"))
return "litecoin";
if (currency.toUpperCase().equals("USD"))
return "wire";
if (currency.toUpperCase().equals("TETHER"))
return "tether";
if (currency.toUpperCase().equals("ETH"))
return "ethereum";

throw new BitfinexException("Cannot determine withdrawal type.");
}

/**
* can be one of the following ['bitcoin', 'litecoin', 'ethereum', 'ethereumc', 'mastercoin', 'zcash', 'monero', 'wire', 'dash']
*
* @param currency
* @return
*/
public static String convertToBitfinexWithdrawalType(String currency) {
switch (currency.toUpperCase()) {
case "BTC":
return "bitcoin";
case "LTC":
return "litecoin";
case "ETH":
return "ethereum";
case "ETC":
return "ethereumc";
case "ZEC":
return "zcash";
case "XMR":
return "monero";
case "USD":
return "mastercoin";
case "DASH":
return "dash";
case "TETHER":
return "tether";
default:
throw new BitfinexException("Cannot determine withdrawal type.");
}

}
}

0 comments on commit d119a0d

Please sign in to comment.