Skip to content
This repository has been archived by the owner on Aug 31, 2024. It is now read-only.

Commit

Permalink
add: reference data source, metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
F4pl0 committed Oct 30, 2023
1 parent e64dad9 commit b4c54ad
Show file tree
Hide file tree
Showing 34 changed files with 1,507 additions and 61 deletions.
1 change: 1 addition & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
source:jar \
-s settings.xml \
-Dgpg.passphrase=${{ secrets.MAVEN_GPG_PASSPHRASE }} \
-DreleaseVersion=${{ github.event.inputs.releaseVersion }} \
-DdevelopmentVersion=${{ github.event.inputs.developmentVersion }} \
deploy
env:
Expand Down
15 changes: 15 additions & 0 deletions .idea/git_toolbox_prj.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

124 changes: 124 additions & 0 deletions .idea/uiDesigner.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 66 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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.
7 changes: 7 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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.
99 changes: 99 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
<dependency>
<groupId>io.github.f4pl0</groupId>
<artifactId>iex-cloud</artifactId>
<version>1.12.0</version>
</dependency>
```

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<HistoricalPrice> historicalPrices = client.getHistoricalPrices("AAPL", 5, ChartRange.ONE_MONTH);
for (HistoricalPrice price : historicalPrices) {
System.out.println(price.getDate() + ": " + price.getClose());
}
```

### Fetch Market News

```java
List<NewsArticle> 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).
3 changes: 1 addition & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>io.github.f4pl0</groupId>
<artifactId>iex-cloud</artifactId>
<version>1.11.3-SNAPSHOT</version>
<version>1.12.0</version>
<packaging>jar</packaging>
<name>IEX Cloud</name>
<description>Java wrapper for IEX Cloud API</description>
Expand Down Expand Up @@ -126,7 +126,6 @@
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org</nexusUrl>
<autoReleaseAfterClose>${env.AUTO_RELEASE_AFTER_CLOSE}</autoReleaseAfterClose>
<timeout>600</timeout>
</configuration>
</plugin>
<plugin>
Expand Down
18 changes: 14 additions & 4 deletions src/main/java/io/github/f4pl0/IEXCloudClient.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Loading

0 comments on commit b4c54ad

Please sign in to comment.