com.github.kevinsawicki:stock-quotes

Library for requesting stock quotes from Google Finance

License

License

GroupId

GroupId

com.github.kevinsawicki
ArtifactId

ArtifactId

stock-quotes
Last Version

Last Version

1.3
Release Date

Release Date

Type

Type

jar
Description

Description

Library for requesting stock quotes from Google Finance
Project URL

Project URL

https://github.com/kevinsawicki/stock-quotes
Source Code Management

Source Code Management

https://github.com/kevinsawicki/stock-quotes

Download stock-quotes

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.kevinsawicki/stock-quotes/ -->
<dependency>
    <groupId>com.github.kevinsawicki</groupId>
    <artifactId>stock-quotes</artifactId>
    <version>1.3</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.kevinsawicki/stock-quotes/
implementation 'com.github.kevinsawicki:stock-quotes:1.3'
// https://jarcasting.com/artifacts/com.github.kevinsawicki/stock-quotes/
implementation ("com.github.kevinsawicki:stock-quotes:1.3")
'com.github.kevinsawicki:stock-quotes:jar:1.3'
<dependency org="com.github.kevinsawicki" name="stock-quotes" rev="1.3">
  <artifact name="stock-quotes" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.kevinsawicki', module='stock-quotes', version='1.3')
)
libraryDependencies += "com.github.kevinsawicki" % "stock-quotes" % "1.3"
[com.github.kevinsawicki/stock-quotes "1.3"]

Dependencies

compile (1)

Group / Artifact Type Version
com.github.kevinsawicki : http-request jar 5.4

test (1)

Group / Artifact Type Version
junit : junit jar 4.10

Project Modules

There are no modules declared in this project.

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

Versions

Version
1.3
1.2
1.1
1.0
0.3
0.2
0.1