How to get all instruments by API request for a list created manually in DSS (not a count as ment...

Best Answer
-
@stas.grinberg,
If I understand correctly, you want to use the API to retrieve the list of instruments in an instrument list stored on the server.
For this you need the instrument list ID.
Step 1: get the instrument list ID from the instrument list name
If you only have the list name, you can retrieve the ID using the GetByName call:
This delivers the ListId:
{
"@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#InstrumentLists/$entity",
"ListId": "0x066c72ea4b60201a",
"Name": "MyListName",
"Count": 2,
"Created": "2018-10-03T16:59:07.670Z",
"Modified": "2018-10-03T16:59:29.986Z"
}Step 2: get all instruments in the instrument list stored on the server
You can use the GetAllInstruments call (replace the InstrumentList Id value by the ID of your own list):
GET https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/InstrumentLists(';0x066c72ea4b60201a')/ThomsonReuters.Dss.Api.Extractions.InstrumentListGetAllInstruments
The result will contain a set of records, one per instrument. Each record contains the Identifier, IdentifierType, etc. Here is an extract of a sample output:
{
"@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#InstrumentListItems",
"value": [
{
"ListId": "0x066c72ea4b60201a",
"Identifier": "SARON.S",
"IdentifierType": "Ric",
"Source": "SWX",
"UserDefinedIdentifier": "",
"UserDefinedIdentifier2": "",
"UserDefinedIdentifier3": "",
"UserDefinedIdentifier4": "",
"UserDefinedIdentifier5": "",
"UserDefinedIdentifier6": "",
"Order": 4,
"Description": "SARON Swiss Average Rate ON",
"InstrumentListItemKey": "VjF8MHgwNjZjNzJlYTRiNjAyMDFhfDQ",
"InstrumentKey": "VjF8MHgwMDEwMGIwMDAzN2Y5YjhhfDB4MDAxMDBiMDAwZjVkYWIxMnxTV1h8TU5RVXxNT05ZfE1PTll8WXx8U0FST04uU3wzNjk4"
},
...
]
}Is this what you were searching for ?
0
Answers
-
Christiaan Meihsl Hi, i tried the way you suggested it worked but i am wondering how can i use this API call GetAllInstrumentsListItems. When i hit this urr directly it results in err "message": "InstrumentListItem's must be retrieved in the context of their InstrumentList". It expects instrument list id somehow, how can i pass it, i tried to put that using @odata.context but i din't work.
0 -
Hello @xds-support,
Questions with accepted correct answers are not actively monitored by this forum's moderators.
It is better to ask a new question as a new question, and to include the link to the related question in the question's body.
Try:
GET {{protocol}}{{host}}{{api}}Extractions/InstrumentLists('{{listId}}')/ThomsonReuters.Dss.Api.Extractions.InstrumentListGetAllInstruments
Where listId is the Id of your created list.
0 -
Thanks Zoya, As i already stated that the above solution works fine but how can i use rest endpoint in context with instrument list, mentioned in API TREE here
0 -
Hello @xds-support,
You will be able to use the endpoint to pull a specific InstrumentListItem by item id, for example
{{protocol}}{{host}}{{api}}Extractions/InstrumentListItems('ItemId')
Sometimes, you may wish to delete an item from a list this way.
You may request the list by itemId as well
{{protocol}}{{host}}{{api}}Extractions/InstrumentListItems('ItemId')/InstrumentList
although this is not particularly common usage, in my understanding.
To request all the items in the list, please use the approach above as suggested by Christiaan.
Hope this helps
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
- 690 Datastream
- 1.4K DSS
- 629 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
- 559 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
- 25 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 279 Open PermID
- 45 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 716 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
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 95 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛