package at.outdated.bitcoin.exchange.kraken;

import at.outdated.bitcoin.exchange.api.client.ExchangeApiClient;
import at.outdated.bitcoin.exchange.api.market.Market;
import at.outdated.bitcoin.exchange.api.currency.Currency;
import at.outdated.bitcoin.exchange.api.market.transfer.TransferMethod;
import at.outdated.bitcoin.exchange.api.market.transfer.TransferType;

/**
 * Created with IntelliJ IDEA.
 * User: ebirn
 * Date: 17.09.13
 * Time: 18:28
 * To change this template use File | Settings | File Templates.
 */
public class KrakenMarket extends Market {

    public KrakenMarket() {
        super("kraken", "http://www.kraken.com", "Kraken");

        addWithdrawal(new TransferMethod(Currency.BTC, TransferType.VIRTUAL));
        addWithdrawal(new TransferMethod(Currency.LTC, TransferType.VIRTUAL));
        addWithdrawal(new TransferMethod(Currency.XRP, TransferType.VIRTUAL));

        addWithdrawal(new TransferMethod(Currency.EUR, TransferType.BANK));
        addWithdrawal(new TransferMethod(Currency.USD, TransferType.BANK));


        addDeposit(new TransferMethod(Currency.BTC, TransferType.VIRTUAL));
        addDeposit(new TransferMethod(Currency.LTC, TransferType.VIRTUAL));
        addDeposit(new TransferMethod(Currency.XRP, TransferType.VIRTUAL));

        addDeposit(new TransferMethod(Currency.EUR, TransferType.BANK));
        addDeposit(new TransferMethod(Currency.USD, TransferType.BANK));

        addAsset(Currency.BTC, Currency.EUR);
        addAsset(Currency.BTC, Currency.USD);
        addAsset(Currency.BTC, Currency.XRP);
        addAsset(Currency.USD, Currency.XRP);
        addAsset(Currency.EUR, Currency.XRP);
        addAsset(Currency.BTC, Currency.LTC);
        addAsset(Currency.LTC, Currency.USD);
        addAsset(Currency.LTC, Currency.EUR);
        addAsset(Currency.LTC, Currency.XRP);
    }

    @Override
    public ExchangeApiClient getApiClient() {
        return new KrakenClient(this);
    }

}

@@ -105,16 +105,80 @@
 Client;%0A
+import at.outdated.bitcoin.exchange.api.currency.CurrencyValue;%0A
 import a
@@ -283,16 +283,80 @@
 rrency;%0A
+import at.outdated.bitcoin.exchange.api.market.fee.ConstantFee;%0A
 import a
@@ -842,32 +842,90 @@
 sferType.VIRTUAL
+, new ConstantFee(new CurrencyValue(0.0005, Currency.BTC))
 ));%0A        addW
@@ -979,32 +979,88 @@
 sferType.VIRTUAL
+, new ConstantFee(new CurrencyValue(0.02, Currency.LTC))
 ));%0A        addW
@@ -1114,32 +1114,91 @@
 sferType.VIRTUAL
+, new ConstantFee(new CurrencyValue(0.00002, Currency.XRP))
 ));%0A%0A        add
@@ -1250,32 +1250,88 @@
 ransferType.BANK
+, new ConstantFee(new CurrencyValue(0.09, Currency.EUR))
 ));%0A        addW
@@ -1386,24 +1386,80 @@
 ferType.BANK
+, new ConstantFee(new CurrencyValue(30.0, Currency.USD))
 ));%0A%0A%0A      

update withdrawal fees