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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
1 0 0 3

AllInstrumentSearch returns weird 400 error

Hello,

After migrating to new DSS API endpoints we experience the issues with AllInstrumentSearch request which is hard to reproduce:

2021-07-13 10:14:14.053 +01:00 [Error] Results were not available inside the time allotted. Please refine your search criteria

2021-07-13 10:14:14.053 +01:00 [Error] Exception Data:

2021-07-13 10:14:14.054 +01:00 [Error] Key: ErrorId. Value:

2021-07-13 10:14:14.055 +01:00 [Error] Key: StatusCode. Value: 400

2021-07-13 10:14:14.055 +01:00 [Error] Key: Context. Value: NullObjectSpace

2021-07-13 10:14:14.055 +01:00 [Error] Key: Url. Value: https://selectapi.datascope.refinitiv.com/RestApi/v1/Search/InstrumentSearch

2021-07-13 10:14:14.055 +01:00 [Error] Key: Method. Value: POST

2021-07-13 10:14:14.055 +01:00 [Error] Key: ServerAppVersion. Value: 15.0.155.64

2021-07-13 10:14:14.055 +01:00 [Error] Key: RequestCorrelationId. Value: CiD/9028057/B_2AIQ.07a132f1358ceb1e/RA

2021-07-13 10:14:14.055 +01:00 [Error] Key: RetryCount. Value: 0

Can you please explain how this error could happen. It's very hard to reproduce, so I don't have exact request. But basically we are doing requests like:

AllInstrumentSearchRequest.Create(

new[] {

InstrumentTypeGroup.CollatetizedMortgageObligations, InstrumentTypeGroup.Commodities, InstrumentTypeGroup.Equities,

InstrumentTypeGroup.FuturesAndOptions, InstrumentTypeGroup.GovCorp, InstrumentTypeGroup.MortgageBackedSecurities,

InstrumentTypeGroup.Money, InstrumentTypeGroup.Municipals, InstrumentTypeGroup.Funds

},

identifierType,

identityString,

IdentifierType.MIC

Where IdentityString is not empty and identifierType is in list (RIC, ISIN, SEDOL, CUSIP).

Also it worth to mention that usually several parallel Search requests are sent in once. Could it be the reason of this error?

If you could explain what does this error mean, I would be grateful

Thanks,

Taras

dss-rest-apidatascope-selectdss.net
icon clock
10 |1500

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

Upvote
Accepted
39.3k 76 11 27

The support team confirmed the request was correct and the problem is a known issue on Refinitiv side. The issue is very rare and happens only for particular instruments. It will be fixed in Data Scope Select 15.1, which is expected to be released on 16th August 2021.

icon clock
10 |1500

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

Upvotes
28.3k 30 11 15

Hello @taras.chypurka ,

As you mention that the issue is intermittent, and is hard to reproduce, i.e. most of the same requests succeed and only sometimes you observe this error, is this correct?

If my understanding is correct, then the error that you observe does not seem to be related to the incorrect API usage, but rather to a service-related issue.

Therefore, would like to suggest to further investigate this issue, by reporting to DSS product support, directly, by opening a support case on My Refinitiv Helpdesk -> DSS as close to occurrence of the issue as you can and providing the complete details.

I think it would be helpful to include the information if any other search/extraction requests result in the same or similar error on your side.

Please let us know if you are able to proceed, or would like us to give a hand opening a support case?

icon clock
10 |1500

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

Well, for previous error I've tried support as well, but it's quite painful and long process where you have to explain the same to 3-4 people.

I just thought maybe you can lookup for cases when this error could happen and it will give me a clue.

If not, sure, I'll have to use DSS Support ...

Upvotes
28.3k 30 11 15

Hello @taras.chypurka ,

To answer your comment, yes:

Please refer to DSS Reference Status Codes.

400 = Bad Request.

...

Perhaps I have an idea on the cause.

If your code is a workflow, and AllInstrumentSearch request is concatenated from pieces, some of which are results from previous steps of your workflow,

it is possible that when something goes wrong in the previous steps, the search request ends up malformed, i.e. a Bad Request.

To verify this line of thought, I would log fully every request submitted, and examine the log upon the error, to see if you can identify a Bad Request that you submit, does this make sense?

icon clock
10 |1500

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

Thanks Zoya,

However we are using .NET SDK which wouldn't allow us to send malformed request manually.

Also, we are not using pagination for search and next/previous page requests. We are retrieving everything in one go.

So the only possible reason I could see is the multithreading which we are using and maybe new url cannot cope with it.

Thanks for trying!

Regards,

Taras

Hello @taras.chypurka ,

What I tried to explain was, if some parts of request are dynamically generated, and for .Net requests, some parts of the request, such as instruments, can be generated dynamically, such as by rules, or retrieved from a database. With logging, I was suggesting to verify every submission made.

However, I agree with @jirapongse.phuriphanvichai, setting up a proxy is an excellent approach to verifying the issue.

Upvotes
45.2k 103 43 60

@taras.chypurka

You may need to set a proxy to capture interactions between the application and the DSS server. You can use either Fiddler or mitmdump as a web proxy.

Then, you can use the following code to set a proxy to the DSS context.

searchContext = new SearchContext(dssUri, dssUserName, dssUserPassword);
searchContext.Options.Proxy = new WebProxy("127.0.0.1", 8080);

With this method, we can verify the request and response messages that are sent and received by the application.

icon clock
10 |1500

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