+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..ced6724
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index ecfa09c..b173c63 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,4 +1,3 @@
-
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
new file mode 100644
index 0000000..2b63946
--- /dev/null
+++ b/.idea/uiDesigner.xml
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..067a3ea
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,66 @@
+# Contributing Guidelines
+
+Thank you for considering contributing to the IEX Cloud API Wrapper Library for Java! We welcome your contributions to make this library even better. Please take a moment to read these guidelines to understand how you can contribute.
+
+## Reporting Issues
+
+If you encounter a bug, have a feature request, or any other issue related to this library, please check the following steps before creating an issue:
+
+1. Search the [GitHub issues](https://github.com/F4pl0/iex-cloud-java/issues) to see if the issue has already been reported.
+
+2. Ensure your issue is relevant to this project and not a general IEX Cloud API issue.
+
+3. If you find an existing issue, feel free to comment on it to provide more information or express your interest in it.
+
+4. If you can't find an existing issue, please create a new one and include the following details:
+ - A descriptive title.
+ - A clear and detailed description of the issue.
+ - Steps to reproduce the problem (if applicable).
+ - Any error messages or stack traces.
+ - Information about your environment (Java version, operating system, etc.).
+
+## Pull Requests
+
+We welcome pull requests that improve the library, fix bugs, or add new features. To submit a pull request, please follow these steps:
+
+1. Fork the repository.
+
+2. Create a new branch with a meaningful name for your changes.
+
+3. Make your changes, ensuring that your code follows the project's coding standards and conventions.
+
+4. Write unit tests if applicable.
+
+5. Update the project's documentation if necessary.
+
+6. Ensure that your code doesn't introduce any new warnings or errors.
+
+7. Commit your changes and write a clear and concise commit message that describes what you did.
+
+8. Push your changes to your fork on GitHub.
+
+9. Create a pull request from your branch to the main repository's `main` branch.
+
+10. In your pull request description, provide a clear and detailed explanation of your changes. Mention if your PR is fixing a specific issue, and reference that issue.
+
+11. Be responsive to any comments or feedback from maintainers or contributors.
+
+## Code Style
+
+- Follow the existing code style in the project. If in doubt, refer to the existing code and use consistent formatting.
+
+- Use meaningful variable and method names.
+
+- Write comments for complex or non-obvious parts of your code.
+
+## Testing
+
+- Ensure that your changes do not break existing tests.
+
+- If you introduce new features or fix bugs, include tests to cover the new code.
+
+## Licensing
+
+By contributing to this project, you agree that your contributions will be licensed under the project's [MIT License](LICENSE). If you include any third-party code or libraries, please make sure they are compatible with the project's license.
+
+Thank you for your contribution to the IEX Cloud API Wrapper Library for Java! Your efforts help improve the library for everyone.
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..c83f490
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,7 @@
+Copyright 2023 f4pl0
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..c20e02c
--- /dev/null
+++ b/README.md
@@ -0,0 +1,99 @@
+# iex-cloud-java
+
+![IEX Cloud Logo](https://www.giantmachines.com/wp-content/uploads/2023/03/5e7e3da8df522d95bd159c94_IEX-Cloud-e1680079186819.png)
+
+This is a Java library for interfacing with the [IEX Cloud](https://iexcloud.io/) 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.
+
+## Table of Contents
+
+- [Installation](#installation)
+- [Usage](#usage)
+- [Examples](#examples)
+- [Documentation](#documentation)
+- [Contributing](#contributing)
+- [License](#license)
+
+## Installation
+
+You can add this library to your Java project using Maven:
+
+```xml
+
+ io.github.f4pl0
+ iex-cloud
+ 1.12.0
+
+```
+
+Or, if you are using Gradle:
+
+```gradle
+dependencies {
+ implementation 'io.github.f4pl0:iex-cloud:1.12.0'
+}
+```
+
+## Usage
+
+Before using this library, you will need to obtain an API key from IEX Cloud. You can sign up for an API key [here](https://iexcloud.io/cloud-login#/register/).
+
+Once you have an API key, you can use it to initialize the IEX Cloud client:
+
+```java
+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.
+
+## Examples
+
+Here are some examples of how to use this library:
+
+### Get a Stock Quote
+
+```java
+StockQuote quote = client.getStockQuote("AAPL");
+System.out.println("Apple Inc. (AAPL) current price: " + quote.getLatestPrice());
+```
+
+### Retrieve Historical Prices
+
+```java
+List historicalPrices = client.getHistoricalPrices("AAPL", 5, ChartRange.ONE_MONTH);
+for (HistoricalPrice price : historicalPrices) {
+ System.out.println(price.getDate() + ": " + price.getClose());
+}
+```
+
+### Fetch Market News
+
+```java
+List news = client.getMarketNews();
+for (NewsArticle article : news) {
+ System.out.println(article.getHeadline());
+}
+```
+
+## Documentation
+
+For more details on how to use this library and the available API endpoints, refer to the [wiki](https://github.com/F4pl0/iex-cloud-java/wiki).
+
+## Contributing
+
+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](CONTRIBUTING.md).
+
+## License
+
+This library is licensed under the MIT License. See the [LICENSE](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](https://github.com/F4pl0/iex-cloud-java/issues).
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index d868e34..6a4d6a4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
io.github.f4pl0iex-cloud
- 1.11.3-SNAPSHOT
+ 1.12.0jarIEX CloudJava wrapper for IEX Cloud API
@@ -126,7 +126,6 @@
ossrhhttps://s01.oss.sonatype.org${env.AUTO_RELEASE_AFTER_CLOSE}
- 600
diff --git a/src/main/java/io/github/f4pl0/IEXCloudClient.java b/src/main/java/io/github/f4pl0/IEXCloudClient.java
index 5f312f8..53ec146 100644
--- a/src/main/java/io/github/f4pl0/IEXCloudClient.java
+++ b/src/main/java/io/github/f4pl0/IEXCloudClient.java
@@ -1,21 +1,31 @@
package io.github.f4pl0;
+import io.github.f4pl0.config.ConfigInjector;
+import io.github.f4pl0.config.IEXCloudConfig;
import io.github.f4pl0.equitiesmarketdata.EquitiesMarketData;
import io.github.f4pl0.reference.Reference;
+/**
+ * The IEXCloudClient is the main entry point for the IEX Cloud API.
+ * You will need to set the publishable token before building the client.
+ */
public class IEXCloudClient {
public final EquitiesMarketData equitiesMarketData;
public final Reference reference;
+ /**
+ * Create a new IEXCloudClient.
+ * @param config
+ */
private IEXCloudClient(IEXCloudConfig config) {
-
- equitiesMarketData = new EquitiesMarketData(config);
- reference = new Reference(config);
+ ConfigInjector.injectIEXConfiguration(IEXHttpClient.getInstance(), config);
+ equitiesMarketData = new EquitiesMarketData();
+ reference = new Reference();
}
/**
* Builder for the IEXCloudClient.
- * You will need to set the publishable and secret tokens before building the client.
+ * You will need to set the publishable token before building the client.
*/
public static class IEXCloudClientBuilder {
private String publishableToken;
diff --git a/src/main/java/io/github/f4pl0/IEXCloudConfig.java b/src/main/java/io/github/f4pl0/IEXCloudConfig.java
deleted file mode 100644
index 78f0a7b..0000000
--- a/src/main/java/io/github/f4pl0/IEXCloudConfig.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package io.github.f4pl0;
-
-import lombok.Data;
-
-@Data
-public class IEXCloudConfig {
- private String publishableToken;
- private String secretToken;
- private String baseEndpoint;
-}
\ No newline at end of file
diff --git a/src/main/java/io/github/f4pl0/IEXHttpClient.java b/src/main/java/io/github/f4pl0/IEXHttpClient.java
new file mode 100644
index 0000000..3bbcade
--- /dev/null
+++ b/src/main/java/io/github/f4pl0/IEXHttpClient.java
@@ -0,0 +1,54 @@
+package io.github.f4pl0;
+
+import io.github.f4pl0.config.IEXCloudConfig;
+import io.github.f4pl0.config.IEXConfiguration;
+import lombok.SneakyThrows;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.utils.URIBuilder;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+
+import java.io.IOException;
+import java.net.URI;
+
+/**
+ * The IEXHttpClient is a wrapper around the Apache HttpClient.
+ * It is used to make requests to the IEX Cloud API.
+ * @hidden This class is not part of the public API. DO NOT USE.
+ */
+public class IEXHttpClient {
+ private static IEXHttpClient instance;
+ @IEXConfiguration
+ private IEXCloudConfig config;
+
+ private final CloseableHttpClient httpClient;
+
+ private IEXHttpClient() {
+ this.httpClient = HttpClients.createDefault();
+ }
+
+ @SneakyThrows
+ public CloseableHttpResponse execute(String requestUri) {
+ URI uri = new URIBuilder(config.getBaseEndpoint() + requestUri)
+ .addParameter("token", config.getPublishableToken())
+ .build();
+
+ HttpGet request = new HttpGet(uri);
+
+ CloseableHttpResponse response = httpClient.execute(request);
+
+ if (response.getStatusLine().getStatusCode() >= 400) {
+ throw new IOException("Request failed: " + response.getStatusLine());
+ }
+
+ return response;
+ }
+
+ public static IEXHttpClient getInstance() {
+ if (instance == null) {
+ instance = new IEXHttpClient();
+ }
+ return instance;
+ }
+}
diff --git a/src/main/java/io/github/f4pl0/Main.java b/src/main/java/io/github/f4pl0/Main.java
deleted file mode 100644
index 9e6f983..0000000
--- a/src/main/java/io/github/f4pl0/Main.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package io.github.f4pl0;
-
-import io.github.f4pl0.reference.data.IEXTradingSymbol;
-import lombok.SneakyThrows;
-
-import java.util.List;
-
-public class Main {
-
- @SneakyThrows
- public static void main(String[] args) {
- IEXCloudClient client = new IEXCloudClient.IEXCloudClientBuilder()
- .setPublishableToken("pk_5f9b26d6d90e485a87729ac70e5978a6")
- .build();
-
- List symbols = client.reference.dailyIEXTradingSymbols();
- System.out.println(symbols);
- }
-}
diff --git a/src/main/java/io/github/f4pl0/config/ConfigInjector.java b/src/main/java/io/github/f4pl0/config/ConfigInjector.java
new file mode 100644
index 0000000..f34e155
--- /dev/null
+++ b/src/main/java/io/github/f4pl0/config/ConfigInjector.java
@@ -0,0 +1,24 @@
+package io.github.f4pl0.config;
+
+import lombok.SneakyThrows;
+
+import java.lang.reflect.Field;
+
+/**
+ * The ConfigInjector is used to inject the IEXCloudConfig into the IEXHttpClient.
+ * @hidden This class is not part of the public API. DO NOT USE.
+ */
+public class ConfigInjector {
+
+ @SneakyThrows(IllegalAccessException.class)
+ public static void injectIEXConfiguration(Object instance, IEXCloudConfig config) {
+ Class> clazz = instance.getClass();
+
+ for (Field field : clazz.getDeclaredFields()) {
+ if (field.isAnnotationPresent(IEXConfiguration.class)) {
+ field.setAccessible(true);
+ field.set(instance, config);
+ }
+ }
+ }
+}
diff --git a/src/main/java/io/github/f4pl0/config/IEXCloudConfig.java b/src/main/java/io/github/f4pl0/config/IEXCloudConfig.java
new file mode 100644
index 0000000..e61942e
--- /dev/null
+++ b/src/main/java/io/github/f4pl0/config/IEXCloudConfig.java
@@ -0,0 +1,14 @@
+package io.github.f4pl0.config;
+
+import lombok.Data;
+
+/**
+ * The IEXCloudConfig is used to configure the IEXCloudClient.
+ * @hidden This class is not part of the public API. DO NOT USE.
+ */
+@Data
+public class IEXCloudConfig {
+ private String publishableToken;
+ private String secretToken;
+ private String baseEndpoint;
+}
\ No newline at end of file
diff --git a/src/main/java/io/github/f4pl0/config/IEXConfiguration.java b/src/main/java/io/github/f4pl0/config/IEXConfiguration.java
new file mode 100644
index 0000000..e1c9f41
--- /dev/null
+++ b/src/main/java/io/github/f4pl0/config/IEXConfiguration.java
@@ -0,0 +1,17 @@
+package io.github.f4pl0.config;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.reflect.Field;
+
+/**
+ * This annotation is used to inject the IEXConfiguration object into the class
+ * @hidden This class is not part of the public API. DO NOT USE.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.FIELD)
+public @interface IEXConfiguration {
+}
+
diff --git a/src/main/java/io/github/f4pl0/deserializer/ZeroAsFalseDeserializer.java b/src/main/java/io/github/f4pl0/deserializer/ZeroAsFalseDeserializer.java
new file mode 100644
index 0000000..63dd37f
--- /dev/null
+++ b/src/main/java/io/github/f4pl0/deserializer/ZeroAsFalseDeserializer.java
@@ -0,0 +1,28 @@
+package io.github.f4pl0.deserializer;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.JsonDeserializer;
+
+import java.io.IOException;
+
+/**
+ * Jackson deserializer for boolean values that are represented as 0 or 1.
+ * @hidden This class is not part of the public API. DO NOT USE.
+ */
+public class ZeroAsFalseDeserializer extends JsonDeserializer {
+
+ /**
+ * Deserializes a boolean value that is represented as 0 or 1.
+ * @param jsonParser Parser used for reading JSON content
+ * @param deserializationContext Context that can be used to access information about this deserialization activity.
+ *
+ * @return A boolean value.
+ * @throws IOException If the request fails.
+ */
+ @Override
+ public Boolean deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException {
+ int value = jsonParser.getIntValue();
+ return value != 0;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/io/github/f4pl0/equitiesmarketdata/EquitiesMarketData.java b/src/main/java/io/github/f4pl0/equitiesmarketdata/EquitiesMarketData.java
index 2f87c6b..b910944 100644
--- a/src/main/java/io/github/f4pl0/equitiesmarketdata/EquitiesMarketData.java
+++ b/src/main/java/io/github/f4pl0/equitiesmarketdata/EquitiesMarketData.java
@@ -1,9 +1,7 @@
package io.github.f4pl0.equitiesmarketdata;
-import io.github.f4pl0.IEXCloudConfig;
+import io.github.f4pl0.config.IEXCloudConfig;
import lombok.RequiredArgsConstructor;
-@RequiredArgsConstructor
public class EquitiesMarketData {
- private final IEXCloudConfig config;
}
diff --git a/src/main/java/io/github/f4pl0/reference/Reference.java b/src/main/java/io/github/f4pl0/reference/Reference.java
index a756266..6fd9759 100644
--- a/src/main/java/io/github/f4pl0/reference/Reference.java
+++ b/src/main/java/io/github/f4pl0/reference/Reference.java
@@ -1,8 +1,12 @@
package io.github.f4pl0.reference;
+import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
-import io.github.f4pl0.IEXCloudConfig;
-import io.github.f4pl0.reference.data.IEXTradingSymbol;
+import io.github.f4pl0.IEXHttpClient;
+import io.github.f4pl0.config.IEXCloudConfig;
+import io.github.f4pl0.config.IEXConfiguration;
+import io.github.f4pl0.reference.data.*;
+import lombok.NonNull;
import lombok.SneakyThrows;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
@@ -14,35 +18,349 @@
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
-import java.util.List;
+import java.net.URLEncoder;
+import java.nio.charset.StandardCharsets;
+import java.text.ParseException;
+import java.util.*;
public class Reference {
- private final CloseableHttpClient httpClient;
- private final IEXCloudConfig config;
+ private final IEXHttpClient httpClient = IEXHttpClient.getInstance();
+ private final ObjectMapper mapper = new ObjectMapper();
- public Reference(IEXCloudConfig config) {
- this.httpClient = HttpClients.createDefault();
- this.config = config;
+ /**
+ *
Daily IEX Trading Symbols
+ * Returns an array of symbols the Investors Exchange supports for trading. Symbols may be added or removed by the
+ * Investors Exchange at any time.
+ * @see IEX Cloud API
+ * @throws IOException If the request fails.
+ * @return A list of IEXTradingSymbol objects.
+ */
+ public List dailyIEXTradingSymbols() throws IOException {
+ CloseableHttpResponse response = httpClient.execute("/data/core/ref_data_iex_symbols");
+
+ return mapper.readValue(
+ EntityUtils.toString(response.getEntity()),
+ mapper.getTypeFactory().constructCollectionType(List.class, IEXTradingSymbol.class));
}
- @SneakyThrows(URISyntaxException.class)
- public List dailyIEXTradingSymbols() throws IOException {
- URI uri = new URIBuilder(config.getBaseEndpoint() + "/data/core/ref_data_iex_symbols")
- .addParameter("token", config.getPublishableToken())
- .build();
- HttpGet request = new HttpGet(uri);
+ /**
+ *
Forex Reference data
+ * Returns an array of the supported currencies and currency pairs.
+ * @see IEX Cloud API
+ * @throws IOException If the request fails.
+ * @return An IEXForexReferenceData object.
+ */
+ public IEXForexReferenceData forexReferenceData() throws IOException {
+ CloseableHttpResponse response = httpClient.execute("/data/core/ref_data_fx");
+
+ TypeReference> typeReference = new TypeReference>() {};
+ List forexData =
+ mapper.readValue(EntityUtils.toString(response.getEntity()), typeReference);
+
+ return forexData.get(0);
+ }
+
+ /**
+ *
Futures Reference Data
+ * Returns an array of the supported futures contract symbols.
+ * @see IEX Cloud API
+ * @return A list of IEXFuturesContractSymbol objects.
+ * @throws IOException If the request fails.
+ */
+ public List futuresReferenceData() throws IOException {
+ CloseableHttpResponse response = httpClient.execute("/data/core/ref_data_futures");
+
+ return mapper.readValue(
+ EntityUtils.toString(response.getEntity()),
+ mapper.getTypeFactory().constructCollectionType(List.class, IEXFuturesContractSymbol.class));
+ }
+
+ /**
+ *
Futures Reference Data
+ * Returns an array of the supported futures contract symbols.
+ * @see IEX Cloud API
+ * @param underlying The underlying symbol of the futures contract.
+ * @return A list of IEXFuturesContractSymbol objects.
+ * @throws IOException If the request fails.
+ */
+ public List futuresReferenceData(@NonNull String underlying) throws IOException {
+ String encodedUnderlying = URLEncoder.encode(underlying, StandardCharsets.UTF_8);
+ CloseableHttpResponse response =
+ httpClient.execute("/data/core/ref_data_futures/" + encodedUnderlying);
+
+ return mapper.readValue(
+ EntityUtils.toString(response.getEntity()),
+ mapper.getTypeFactory().constructCollectionType(List.class, IEXFuturesContractSymbol.class));
+ }
+
+ /**
+ *
Mutual Fund Reference Data
+ * Returns an array of the supported mutual fund symbols.
+ * @see IEX Cloud API
+ * @return A list of IEXMutualFundSymbol objects.
+ * @throws IOException If the request fails.
+ */
+ public List mutualFundReferenceData() throws IOException {
+ CloseableHttpResponse response = httpClient.execute("/data/core/ref_data_mutual_funds");
+
+ return mapper.readValue(
+ EntityUtils.toString(response.getEntity()),
+ mapper.getTypeFactory().constructCollectionType(List.class, IEXMutualFundSymbol.class));
+ }
+
+ /**
+ *
OTC Reference Data
+ * Returns an array of the supported over-the-counter (OTC) symbols.
+ * @see IEX Cloud API
+ * @return A list of IEXOTCSymbol objects.
+ * @throws IOException If the request fails.
+ */
+ public List otcReferenceData() throws IOException {
+ CloseableHttpResponse response = httpClient.execute("/data/core/ref_data_otc");
+
+ return mapper.readValue(
+ EntityUtils.toString(response.getEntity()),
+ mapper.getTypeFactory().constructCollectionType(List.class, IEXOTCSymbol.class));
+ }
+
+ /**
+ *
Options Reference Data
+ * Returns an object keyed by symbol with the value of each symbol being an array of available contract dates.
+ * @see IEX Cloud API
+ * @return A Map of String keys and List of Date values.
+ * @throws IOException
+ */
+ public Map> optionsReferenceData() throws IOException {
+ CloseableHttpResponse response = httpClient.execute("/data/core/ref_data_options");
+
+ // The response is a list of maps (for some apparent reason there is only 1 entry in the list)
+ // so we will get and return only the first entry.
+ List