IEX Cloud data has ceased to exist, so this library is irrelevant, see you on the other side and farewell!
This is a Java library for interfacing with the IEX Cloud API. It provides a convenient and straightforward way to access a wide range of financial market data, such as stock quotes, historical data, and more.
You can add this library to your Java project using Maven:
<dependency>
<groupId>io.github.f4pl0</groupId>
<artifactId>iex-cloud</artifactId>
<version>1.12.0</version>
</dependency>
Or, if you are using Gradle:
dependencies {
implementation 'io.github.f4pl0:iex-cloud:1.12.0'
}
Before using this library, you will need to obtain an API key from IEX Cloud. You can sign up for an API key here.
Once you have an API key, you can use it to initialize the IEX Cloud client:
import io.github.f4pl0.IEXCloudClient;
public class Main {
public static void main(String[] args) {
IEXCloudClient client = new IEXCloudClient.IEXCloudClientBuilder()
.setPublishableToken("pk_yourpublishabletoken")
.build();
}
}
You can then use the client to access various endpoints of the IEX Cloud API.
Here are some examples of how to use this library:
StockQuote quote = client.getStockQuote("AAPL");
System.out.println("Apple Inc. (AAPL) current price: " + quote.getLatestPrice());
List<HistoricalPrice> historicalPrices = client.getHistoricalPrices("AAPL", 5, ChartRange.ONE_MONTH);
for (HistoricalPrice price : historicalPrices) {
System.out.println(price.getDate() + ": " + price.getClose());
}
List<NewsArticle> news = client.getMarketNews();
for (NewsArticle article : news) {
System.out.println(article.getHeadline());
}
For more details on how to use this library and the available API endpoints, refer to the wiki.
Contributions from the community are welcome. If you find a bug, have a feature request, or want to contribute in any way, please check out our contribution guidelines.
This library is licensed under the MIT License. See the LICENSE file for details.
Enjoy using the IEX Cloud API Wrapper Library for Java! If you have any questions or need assistance, please feel free to open an issue.