package se.koc.trader.exchange.binance;

import se.koc.trader.api.ExchangeMarket;
import se.koc.trader.struct.Symbol;
import zutil.net.ws.rest.RESTClientFactory;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.List;

public class BinanceMarket implements ExchangeMarket {

    private BinanceRestAPI rest;


    public BinanceMarket() {
        try {
            rest = RESTClientFactory.createClient(new URL("https://api.binance.com"), BinanceRestAPI.class);
        } catch (MalformedURLException e) {
            throw new RuntimeException(e);
        }
    }


    public long getServerTime() {
        return rest.getServerTime().getLong("serverTime");
    }

    @Override
    public List<Symbol> getSymbols() {
        return null; // /api/v3/ticker/price
    }

    public Symbol getSymbol(String symbol) {
        return null; // /api/v3/ticker/price?symbol=xxx
    }
}
