Skip to content

kevinsawicki/stock-quotes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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());

About

Java library for the Google Finance Historical Prices API

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages