All Projects → kevinsawicki → stock-quotes

kevinsawicki / stock-quotes

Licence: other
Java library for the Google Finance Historical Prices API

Programming Languages

java
68154 projects - #9 most used programming language

Stock Quotes Build Status

Library for accessing historical stock prices using the Google Finance API.

The stock-quotes library is available from Maven Central.

<dependency>
  <groupId>com.github.kevinsawicki</groupId>
  <artifactId>stock-quotes</artifactId>
  <version>1.3</version>
</dependency>

Dependencies

Usage

Get the closing prices for the current year

The following example requests the prices of the stock symbol tr for the current year and prints out the closing price for each day.

StockQuoteRequest request = new StockQuoteRequest();
request.setSymbol("tr");
request.setStartDate(DateUtils.yearStart());
request.setEndDate(DateUtils.yearEnd());

while(request.next())
  System.out.println(request.getDate() + ": " + request.getClose());
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].