Skip to content

Commit

Permalink
Update to newest iexcloud (#95)
Browse files Browse the repository at this point in the history
* Update iex cloud api changes

* Update version to 3.3.3
  • Loading branch information
WojciechZankowski authored Jun 1, 2020
1 parent f4284c0 commit 45a6a83
Show file tree
Hide file tree
Showing 36 changed files with 696 additions and 457 deletions.
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
# Change Log
All notable changes to this project will be documented in this file.

## [3.3.3] - 2020-06-01

### Changed

- Added ```next``` to Dividends Range [[#94](https://github.com/WojciechZankowski/iextrading4j/pull/94)]
- Added ```figi``` and ```cik``` to ref data
- Added ```fiscalDate``` and ```currency``` to Balance Sheet
- Added ```fiscalDate``` and ```currency``` to Cash Flow
- Added ```fiscalDate``` and ```currency``` to Financials
- Added ```fiscalDate``` and ```currency``` to Income Statement
- Added ```currency``` to Price Targets
- Added ```highTime```, ```highSource```, ```lowTime```, ```lowSource```, ```iexOpen```, ```iexOpenTime```, ```iexClose```, ```iexCloseTime``` attributes to Stock Quote

## [3.3.2] - 2019-12-23

### Changed
Expand Down Expand Up @@ -355,4 +368,6 @@ All notable changes to this project will be documented in this file.
[3.2.7]: https://github.com/WojciechZankowski/iextrading4j/compare/IT4J_RELEASE_3_2_6...IT4J_RELEASE_3_2_7
[3.2.8]: https://github.com/WojciechZankowski/iextrading4j/compare/IT4J_RELEASE_3_2_7...IT4J_RELEASE_3_2_8
[3.3.0]: https://github.com/WojciechZankowski/iextrading4j/compare/IT4J_RELEASE_3_2_8...IT4J_RELEASE_3_3_0
[3.3.1]: https://github.com/WojciechZankowski/iextrading4j/compare/IT4J_RELEASE_3_3_0...IT4J_RELEASE_3_3_1
[3.3.1]: https://github.com/WojciechZankowski/iextrading4j/compare/IT4J_RELEASE_3_3_0...IT4J_RELEASE_3_3_1
[3.3.2]: https://github.com/WojciechZankowski/iextrading4j/compare/IT4J_RELEASE_3_3_1...IT4J_RELEASE_3_3_2
[3.3.3]: https://github.com/WojciechZankowski/iextrading4j/compare/IT4J_RELEASE_3_3_2...IT4J_RELEASE_3_3_3
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ Maven:
<dependency>
<groupId>pl.zankowski</groupId>
<artifactId>iextrading4j-all</artifactId>
<version>3.3.2</version>
<version>3.3.3</version>
</dependency>
```

Gradle:

```
dependencies {
compile 'pl.zankowski:iextrading4j-all:3.3.2'
compile 'pl.zankowski:iextrading4j-all:3.3.3'
}
```

Expand Down
2 changes: 1 addition & 1 deletion iextrading4j-acceptance/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>iextrading4j</artifactId>
<groupId>pl.zankowski</groupId>
<version>3.3.2</version>
<version>3.3.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public void tagsTest() {
assertThat(result).isNotNull();
}

@Ignore("Message received from IEX Trading: This endpoint is unavailable at this time")
@Test
public void isinTest() {
final List<List<SymbolMapping>> result = cloudClient.executeRequest(new IsinMapperRequestBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,14 @@
import pl.zankowski.iextrading4j.api.stocks.SectorPerformance;
import pl.zankowski.iextrading4j.api.stocks.TodayEarnings;
import pl.zankowski.iextrading4j.api.stocks.TodayIpos;
import pl.zankowski.iextrading4j.api.stocks.v1.AdvancedStats;
import pl.zankowski.iextrading4j.api.stocks.v1.BalanceSheets;
import pl.zankowski.iextrading4j.api.stocks.v1.BatchStocks;
import pl.zankowski.iextrading4j.api.stocks.v1.CashFlows;
import pl.zankowski.iextrading4j.api.stocks.v1.Dividends;
import pl.zankowski.iextrading4j.api.stocks.v1.Estimates;
import pl.zankowski.iextrading4j.api.stocks.v1.Financials;
import pl.zankowski.iextrading4j.api.stocks.v1.FundOwnership;
import pl.zankowski.iextrading4j.api.stocks.v1.IncomeStatements;
import pl.zankowski.iextrading4j.api.stocks.v1.InsiderRoster;
import pl.zankowski.iextrading4j.api.stocks.v1.InsiderSummary;
import pl.zankowski.iextrading4j.api.stocks.v1.InsiderTransaction;
import pl.zankowski.iextrading4j.api.stocks.v1.Intraday;
import pl.zankowski.iextrading4j.api.stocks.v1.KeyStats;
import pl.zankowski.iextrading4j.api.stocks.v1.News;
import pl.zankowski.iextrading4j.api.stocks.v1.Ownership;
import pl.zankowski.iextrading4j.api.stocks.v1.TechnicalIndicator;
import pl.zankowski.iextrading4j.api.stocks.v1.TechnicalIndicatorType;
import pl.zankowski.iextrading4j.api.stocks.v1.*;
import pl.zankowski.iextrading4j.client.rest.request.stocks.BookRequestBuilder;
import pl.zankowski.iextrading4j.client.rest.request.stocks.ChartRequestBuilder;
import pl.zankowski.iextrading4j.client.rest.request.stocks.CollectionRequestBuilder;
import pl.zankowski.iextrading4j.client.rest.request.stocks.CollectionType;
import pl.zankowski.iextrading4j.client.rest.request.stocks.CompanyRequestBuilder;
import pl.zankowski.iextrading4j.client.rest.request.stocks.DelayedQuoteRequestBuilder;
import pl.zankowski.iextrading4j.client.rest.request.stocks.DividendRange;
import pl.zankowski.iextrading4j.client.rest.request.stocks.EarningsRequestBuilder;
import pl.zankowski.iextrading4j.client.rest.request.stocks.LargestTradeRequestBuilder;
import pl.zankowski.iextrading4j.client.rest.request.stocks.ListRequestBuilder;
Expand All @@ -52,26 +36,7 @@
import pl.zankowski.iextrading4j.client.rest.request.stocks.TodayEarningsRequestBuilder;
import pl.zankowski.iextrading4j.client.rest.request.stocks.TodayIposRequestBuilder;
import pl.zankowski.iextrading4j.client.rest.request.stocks.UpcomingIposRequestBuilder;
import pl.zankowski.iextrading4j.client.rest.request.stocks.v1.AdvancedStatsRequestBuilder;
import pl.zankowski.iextrading4j.client.rest.request.stocks.v1.BalanceSheetRequestBuilder;
import pl.zankowski.iextrading4j.client.rest.request.stocks.v1.BatchMarketStocksRequestBuilder;
import pl.zankowski.iextrading4j.client.rest.request.stocks.v1.BatchStocksRequestBuilder;
import pl.zankowski.iextrading4j.client.rest.request.stocks.v1.BatchStocksType;
import pl.zankowski.iextrading4j.client.rest.request.stocks.v1.CashFlowRequestBuilder;
import pl.zankowski.iextrading4j.client.rest.request.stocks.v1.DividendsRequestBuilder;
import pl.zankowski.iextrading4j.client.rest.request.stocks.v1.EstimatesRequestBuilder;
import pl.zankowski.iextrading4j.client.rest.request.stocks.v1.FinancialsRequestBuilder;
import pl.zankowski.iextrading4j.client.rest.request.stocks.v1.FundOwnershipRequestBuilder;
import pl.zankowski.iextrading4j.client.rest.request.stocks.v1.IncomeStatementRequestBuilder;
import pl.zankowski.iextrading4j.client.rest.request.stocks.v1.InsiderRosterRequestBuilder;
import pl.zankowski.iextrading4j.client.rest.request.stocks.v1.InsiderSummaryRequestBuilder;
import pl.zankowski.iextrading4j.client.rest.request.stocks.v1.InsiderTransactionRequestBuilder;
import pl.zankowski.iextrading4j.client.rest.request.stocks.v1.InstitutionalOwnershipRequestBuilder;
import pl.zankowski.iextrading4j.client.rest.request.stocks.v1.IntradayRequestBuilder;
import pl.zankowski.iextrading4j.client.rest.request.stocks.v1.KeyStatsRequestBuilder;
import pl.zankowski.iextrading4j.client.rest.request.stocks.v1.NewsRequestBuilder;
import pl.zankowski.iextrading4j.client.rest.request.stocks.v1.Period;
import pl.zankowski.iextrading4j.client.rest.request.stocks.v1.TechnicalIndicatorRequestBuilder;
import pl.zankowski.iextrading4j.client.rest.request.stocks.v1.*;

import java.math.BigDecimal;
import java.util.List;
Expand Down Expand Up @@ -172,6 +137,7 @@ public void quoteTest() {
final Quote result = cloudClient.executeRequest(new QuoteRequestBuilder()
.withSymbol("AAPL")
.build());
System.out.println(result);
assertThat(result).isNotNull();
}

Expand All @@ -191,6 +157,15 @@ public void dividendsTest() {
assertThat(result).isNotNull();
}

@Test
public void nextDividendsTest() {
final List<Dividends> result = cloudClient.executeRequest(new DividendsRequestBuilder()
.withSymbol("AAPL")
.withDividendRange(DividendRange.NEXT)
.build());
assertThat(result).isNotNull();
}

@Test
public void earningsTest() {
final Earnings result = cloudClient.executeRequest(new EarningsRequestBuilder()
Expand Down Expand Up @@ -264,6 +239,7 @@ public void incomeStatementTest() {
final IncomeStatements result = cloudClient.executeRequest(new IncomeStatementRequestBuilder()
.withSymbol("AAPL")
.build());
System.out.println(result);
assertThat(result).isNotNull();
}

Expand Down Expand Up @@ -620,4 +596,13 @@ public void technicalIndicatorTest() {
assertThat(result).isNotNull();
}

@Test
public void priceTargetTest() {
final PriceTarget priceTarget = cloudClient.executeRequest(new PriceTargetRequestBuilder()
.withSymbol("AAPL")
.build());
System.out.println(priceTarget);
assertThat(priceTarget).isNotNull();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public class SystemAcceptanceTest extends IEXCloudV1AcceptanceTestBase {
public void systemStatusTest() {
final SystemStatus systemStatus = cloudClient.executeRequest(new SystemStatusRequestBuilder()
.build());
System.out.println(systemStatus);
assertThat(systemStatus).isNotNull();
}

Expand Down
2 changes: 1 addition & 1 deletion iextrading4j-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>iextrading4j</artifactId>
<groupId>pl.zankowski</groupId>
<version>3.3.2</version>
<version>3.3.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion iextrading4j-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>iextrading4j</artifactId>
<groupId>pl.zankowski</groupId>
<version>3.3.2</version>
<version>3.3.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import pl.zankowski.iextrading4j.api.refdata.SymbolType;

import java.io.Serializable;
import java.time.LocalDate;
import java.util.Objects;
import java.util.StringJoiner;

@JsonPropertyOrder({"symbol", "exchange", "name", "date", "type",
"iexId", "region", "currency", "isEnabled"})
"iexId", "region", "currency", "isEnabled", "figi", "cik"})
public class ExchangeSymbol implements Serializable {

private static final long serialVersionUID = -5740262153957115684L;
Expand All @@ -25,6 +26,8 @@ public class ExchangeSymbol implements Serializable {
private final String region;
private final String currency;
private final Boolean isEnabled;
private final String figi;
private final String cik;

@JsonCreator
public ExchangeSymbol(
Expand All @@ -36,7 +39,9 @@ public ExchangeSymbol(
@JsonProperty("iexId") final String iexId,
@JsonProperty("region") final String region,
@JsonProperty("currency") final String currency,
@JsonProperty("isEnabled") final Boolean isEnabled) {
@JsonProperty("isEnabled") final Boolean isEnabled,
@JsonProperty("figi") final String figi,
@JsonProperty("cik") final String cik) {
this.symbol = symbol;
this.exchange = exchange;
this.name = name;
Expand All @@ -46,6 +51,8 @@ public ExchangeSymbol(
this.region = region;
this.currency = currency;
this.isEnabled = isEnabled;
this.figi = figi;
this.cik = cik;
}

public String getSymbol() {
Expand Down Expand Up @@ -85,6 +92,14 @@ public Boolean getEnabled() {
return isEnabled;
}

public String getFigi() {
return figi;
}

public String getCik() {
return cik;
}

@Override
public boolean equals(final Object o) {
if (this == o) {
Expand All @@ -94,36 +109,39 @@ public boolean equals(final Object o) {
return false;
}
final ExchangeSymbol that = (ExchangeSymbol) o;
return Objects.equal(symbol, that.symbol) &&
Objects.equal(exchange, that.exchange) &&
Objects.equal(name, that.name) &&
Objects.equal(date, that.date) &&
return Objects.equals(symbol, that.symbol) &&
Objects.equals(exchange, that.exchange) &&
Objects.equals(name, that.name) &&
Objects.equals(date, that.date) &&
type == that.type &&
Objects.equal(iexId, that.iexId) &&
Objects.equal(region, that.region) &&
Objects.equal(currency, that.currency) &&
Objects.equal(isEnabled, that.isEnabled);
Objects.equals(iexId, that.iexId) &&
Objects.equals(region, that.region) &&
Objects.equals(currency, that.currency) &&
Objects.equals(isEnabled, that.isEnabled) &&
Objects.equals(figi, that.figi) &&
Objects.equals(cik, that.cik);
}

@Override
public int hashCode() {
return Objects.hashCode(symbol, exchange, name, date, type, iexId,
region, currency, isEnabled);
return Objects.hash(symbol, exchange, name, date, type, iexId, region, currency,
isEnabled, figi, cik);
}

@Override
public String toString() {
return MoreObjects.toStringHelper(this)
.add("symbol", symbol)
.add("exchange", exchange)
.add("name", name)
.add("date", date)
.add("type", type)
.add("iexId", iexId)
.add("region", region)
.add("currency", currency)
.add("isEnabled", isEnabled)
return new StringJoiner(", ", ExchangeSymbol.class.getSimpleName() + "[", "]")
.add("symbol='" + symbol + "'")
.add("exchange='" + exchange + "'")
.add("name='" + name + "'")
.add("date=" + date)
.add("type=" + type)
.add("iexId='" + iexId + "'")
.add("region='" + region + "'")
.add("currency='" + currency + "'")
.add("isEnabled=" + isEnabled)
.add("figi='" + figi + "'")
.add("cik='" + cik + "'")
.toString();
}

}
Loading

0 comments on commit 45a6a83

Please sign in to comment.