Search in sources :

Example 1 with AccountService

use of org.knowm.xchange.service.account.AccountService in project XChange by knowm.

the class CoinfloorBalanceIntegration method fetchBalanceTest.

@Test
public void fetchBalanceTest() throws IOException {
    final ExchangeSpecification specification = new ExchangeSpecification(CoinfloorExchange.class);
    String username = System.getProperty("xchange.coinfloor.username");
    String password = System.getProperty("xchange.coinfloor.password");
    if (username == null || password == null) {
        return;
    }
    specification.setUserName(username);
    specification.setPassword(password);
    Exchange exchange = ExchangeFactory.INSTANCE.createExchange(specification);
    AccountService service = exchange.getAccountService();
    AccountInfo info = service.getAccountInfo();
    logger.info("{}", info);
}
Also used : CoinfloorExchange(org.knowm.xchange.coinfloor.CoinfloorExchange) Exchange(org.knowm.xchange.Exchange) ExchangeSpecification(org.knowm.xchange.ExchangeSpecification) AccountService(org.knowm.xchange.service.account.AccountService) AccountInfo(org.knowm.xchange.dto.account.AccountInfo) Test(org.junit.Test)

Example 2 with AccountService

use of org.knowm.xchange.service.account.AccountService in project XChange by knowm.

the class KucoinAccountDemo method main.

public static void main(String[] args) throws IOException {
    Exchange exchange = KucoinExamplesUtils.getExchange();
    AccountService accountService = exchange.getAccountService();
    generic(accountService);
    raw((KucoinAccountServiceRaw) accountService);
}
Also used : Exchange(org.knowm.xchange.Exchange) AccountService(org.knowm.xchange.service.account.AccountService)

Example 3 with AccountService

use of org.knowm.xchange.service.account.AccountService in project XChange by knowm.

the class MercadoBitcoinAccountDemo method main.

public static void main(String[] args) throws IOException {
    Exchange mercadoBitcoin = InteractiveAuthenticatedExchange.createInstanceFromDefaultInput();
    AccountService accountService = mercadoBitcoin.getAccountService();
    generic(accountService);
    raw((MercadoBitcoinAccountServiceRaw) accountService);
}
Also used : Exchange(org.knowm.xchange.Exchange) InteractiveAuthenticatedExchange(org.knowm.xchange.examples.mercadobitcoin.InteractiveAuthenticatedExchange) AccountService(org.knowm.xchange.service.account.AccountService)

Example 4 with AccountService

use of org.knowm.xchange.service.account.AccountService in project XChange by knowm.

the class LgoExchange method initServices.

@Override
protected void initServices() {
    signatureService = LgoSignatureService.createInstance(getExchangeSpecification());
    this.marketDataService = new LgoMarketDataService(this);
    this.tradeService = new LgoTradeService(this, new LgoKeyService(getExchangeSpecification()));
    this.accountService = new AccountService() {
    };
}
Also used : LgoTradeService(org.knowm.xchange.lgo.service.LgoTradeService) LgoMarketDataService(org.knowm.xchange.lgo.service.LgoMarketDataService) LgoKeyService(org.knowm.xchange.lgo.service.LgoKeyService) AccountService(org.knowm.xchange.service.account.AccountService)

Example 5 with AccountService

use of org.knowm.xchange.service.account.AccountService in project XChange by knowm.

the class AccountServiceTest method withdraw.

private String withdraw(String responseFileName, int statusCode) throws IOException {
    BinanceExchange exchange = createExchange();
    AccountService service = exchange.getAccountService();
    stubWithdraw(responseFileName, statusCode);
    return service.withdrawFunds(Currency.BTC, BigDecimal.TEN, "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa");
}
Also used : BinanceExchange(org.knowm.xchange.binance.BinanceExchange) AccountService(org.knowm.xchange.service.account.AccountService)

Aggregations

AccountService (org.knowm.xchange.service.account.AccountService)54 Exchange (org.knowm.xchange.Exchange)38 AccountInfo (org.knowm.xchange.dto.account.AccountInfo)11 Test (org.junit.Test)7 IOException (java.io.IOException)6 ExchangeSpecification (org.knowm.xchange.ExchangeSpecification)4 ArrayList (java.util.ArrayList)3 FundingRecord (org.knowm.xchange.dto.account.FundingRecord)3 Bean (org.springframework.context.annotation.Bean)3 Primary (org.springframework.context.annotation.Primary)3 Date (java.util.Date)2 CoinsuperExchange (org.knowm.xchange.coinsuper.CoinsuperExchange)2 Currency (org.knowm.xchange.currency.Currency)2 LimitOrder (org.knowm.xchange.dto.trade.LimitOrder)2 TradeService (org.knowm.xchange.service.trade.TradeService)2 BigDecimal (java.math.BigDecimal)1 BinanceExchange (org.knowm.xchange.binance.BinanceExchange)1 BitfinexAccountService (org.knowm.xchange.bitfinex.service.BitfinexAccountService)1 BitmexTradeHistoryParams (org.knowm.xchange.bitmex.service.BitmexTradeHistoryParams)1 BitstampTradeHistoryParams (org.knowm.xchange.bitstamp.service.BitstampTradeHistoryParams)1