Package com.xeiam.xchange.anx.v2.service.polling

Examples of com.xeiam.xchange.anx.v2.service.polling.ANXMarketDataServiceRaw


  }

  public ANXOpenOrder[] getANXOpenOrders() throws IOException {

    try {
      ANXOpenOrderWrapper anxOpenOrderWrapper = anxV2.getOpenOrders(ANXUtils.urlEncode(exchangeSpecification.getApiKey()), signatureCreator, getNonce());
      return anxOpenOrderWrapper.getANXOpenOrders();
    } catch (ANXException e) {
      throw new ExchangeException("Error calling getOpenOrders(): " + e.getError(), e);
    }
  }
View Full Code Here


  public ANXOrderResultWrapper getANXOrderResult(String orderId, String type, String baseCurrency, String counterCurrency) throws IOException {

    try {

      ANXOrderResultWrapper anxOrderResultWrapper = anxV2.getOrderResult(exchangeSpecification.getApiKey(), signatureCreator, getNonce(), baseCurrency, counterCurrency, orderId, type);
      return anxOrderResultWrapper;
    } catch (ANXException e) {
      throw new ExchangeException("Error calling getANXOrderResult(): " + e.getError(), e);
    }
  }
View Full Code Here

  public ANXTradeResultWrapper getExecutedANXTrades(Long from, Long to) throws IOException {

    try {

      ANXTradeResultWrapper anxTradeResultWrapper = anxV2.getExecutedTrades(exchangeSpecification.getApiKey(), signatureCreator, getNonce(), from, to);
      return anxTradeResultWrapper;
    } catch (ANXException e) {
      throw new ExchangeException("Error calling getExecutedANXTrades(): " + e.getError(), e);
    }
  }
View Full Code Here

    if (args.length > 0)
      from = (Long) args[0];
    if (args.length > 1)
      to = (Long) args[1];

    ANXTradeResultWrapper rawTrades = getExecutedANXTrades(from, to);
    String error = rawTrades.getError();

    if (error != null)
      throw new IllegalStateException(error);

    return ANXAdapters.adaptUserTrades(rawTrades.getAnxTradeResults());
  }
View Full Code Here

    super.applySpecification(exchangeSpecification);

    // Configure the basic services if configuration does not apply
    this.pollingMarketDataService = new ANXMarketDataService(exchangeSpecification);
    this.pollingTradeService = new ANXTradeService(exchangeSpecification, nonceFactory);
    this.pollingAccountService = new ANXAccountService(exchangeSpecification, nonceFactory);
  }
View Full Code Here

  public void applySpecification(ExchangeSpecification exchangeSpecification) {

    super.applySpecification(exchangeSpecification);

    // Configure the basic services if configuration does not apply
    this.pollingMarketDataService = new ANXMarketDataService(exchangeSpecification);
    this.pollingTradeService = new ANXTradeService(exchangeSpecification, nonceFactory);
    this.pollingAccountService = new ANXAccountService(exchangeSpecification, nonceFactory);
  }
View Full Code Here

    // Get trades
    // Trades trades = marketDataService.getTrades(Currencies.BTC, Currencies.PLN);
    // System.out.println("Current trades size for BTC / PLN: " + trades.getTrades().size());

    ANXMarketDataServiceRaw marketDataServiceRaw = (ANXMarketDataServiceRaw) marketDataService;

    // Get all tickers
    Map<String, ANXTicker> tickers = marketDataServiceRaw.getANXTickers(marketDataServiceRaw.getExchangeSymbols());
    System.out.println(tickers);

    // Get all orderbooks
    Map<String, ANXDepth> orderbooks = marketDataServiceRaw.getANXFullOrderBooks(marketDataServiceRaw.getExchangeSymbols());
    System.out.println(orderbooks);

  }
View Full Code Here

    super.applySpecification(exchangeSpecification);

    // Configure the basic services if configuration does not apply
    this.pollingMarketDataService = new ANXMarketDataService(exchangeSpecification);
    this.pollingTradeService = new ANXTradeService(exchangeSpecification, nonceFactory);
    this.pollingAccountService = new ANXAccountService(exchangeSpecification, nonceFactory);
  }
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.anx.v2.service.polling.ANXMarketDataServiceRaw

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.