Open IEX Cloud: IEX Cloud
IEX Cloud (iexcloud.io) support has been added to the library. All stuff related to old IEX Api has been marked as Deprecated. Some of old IEX Api will be still supported. For full support please move to the IEX Cloud API (iexcloud.io).
Java SE 8 is required to use IEXTrading4j library.
Maven:
<dependency>
<groupId>pl.zankowski</groupId>
<artifactId>iextrading4j-all</artifactId>
<version>3.4.5</version>
</dependency>
Gradle:
dependencies {
compile 'pl.zankowski:iextrading4j-all:3.4.5'
}
Library is up to:
Supported versions: Java SE 8, Java SE 9, Java SE 10, Java SE 11, Java SE 12
IEXTrading4j library allows to receive all data available in API provided by IEXTrading company. They allow to use their market data completely for free, so go and try it out!
IEX Cloud Data & API description: https://iexcloud.io
Old Data & API description: https://iextrading.com/developer
Unofficial library listed on IEXTrading
IEX A Fair, Simple, Transparent Exchange.
IEX is a stock exchange based in the United States. Started by Brad Katsuyama, it opened for trading on October 25, 2013. The company’s offices are located at 4 World Trade Center in New York City. The matching engine is located across the Hudson River in Weehawken, New Jersey, and the initial point of presence is located in a data center in Secaucus, New Jersey. IEX's main innovation is a 38-mile coil of optical fiber placed in front of its trading engine. This 350 microsecond delay adds a round-trip delay of 0.0007 seconds and is designed to negate the certain speed advantages utilized by some high-frequency traders.
IEX was created in response to questionable trading practices that had become widely used across traditional public Wall Street exchanges as well as dark pools and other alternative trading systems. The IEX exchange aims to attract investors by promising to "play fair" by operating in a transparent and straightforward manner, while also helping to level the playing field for traders. Strategies to achieve those goals include:
Check out their beautiful site: IEX Trading
To build request use classes that extend IEXCloudV1RestRequest
interface. Secret token is required only for Account calls, otherwise you can provide just publishable token. Example request:
final IEXCloudClient cloudClient = IEXTradingClient.create(IEXTradingApiVersion.IEX_CLOUD_BETA_SANDBOX,
new IEXCloudTokenBuilder()
.withPublishableToken("Tpk_18dfe6cebb4f41ffb219b9680f9acaf2")
.withSecretToken("Tsk_3eedff6f5c284e1a8b9bc16c54dd1af3")
.build());
final Quote quote = cloudClient.executeRequest(new QuoteRequestBuilder()
.withSymbol("AAPL")
.build());
System.out.println(quote);
final IEXCloudClient cloudClient = IEXTradingClient.create(IEXTradingApiVersion.IEX_CLOUD_BETA_SANDBOX,
new IEXCloudTokenBuilder()
.withPublishableToken("Tpk_18dfe6cebb4f41ffb219b9680f9acaf2")
.withSecretToken("Tsk_3eedff6f5c284e1a8b9bc16c54dd1af3")
.build());
final BatchStocks result = cloudClient.executeRequest(new BatchStocksRequestBuilder()
.withSymbol("AAPL")
.addType(BatchStocksType.LARGEST_TRADES)
.addType(BatchStocksType.PRICE_TARGET)
.addType(BatchStocksType.QUOTE)
.build());
System.out.println(result);
To build request use classes that extend ISseRequestBuilder
interface. Example request:
final IEXCloudClient cloudClient = IEXTradingClient.create(IEXTradingApiVersion.IEX_CLOUD_BETA_SANDBOX,
new IEXCloudTokenBuilder()
.withPublishableToken("Tpk_18dfe6cebb4f41ffb219b9680f9acaf2")
.withSecretToken("Tsk_3eedff6f5c284e1a8b9bc16c54dd1af3")
.build());
final Consumer<List<TOPS>> TOPS_CONSUMER = System.out::println;
final SseRequest<List<TOPS>> request = new TopsSseRequestBuilder()
.withSymbol("AAPL")
.build();
cloudClient.subscribe(request, TOPS_CONSUMER);
Please see samples for more examples.
Support for IEX Api has been reduced after June 1, 2019.
To build request use classes that extend IEXApiRestRequest
interface. Example request:
final IEXApiClient iexTradingClient = IEXTradingClient.create();
final Quote quote = iexTradingClient.executeRequest(new QuoteRequestBuilder()
.withSymbol("AAPL")
.build());
System.out.println(quote);
Please visit Wiki to get more information.
Code and documentation released under the Apache License, Version 2.0
Data provided for free by IEX.
IEX Trading API Exhibit A: Exhibit A
IEX Trading allows users to receive their market data completely for free. Their data can be accessed in real-time during market session or can be downloaded as recorded sessions in PCAP data format. Market Data is transported in binary format and can be read according to specification shared on their site.
This library allows you to transform binary packets into human readable Market Data events in Java.
More on this topic can found here: IEX Trading Market Data
IEXTrading4j Book library allows to build incremental Order Book based on PriceLevelUpdateMessages from DEEP market data stream. OrderBook implementation follows description from specification.
IEXTrading4j FIX project provides open source FIX dictionary that follows IEX FIX specification. It allows to easily integrate your systems with IEX FIX connectivity using libraries like QuickFIX or QuickFIX/J.