public static void main(String[] args) throws IOException { Exchange gdax = ExchangeFactory.INSTANCE.createExchange(CoinbaseProExchange.class.getName()); CoinbaseProMarketDataService mds = (CoinbaseProMarketDataService) gdax.getMarketDataService(); CoinbaseProCandle[] candles = mds.getCoinbaseProHistoricalCandles( CurrencyPair.BTC_USD, "2018-02-01T00:00:00Z", "2018-02-01T00:10:00Z", "60"); System.out.println(Arrays.toString(candles)); } }
private static void generic(Exchange exchange) throws IOException { // Interested in the public market data feed (no authentication) MarketDataService marketDataService = exchange.getMarketDataService(); // Get the latest trade data for BTC/EUR Trades trades = marketDataService.getTrades(CurrencyPair.BTC_EUR); System.out.println(trades.toString()); }
public static void main(String[] args) throws Exception { // Use the factory to get BFX exchange API using default settings Exchange bfx = ExchangeFactory.INSTANCE.createExchange(BitfinexExchange.class.getName()); // Interested in the public market data feed (no authentication) MarketDataService marketDataService = bfx.getMarketDataService(); raw((BitfinexMarketDataServiceRaw) marketDataService); }
private static void raw(Exchange exchange) throws IOException { DSXMarketDataServiceRaw marketDataService = (DSXMarketDataServiceRaw) exchange.getMarketDataService(); DSXTickerWrapper ticker = marketDataService.getDSXTicker("btcusd", "LIVE"); System.out.println(ticker.toString()); } }
public static void main(String[] args) throws IOException { Exchange exchange = BitmexDemoUtils.createExchange(); MarketDataService service = exchange.getMarketDataService(); ticker(service); }
public static void main(String[] args) throws IOException { exchange = ExchangeFactory.INSTANCE.createExchange(BittrexExchange.class.getName()); MarketDataService marketDataService = exchange.getMarketDataService(); System.out.println(Arrays.toString(exchange.getExchangeSymbols().toArray())); generic(marketDataService); raw((BittrexMarketDataServiceRaw) marketDataService); }
public static void main(String[] args) throws IOException { exchange = ExchangeFactory.INSTANCE.createExchange(KucoinExchange.class.getName()); MarketDataService marketDataService = exchange.getMarketDataService(); System.out.println(Arrays.toString(exchange.getExchangeSymbols().toArray())); generic(marketDataService); raw((KucoinMarketDataServiceRaw) marketDataService); }
public static void main(String[] args) throws IOException { // Create Default Upbit Instance Exchange upbit = ExchangeFactory.INSTANCE.createExchange(UpbitExchange.class.getName()); // Get The Public Market Data Service MarketDataService marketDataService = upbit.getMarketDataService(); // Currency Pair To Get Ticker Of CurrencyPair pair = new CurrencyPair(Currency.ETH, Currency.KRW); // Print The Generic and Raw Ticker System.out.println(marketDataService.getTicker(pair)); } }
private static void generic(Exchange exchange) throws IOException { // Interested in the public market data feed (no authentication). MarketDataService marketDataService = exchange.getMarketDataService(); // Get the order book data for BTC/CNY. OrderBook orderBook = marketDataService.getOrderBook(CurrencyPair.BTC_CNY); System.out.println(orderBook); System.out.println("asks: " + orderBook.getAsks()); System.out.println("bids: " + orderBook.getBids()); System.out.println("size: " + (orderBook.getAsks().size() + orderBook.getBids().size())); }
public static void main(String[] args) throws IOException { // Use the factory to get Mercado Bitcoin exchange API using default settings Exchange mercadoBitcoin = ExchangeFactory.INSTANCE.createExchange(MercadoBitcoinExchange.class.getName()); // Interested in the public market data feed (no authentication) MarketDataService marketDataService = mercadoBitcoin.getMarketDataService(); generic(marketDataService); raw((MercadoBitcoinMarketDataServiceRaw) marketDataService); }
public static void main(String[] args) throws Exception { // Use the factory to get BTC-E exchange API using default settings Exchange bitfinex = ExchangeFactory.INSTANCE.createExchange(BitfinexExchange.class.getName()); // Interested in the public market data feed (no authentication) MarketDataService marketDataService = bitfinex.getMarketDataService(); generic(marketDataService); raw((BitfinexMarketDataServiceRaw) marketDataService); }
public static void main(String[] args) throws IOException { // Use the factory to get Quoine exchange API using default settings Exchange quoine = ExchangeFactory.INSTANCE.createExchange(QuoineExchange.class.getName()); // Interested in the public market data feed (no authentication) MarketDataService marketDataService = quoine.getMarketDataService(); generic(marketDataService); raw((QuoineMarketDataServiceRaw) marketDataService); }
public static void main(String[] args) throws IOException { // Use the factory to get Cex.IO exchange API using default settings Exchange exchange = ExchangeFactory.INSTANCE.createExchange(CexIOExchange.class.getName()); // Interested in the public market data feed (no authentication) MarketDataService marketDataService = exchange.getMarketDataService(); // Get the latest trade data for GHs/BTC since tid=5635556 Trades trades = marketDataService.getTrades(new CurrencyPair(Currency.GHs, Currency.BTC), 5909107); System.out.println("Trades Size= " + trades.getTrades().size()); System.out.println(trades.toString()); } }
public static void main(String[] args) throws IOException { // Use the factory to get Bitstamp exchange API using default settings Exchange bitstamp = ExchangeFactory.INSTANCE.createExchange(BitstampExchange.class.getName()); // Interested in the public market data feed (no authentication) MarketDataService marketDataService = bitstamp.getMarketDataService(); generic(marketDataService); raw((BitstampMarketDataServiceRaw) marketDataService); }
public static void main(String[] args) throws IOException { // Use the factory to get Mercado Bitcoin exchange API using default settings Exchange mercadoBitcoin = ExchangeFactory.INSTANCE.createExchange(MercadoBitcoinExchange.class.getName()); // Interested in the public market data feed (no authentication) MarketDataService marketDataService = mercadoBitcoin.getMarketDataService(); generic(marketDataService); raw((MercadoBitcoinMarketDataServiceRaw) marketDataService); }
public static void main(String[] args) throws IOException { // Use the factory to get Bitso exchange API using default settings Exchange bitso = ExchangeFactory.INSTANCE.createExchange(BitsoExchange.class.getName()); // Interested in the public market data feed (no authentication) MarketDataService marketDataService = bitso.getMarketDataService(); generic(marketDataService); raw((BitsoMarketDataServiceRaw) marketDataService); }
public static void main(String[] args) throws IOException { Exchange coinbaseExchange = ExchangeFactory.INSTANCE.createExchange(CoinbaseExchange.class.getName()); MarketDataService marketDataService = coinbaseExchange.getMarketDataService(); generic(marketDataService); raw((CoinbaseMarketDataService) marketDataService); }
private static void generic(Exchange exchange) throws IOException { MarketDataService marketDataService = exchange.getMarketDataService(); OrderBook orderBook = marketDataService.getOrderBook(CurrencyPair.LTC_USD, "LIVE"); System.out.println(orderBook.toString()); System.out.println("size: " + (orderBook.getAsks().size() + orderBook.getBids().size())); orderBook = marketDataService.getOrderBook(CurrencyPair.BTC_USD, "DEMO"); System.out.println(orderBook.toString()); System.out.println("size: " + (orderBook.getAsks().size() + orderBook.getBids().size())); orderBook = marketDataService.getOrderBook(CurrencyPair.BTC_USD); System.out.println(orderBook.toString()); System.out.println("size: " + (orderBook.getAsks().size() + orderBook.getBids().size())); }
public static void main(String[] args) throws IOException { // Use the factory to get BTCTurk exchange API using default settings Exchange btcTurk = BTCTurkDemoUtils.createExchange(); // Interested in the public market data feed (no authentication) MarketDataService marketDataService = btcTurk.getMarketDataService(); generic(marketDataService); raw((BTCTurkMarketDataService) marketDataService); }
public static void main(String[] args) throws IOException { // Use the factory to get Koineks exchange API using default settings Exchange koineks = KoineksDemoUtils.createExchange(); // Interested in the public market data feed (no authentication) MarketDataService marketDataService = koineks.getMarketDataService(); generic(marketDataService); raw((KoineksMarketDataService) marketDataService); }