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

com.xeiam.xchange.examples.anx.v2.ANXMetaDataDemo 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.anx.v2;

import java.io.IOException;

import com.xeiam.xchange.Exchange;
import com.xeiam.xchange.ExchangeFactory;
import com.xeiam.xchange.ExchangeSpecification;
import com.xeiam.xchange.anx.v2.ANXExchange;
import com.xeiam.xchange.dto.meta.ExchangeMetaData;

public class ANXMetaDataDemo {

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

    // Use the factory to get ANX exchange API using default settings
    Exchange anx = ExchangeFactory.INSTANCE.createExchange(ANXExchange.class.getName());
    ExchangeMetaData metaData = anx.getMetaData();
    System.out.println(metaData.toString());
    System.out.println("private poll delay ms: " + ExchangeMetaData.getPollDelayMillis(metaData.getPrivateRateLimits()));
    System.out.println("public  poll delay ms: " + ExchangeMetaData.getPollDelayMillis(metaData.getPublicRateLimits()));

    ExchangeSpecification exSpec = new ExchangeSpecification(ANXExchange.class);
    exSpec.setMetaDataJsonFileOverride("/tmp/anxpro.json");
    anx = ExchangeFactory.INSTANCE.createExchange(exSpec);
    System.out.println(anx.getMetaData().toString());

  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy