DSS request inconsistent timeout

Hi ,

We are POSTing the following request for DSS API.

- We are requesting every 5 minutes.

- We waiting for a minute before we timeout the request.

- About 15 times a day it takes more then a minute (and then I fail the request).

-- Is it ok and normal that sometimes it takes more then a minute ?

-- Am i doing something wrong ?

-- Should i increase the timeout ?

Here is the request :

curl -X POST \
https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ExtractWithNotes \
-H 'Authorization: Token XXXXXXXXXXXXX’ \
-H 'Content-Type: application/json' \
-d '{
"ExtractionRequest": {
"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.IntradayPricingExtractionRequest",
"ContentFieldNames": [
"RIC", "Mid Price", "Security Description", "Instrument ID", "Instrument ID Type"
],
"IdentifierList": {
"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
"InstrumentIdentifiers": [
{ "Identifier": "EUR=", "IdentifierType": "Ric" },
{ "Identifier": "CNYUSD=R", "IdentifierType": "Ric" },
{ "Identifier": "JPYUSD=R", "IdentifierType": "Ric" },
{ "Identifier": "GBP=", "IdentifierType": "Ric" }
]
},
"Condition": { "ScalableCurrency": "true" }
}
}'

Best Answer

  • katia.dubnik,

    Q1: Is it ok and normal that sometimes it takes more then a minute ?

    A1: Yes, server response times vary depending on the size of a request, and on the server load.

    Q2: Am i doing something wrong ?

    A2: You should not resubmit your query after a timeout; it increases the server load, because when you resubmit, you have 2 queries running in parallel. Instead, you should check the status of the existing query, by doing a GET to the location URL that is returned in the header response when it times out (the response that has an HTTP 202 status). For more information on this workflow, please see:

    Q3: Should i increase the timeout ?

    A3: As per the answer to your previous question, no, that is not the way to handle a request that times out. As a side effect this would also delay the time it takes to receive your data (as you are requesting intraday data I guess you want it fairly quickly). You need to handle the 202 response if you run into a timeout. I would actually revert to the standard default timeout of 30 seconds.