Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kevinsawicki/stock-quotes
Java library for the Google Finance Historical Prices API
https://github.com/kevinsawicki/stock-quotes
Last synced: 26 days ago
JSON representation
Java library for the Google Finance Historical Prices API
- Host: GitHub
- URL: https://github.com/kevinsawicki/stock-quotes
- Owner: kevinsawicki
- Created: 2011-12-26T18:07:31.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-08-17T03:40:41.000Z (about 11 years ago)
- Last Synced: 2024-10-17T17:51:44.424Z (26 days ago)
- Language: Java
- Homepage: http://kevinsawicki.github.io/stock-quotes
- Size: 565 KB
- Stars: 19
- Watchers: 6
- Forks: 14
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Stock Quotes [![Build Status](https://travis-ci.org/kevinsawicki/stock-quotes.png)](https://travis-ci.org/kevinsawicki/stock-quotes)
Library for accessing historical stock prices using the Google Finance API.
The stock-quotes library is available from [Maven Central](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.github.kevinsawicki%22%20AND%20a%3A%22stock-quotes%22).
```xml
com.github.kevinsawicki
stock-quotes
1.3```
## Dependencies
* [kevinsawicki/http-request](http://github.com/kevinsawicki/http-request)
## 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.```java
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());
```