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

com.xeiam.xchange.examples.jubi.marketdata.JubiTickerDemo 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.jubi.marketdata;

import com.xeiam.xchange.currency.CurrencyPair;
import com.xeiam.xchange.dto.marketdata.Ticker;
import com.xeiam.xchange.jubi.JubiExchange;
import com.xeiam.xchange.jubi.service.polling.JubiMarketDataService;

/**
 * Created by Yingzhe on 3/19/2015.
 */
public class JubiTickerDemo {

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

    JubiExchange exchange = new JubiExchange();
    exchange.applySpecification(exchange.getDefaultExchangeSpecification());
    JubiMarketDataService marketDataService = (JubiMarketDataService) exchange.getPollingMarketDataService();
    Ticker ticker = marketDataService.getTicker(new CurrencyPair("BTC", "CNY"));
    System.out.println(ticker.toString());
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy