We are using the DSS REST API with C# and sometimes we are receiving DataScope.Select.Api.TooManyRequestsException: Too many requests for throttling category "Authentication", user id "9007667". Approximately 408 requests were made in 300 seconds to 8 active server(s). lately . As suggested on some places, we are trying is to reuse the ExtractionsContext instance by sharing it across multiple threads. The threads are fetching data by calling methods like ValidateIdentifiers, ExtractWithNotes (EndOfDayPricingExtractionRequest, IntradayPricingExtractionRequest). Could you please tell me is this object is thread safe and can be used in this way or could you please provide some example of how the ExtractionsContext can be reused (could not find any concrete example of reusing in the Refinitiv DataScope Select - REST API .NET SDK)? Thanks!
Hello @datateam2017 ,
It seems, from the error that you observe, you are running into Authentication requests throttle. Please see DataScope Select Best Practices & Fair Usage Polic, authentication requests are currently maxed at 30 requests per 300 seconds.
However, an authentication request results in a valid token that is good for 24 hours and the token can be reused for that time period.
DSS C# Example Application can be used as an example, please see Authorization Examples -> Sharing Tokens. After the token is obtained once, it is set into usersContext.SessionToken and accessed by the next extraction requests for the time that it is valid.
Hope this information helps