Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Java library for the Google Finance Historical Prices API

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 README.md
Octocat-spinner-32 pom.xml
README.md

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());
Something went wrong with that request. Please try again.