package org.knowm.xchange.cryptonit.v2; import java.io.IOException; import org.knowm.xchange.BaseExchange; import org.knowm.xchange.Exchange; import org.knowm.xchange.ExchangeSpecification; import org.knowm.xchange.cryptonit.v2.service.CryptonitMarketDataService; import si.mazi.rescu.SynchronizedValueFactory; public class CryptonitExchange extends BaseExchange implements Exchange { @Override protected void initServices() { this.marketDataService = new CryptonitMarketDataService(this); } @Override public ExchangeSpecification getDefaultExchangeSpecification() { ExchangeSpecification exchangeSpecification = new ExchangeSpecification(this.getClass().getCanonicalName()); exchangeSpecification.setSslUri("https://cryptonit.net"); exchangeSpecification.setHost("cryptonit.net"); exchangeSpecification.setPort(80); exchangeSpecification.setExchangeName("Cryptonit"); exchangeSpecification .setExchangeDescription("Cryptonit is a cryptocurrency market owned and operated by UK based company Cryptonit Solutions Ltd."); return exchangeSpecification; } @Override public SynchronizedValueFactory<Long> getNonceFactory() { // No private API implemented. Not needed for this exchange at the moment. return null; } @Override public void remoteInit() throws IOException { // TODO Implement this. // List<List<String>> currencies = ((CryptonitMarketDataServiceRaw) marketDataService).getCryptonitTradingPairs() (); // other endpoints? // hard-coded meta data from json file not available at an endpoint? // TODO take all the info gathered above and create a `ExchangeMetaData` object via a new method in `*Adapters` class // exchangeMetaData = *Adapters.adaptToExchangeMetaData(blah, blah); super.remoteInit(); } }