Skip to content

Commit

Permalink
OPEN - task 1: Create Bitcoin project
Browse files Browse the repository at this point in the history
  • Loading branch information
keilw committed Dec 11, 2013
1 parent fc1f379 commit 3630a57
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
package org.javamoney.shelter.bitcoin.provider;

import javax.money.CurrencyUnit;
import javax.money.MonetaryCurrencies;
import javax.money.MonetaryException;

import org.javamoney.convert.ExchangeRate;
import org.javamoney.moneta.MoneyCurrency;
import org.javamoney.shelter.bitcoin.BTCCurrency;


Expand All @@ -33,13 +33,13 @@ public static void main(String... arg) throws MonetaryException {
//MtGoxV2ConversionProvider provider = new MtGoxV2ConversionProvider("USD");
MtGoxV2ConversionProvider provider = new MtGoxV2ConversionProvider();
provider.loadRate("USD", true);
ExchangeRate rate = provider.getExchangeRate(MoneyCurrency.of("USD"), btc);
ExchangeRate rate = provider.getExchangeRate(MonetaryCurrencies.getCurrency("USD"), btc);
System.out.println("Rate: " + rate);

rate = provider.getExchangeRate(MoneyCurrency.of("EUR"), btc);
rate = provider.getExchangeRate(MonetaryCurrencies.getCurrency("EUR"), btc);
System.out.println("Rate2: " + rate);

rate = provider.getExchangeRate(MoneyCurrency.of("CHF"), btc);
rate = provider.getExchangeRate(MonetaryCurrencies.getCurrency("CHF"), btc);
System.out.println("Rate3: " + rate);
}
}

0 comments on commit 3630a57

Please sign in to comment.