Class FinnhubClient

java.lang.Object
com.github.oscerd.finnhub.client.FinnhubClient

public class FinnhubClient extends Object
  • Constructor Details

    • FinnhubClient

      public FinnhubClient()
    • FinnhubClient

      public FinnhubClient(String token)
    • FinnhubClient

      public FinnhubClient(String token, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
  • Method Details

    • getToken

      public String getToken()
    • setToken

      public void setToken(String token)
    • getObjectMapper

      public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
    • setObjectMapper

      public void setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
    • getHttpClient

      public org.apache.hc.client5.http.impl.classic.CloseableHttpClient getHttpClient()
    • setHttpClient

      public void setHttpClient(org.apache.hc.client5.http.impl.classic.CloseableHttpClient httpClient)
    • getQuote

      public Quote getQuote(String symbol) throws IOException, org.apache.hc.core5.http.ParseException
      Throws:
      IOException
      org.apache.hc.core5.http.ParseException
    • getCandle

      public Candle getCandle(String symbol, String resolution, long startEpoch, long endEpoch) throws IOException, org.apache.hc.core5.http.ParseException
      Get the Stock Candle object for a date or a range. Set startEpoch equal to the endEpoch for one day.
      Parameters:
      symbol - Ticker symbol
      resolution - Supported resolution includes 1, 5, 15, 30, 60, D, W, M. Some timeframes might not be available depending on the exchange.
      startEpoch - In seconds, not milliseconds.
      endEpoch - As above.
      Returns:
      JSON object with arrays for the close, low, high, open, volume. status is a String.
      Throws:
      IOException
      org.apache.hc.core5.http.ParseException
    • getCompanyProfile

      public CompanyProfile getCompanyProfile(String symbol) throws IOException, org.apache.hc.core5.http.ParseException
      Throws:
      IOException
      org.apache.hc.core5.http.ParseException
    • getSymbols

      public List<EnrichedSymbol> getSymbols(String exchange) throws IOException, org.apache.hc.core5.http.ParseException
      Throws:
      IOException
      org.apache.hc.core5.http.ParseException
    • searchSymbol

      public SymbolLookup searchSymbol(String query) throws IOException, org.apache.hc.core5.http.ParseException
      Throws:
      IOException
      org.apache.hc.core5.http.ParseException