Java code for Bulk Import of Fixed Income ISINs to get RICs in TRTH v2 REST API

I have a client who wants to retrieve prices for a list of fixed
income instruments using ISINs in TRTH v2 API using a REST call in Java.As you may
know, ISIN/ CUSIP/ SEDOL mappings for Fixed Income instruments in the TRTH v2
Historical Search is work-in-progress (targeted to be fixed with DSS release
11.2)
Using the TRTH v2 GUI as a work around clients can
alternatively import Fixed Income instruments using the DSS work flow as
illustrated below:
- On a spreadsheet (CSV
file) enter ISN in first column and ISIN’s in second column, for specific
exchange prices enter exchange code in fourth column leaving third column
blank.
- Sample: I took ISIN < GB00B16NNR78> and
retrieving LSE prices hence entered source code <L> in fourth column:
Col 1 Col 2 Col 3 Col 4
ISN GB00B16NNR78 L
But client wants an equivalent call to upload the csv using Java.
Can you provide a JAVA API code that resembles the GUI workaround as suggested
above?
Best Answer
-
There is no API call to upload a CSV instruments file, but using the REST API one can create an instrument list, and append instruments to it, including all 4 parameters you list (Identifier type, Identifier, user defined identifier, source).
The java code to create the body of the request to add a single instrument looks like this:
JSONOrderedObject instListJSONObject = new JSONOrderedObject()
.put("Identifiers", new JSONArray()
.put(new JSONObject()
.put("Identifier", "GB00B16NNR78")
.put("IdentifierType", "Isin")
.put("UserDefinedIdentifier", "Test")
.put("Source", "L")))
.put("KeepDuplicates", false);I attached a Java sample, which is a small modification of an existing one from our sample set. As that set uses some libraries, you might want to download the full set (including the libraries) from the downloads tab, and add the attached sample to it. That will make it easy to run it.
The attached sample contains a method addInstrumentsToList which implements this, for one instrument (the one from your example). To append all instruments from a long list it would be easy to either call this method inside a loop, or make a loop inside the method to add all instruments in one go.dss2instrumentsclientsource.zip
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 688 Datastream
- 1.4K DSS
- 625 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 557 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 276 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 1.9K Refinitiv Data Platform
- 695 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 105 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 92 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛