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

com.xeiam.xchange.examples.btccentral.BTCCentralMarketDataExample 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.btccentral;

import java.io.IOException;

import com.xeiam.xchange.Exchange;
import com.xeiam.xchange.ExchangeFactory;
import com.xeiam.xchange.btccentral.BTCCentralExchange;
import com.xeiam.xchange.btccentral.service.polling.BTCCentralMarketDataServiceRaw;

/**
 * @author ObsessiveOrange
 */
public class BTCCentralMarketDataExample {

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

    Exchange btcCentralExchange = ExchangeFactory.INSTANCE.createExchange(BTCCentralExchange.class.getName());
    BTCCentralMarketDataServiceRaw btcCentralMarketDataServiceRaw = (BTCCentralMarketDataServiceRaw) btcCentralExchange.getPollingMarketDataService();

    System.out.println(btcCentralMarketDataServiceRaw.getBTCCentralTicker());
    System.out.println("\n");

    System.out.println(btcCentralMarketDataServiceRaw.getBTCCentralMarketDepth());
    System.out.println("\n");

    System.out.println(btcCentralMarketDataServiceRaw.getBTCCentralTrades());
    System.out.println("\n");
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy