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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
1 0 0 0

How not to get None values from DSS

Hello, I'm wondering if there is a way in order not to get the whole json full of None values if there is no data in the system? For example, if I'm performing the API call for this instrument - LP72011906, I receive a json like that:

{'IdentifierType': 'Ric', 'Identifier': 'LP72011906', 'Trade Date': '2020-06-24', 'Universal Close Price': None, 'Net Asset Value': None}, {'Identifi

erType': 'Ric', 'Identifier': 'LP72011906', 'Trade Date': '2020-06-25', 'Universal Close Price': None, 'Net Asset Value': None}, {'IdentifierType': 'Ric',

'Identifier': 'LP72011906', 'Trade Date': '2020-06-26', 'Universal Close Price': None, 'Net Asset Value': None}

whereas for invalid RIC I receive 'Error': 'Not found'

Is there a way to specify in my request, maybe in ValidationOptions that if all values are None, just return 'Error': 'Not found' or something like this.

Thank you in advance

dss-rest-apidatascope-selectdss
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
23k 22 9 14

Hello @maximilian.mayrl,

You will not be able to drive this with ValidationOptions, as ValitationOptions clause is exercised on InstrumentList, and is applied to InstrumentList to exclude or to include certain instruments in the list in the result, not on the fields to be included.

However, I notice that you request Universal Close Price. On Pricing Fields, and specifically on Universal Close Price, some controls are available to you via User Preferences, that are selected for your user id in DSS GUI.

From DSS Menu, select: Your User -> Preferences -> General to review:

Perhaps this will help?


univclose.gif (233.6 KiB)
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