For a deeper look into our DataScope Select SOAP API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
3 0 0 3

Override Instrument list without delete it.

Request:

I want to override my instrument list items without delete and create it again.

Scenario:

I have a scheduled job on Datascope select with an InstrumentList, Template and Schedule.

Problem

Sometimes, I want to override Instrument List items without recreating the whole process again (Template,Schedule). I tried to delete the instrument list and create a new one with the same name but it seems that schedule disconnect from the instrument list even when the new list has the same name.

I am wondering if there is a better way to override an instrument list without using ImportFromBytes method.

dss-rest-apidatascope-selectdssrics
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvote
Accepted
11.3k 25 8 13

@prodromos

If you just want to replace all instruments in the existing instrumentList, you can use the ReplaceAllWithIdentifiers endpoint. Below is the sample of request.

POST https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/InstrumentLists('0x06999f9753507bcf')/ThomsonReuters.Dss.Api.Extractions.InstrumentListReplaceAllWithIdentifiers

Body:

{
  "Identifiers": [
    {
      "Identifier": "IBM.N",
      "IdentifierType": "Ric"
    },
    {
      "Identifier": "JPY=",
      "IdentifierType": "Ric"
    },
    {
      "Identifier": "EUR=",
      "IdentifierType": "Ric"
    }
  ],
  "KeepDuplicates": false
}
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvote
13.7k 26 8 12

@prodromos,

There is an API call to retrieve the list of items (i.e. instruments) in an existing list:

GET https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/InstrumentLists('0x06999f9753507bcf')

where 0x06999f9753507bcf is the instrument list ID.

This delivers all instruments, each with their identifier and individual ID in the list. That ID can be used to remove a specific instrument from a list, using:

DELETE https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/InstrumentListItems('VjF8MHgwNjk5OWY5NzUzNTA3YmNmfDE')

where VjF8MHgwNjk5OWY5NzUzNTA3YmNmfDE is the ID of the instrument in the instrument list.

Using these 2 calls you can easily remove instruments from an existing list.

Using the append identifier call you can also add instruments:

POST https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/InstrumentLists('0x06999f9753507bcf')/ThomsonReuters.Dss.Api.Extractions.InstrumentListAppendIdentifiers

Body:

{
    "Identifiers": [
        {
            "Identifier": "IBM.N",
            "IdentifierType": "Ric",
            "UserDefinedIdentifier": "UserIdent4A"
        }
    ],
    "KeepDuplicates": false
}

These calls therefore allow you to manage your instrument list without deleting it.

These calls are described here in the API Reference Tree. You will also be able to run them using the C# example application, described in the Quick Start (see under section "Instrument List Examples").

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea