All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.xeiam.xchange.examples.btc38.Btc38MarketDataDemo Maven / Gradle / Ivy

Go to download

Provides a set of examples that demonstrate how to use XChange in client applications

The newest version!
package com.xeiam.xchange.examples.btc38;

import com.xeiam.xchange.btc38.Btc38Exchange;
import com.xeiam.xchange.btc38.service.polling.Btc38MarketDataService;
import com.xeiam.xchange.currency.CurrencyPair;
import com.xeiam.xchange.dto.marketdata.Ticker;

/**
 * Created by Yingzhe on 12/20/2014.
 */
public class Btc38MarketDataDemo {

  public static void main(String[] args) throws Exception {

    Btc38Exchange exchange = new Btc38Exchange();
    exchange.applySpecification(exchange.getDefaultExchangeSpecification());
    Btc38MarketDataService marketDataService = (Btc38MarketDataService) exchange.getPollingMarketDataService();
    Ticker ticker = marketDataService.getTicker(new CurrencyPair("DOGE", "BTC"));
    System.out.println(ticker.toString());
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy