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

org.knowm.xchange.examples.bitfinex.BitfinexDemoUtils Maven / Gradle / Ivy

package org.knowm.xchange.examples.bitfinex;

import org.knowm.xchange.Exchange;
import org.knowm.xchange.ExchangeFactory;
import org.knowm.xchange.ExchangeSpecification;
import org.knowm.xchange.bitfinex.BitfinexExchange;

public class BitfinexDemoUtils {

  public static Exchange createExchange() {

    // Use the factory to get BFX exchange API using default settings
    Exchange bfx = ExchangeFactory.INSTANCE.createExchange(BitfinexExchange.class);

    ExchangeSpecification bfxSpec = bfx.getDefaultExchangeSpecification();

    bfxSpec.setApiKey("");
    bfxSpec.setSecretKey("");

    bfx.applySpecification(bfxSpec);

    return bfx;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy