In this how to guide, we show how simple it is to use Intrinio start streaming realtime stock price data. In this example we will be using Java however, you can use any one of our realtime client SDKs.
- Create an account to get an API key
- Sign up for a free trial (of IEX)
- Contact sales if you wish to trial Nasdaq Basic or Delayed SIP
- Install Docker (recommended)
- Testing the code during market hours IEX or Nasdaq Basic & Delayed SIP.
Clone the latest source from github.
The simplest way to run the sdk at anytime regardless of SDK is to use docker. Use the following command to run your app after every step. Use ctrl + c to exit the app.
The docker image should build and run sample app but you will get an unauthorized message. To update the config.json with your API key view the README for SDK specific instructions. For java, it is located at src/intrinio/config.json. If you are using Nasdaq Basic or Delayed SIP, change the provider to NASDAQ_BASIC or DELAYED_SIP.
You have two options to subscribe to the symbols. You can statically specify your symbol subscriptions in the config.json or you can dynamically subscribe at runtime. By default the sample code loads from the config.json.
In order to get the entire market, switch the symbols array to "lobby".
Or you can subscribe to specific symbols or the lobby dynamically at runtime. For Java the sample app is located at src/SampleApp/SampleApp.java (view the README or dockerfile for your specific SDK's sample app). You can update the public static void main method to test this yourself.
Or subscribe to the lobby dynamically at runtime.
Now that you are streaming quotes and trades, let's do something with the data. For this simple example let's modify the onTrade method of the sample app's TradeHandler.
The rest is up to you. Just kidding. We're here to help. Questions? Comments? Ready to buy? Contact email@example.com.