IPF Live Updates
Overview
By default Instrument Profile Format (IPF) Web Service provides the latest known snapshot of the instrument profiles. It is possible to enable live updates mode and receive a stream of all profile updates after the initial snapshot.
This functionality is implemented via HTTP streaming connection which will be kept alive by the server.
Methods
You can enable live updates using one of the two methods:
Specify live=true parameter in the URL query: https://tools.dxfeed.com/ipf?live=true.
Specify X-Live: yes HTTP header in the request.
Note that using live updates is suitable for current updates in batch mode (so date parameter should not be specified).
dxFeed API
Use dxFeed APIs with com.dxfeed.ipf.live.InstrumentProfileConnection class for tracking live updates, e.g. instruments addition and removal.
Note that it is required to check the instrument type. Instrument removal is indicated by sending a profile with type REMOVED for the removed symbol.
Java API
Use com.dxfeed.ipf.live.InstrumentProfileConnection with com.dxfeed.ipf.live.InstrumentProfileCollector to avoid receiving duplicates. All data is loaded in a text file, the collector passes through all data as a filter and transfers changes to the listener.
.Net API
Use сom.dxfeed.ipf.live.InstrumentProfileConnection with com.dxfeed.ipf.live.InstrumentProfileUpdateListener for data receiving based on your events subscription.
Command-line tools
You can also use command line tools, such as curl or wget. These allow you to receive new instrument profiles.
Curl
curl -u demo:demo https://tools.dxfeed.com/ipf?live=true
curl -u demo:demo -H "X-Live:yes" https://tools.dxfeed.com/ipf
Wget
wget --user demo --password demo -O instruments.ipf https://tools.dxfeed.com/ipf?live=true
wget --user demo --password demo --header "X-Live: yes" -O instruments.ipf https://tools.dxfeed.com/ipf