webcerebrium / java-binance-api

Java Binance API Client
MIT License
73 stars 40 forks source link

How to get all historical data from a specific asset? #50

Closed PanagiotisDrakatos closed 3 years ago

PanagiotisDrakatos commented 3 years ago

i am wondering how to get all historical data from a specific asset from the start until the end. i am trying something like this with no success

   Exchange bitstamp = ExchangeFactory.INSTANCE.createExchange(BinanceExchange.class);
        MarketDataService marketDataService = bitstamp.getMarketDataService();
        List<CurrencyPair> list=bitstamp.getExchangeSymbols();
        list.stream().forEach(val-> System.out.println(val.toString()));
        List<Ticker> ticker = marketDataService.getTickers((Params) list.get(2));
        System.out.println(ticker.toString());