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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
1 0 0 2

Hi, do you guys know how to add user defined identifiers in API Rest?

dss-rest-apidatascope-selectdssapi
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.

1 Answer

Upvotes
Accepted
116 1 0 2

The user defined identifier fields can be added to each identifier. Up to 6 user defined identifier fields are available, (UserDefinedIdentifier, UserDefinedIdentifier2, UserDefinedIdentifier3, UserDefinedIdentifier4, UserDefinedIdentifier5, UserDefinedIdentifier6). These fields are simple text fields designed to allow the user to associate their own identifying string to the instrument which can be passed through to extraction result. The user defined identifier values can be added were ever the instruments are defined by using the appropriate user defined field, (shown above).

Here is an example of populating the user defined identifiers using the ExtractionRequests.EndOfDayPricingExtractionRequest method:

POST https: //hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ExtractWithNotesHTTP/1.1Authorization: Token<your_auth_token_goes_here>Prefer: respond-asyncContent-Type: application/json;odata=minimalmetadata
{
"ExtractionRequest": {"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.EndOfDayPricingExtractionRequest","ContentFieldNames": ["Asset Status","Asset Type","Bid Price","Currency Code","CUSIP","File Code","Ask Price","High Price","Low Price","Mid Price","Volume","Net Asset Value","Offer Price","Official Close Price","Open Price","Previous Close Price","RIC","Security Description","SEDOL","Ticker","Trade Date"],

"IdentifierList": {"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
"InstrumentIdentifiers": [
{"Identifier": "IBM.N","IdentifierType": "Ric","UserDefinedIdentifier": "MyIBMId","UserDefinedIdentifier2": "MySecondIBMId"},
{"Identifier": "KO.N","IdentifierType": "Ric","UserDefinedIdentifier": "MyCocaColaId"}],
"ValidationOptions": null,
"UseUserPreferencesForValidationOptions": false},
"Condition": null}

}

HTTP/1.1200OK
{
"@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.ExtractionResult",
"Contents": [
{"IdentifierType": "Ric",
"Identifier": "IBM.N",
"UserDefinedIdentifier": "MyIBMId",
"UserDefinedIdentifier2": "MySecondIBMId",
"Asset Status": "ISS",
"Asset Type": "EQTY",
"Bid Price": 153.84,
"Currency Code": "USD",
"CUSIP": "459200101",
"File Code": "77",
"Ask Price": 153.85,
"High Price": 155.33,
"Low Price": 153.39,
"Mid Price": 153.845,
"Volume": 1744215,
"Net Asset Value": -9999301,
"Offer Price": -9999301,
"Official Close Price": -9999301,
"Open Price": 154.17,
"Previous Close Price": 155.34,
"RIC": "IBM.N",
"Security Description": "INTERNATIONAL BUSINESS MACHINES ORD",
"SEDOL": "2005973",
"Ticker": "IBM",
"Trade Date": "2018-02-07"
},

{"IdentifierType": "Ric",
"Identifier": "KO.N",
"UserDefinedIdentifier": "MyCocaColaId",
"Asset Status": "ISS",
"Asset Type": "EQTY",
"Bid Price": 44.56,
"Currency Code": "USD",
"CUSIP": "191216100",
"File Code": "77",
"Ask Price": 44.57,
"High Price": 45.495,
"Low Price": 44.29,
"Mid Price": 44.565,
"Volume": 5578891,
"Net Asset Value": -9999301,
"Offer Price": -9999301,
"Official Close Price": -9999301,
"Open Price": 44.52,
"Previous Close Price": 44.67,
"RIC": "KO.N",
"Security Description": "COCA-COLA ORD",
"SEDOL": "2206657",
"Ticker": "KO",
"Trade Date": "2018-02-07"
}
],

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