Push client - example
To set up a test environment for push (or streaming) data, open the Sample.java file, then select SamplePushData.java.
To test push (streaming data), it is necessary to comment out the call to SamplePushData.java, because it is disabled by default.
Only comment out the call to SamplePushData.java if you have licensed the use of streaming data. Otherwise you will receive an error message.
Define the content of your query by adding the sample you want to test from the "Samples/Push" folder.
You can choose from the following predefined code samples:
- NewsBroadcast
Subscribes to news broadcast using push (streaming) data.
- Recaps
Subscribes to Recap messages for an instrument list via theRequestRecaps
function.
- SingleInstrument
Subscribes to single instruments or instrument list.
- WholeExchangeFilterElement
Subscribes to one or multiple trading venues filtering by exchange code and security type.
- WholeExchange
Subscribes to one or multiple trading venues using an exchange code.
The example shown above retrieves an instrument list.
Save the file and then execute it.
The example shown above corresponds to the file instruments.txt, which you can find in the Java distribution archive (in "Data" folder).