question

Upvotes
Accepted
2 0 0 1

Getting holdings statements using RDP API library

Hi,

I want to get holdings-statements data from the RDP API, using the .NET library, but I don't manage to get a successful response. The way I request data is:

EndpointRequest.Definition(url).Properties.BodyParameters((JObject)JToken.FromObject(holdingsStatementsRequest)).GetData();

Where holdingsStatements is the object I need to add to the body of the request, as described in the API Playground. The method is POST.
The url is: https://api.refinitiv.com/user-data/portfolio-management/v1/portfolio-analytics/{portfolioId}/holdings-statements

The response when I am executing the code is "Cannot send a content-body with this verb-type.".
Can you give me a specific documentation or example where I can find how to use this endpoint that I want to use (.NET)?

#technologyrdp-apic#refinitiv-data-platform-librariesrdp
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.

Hello @andreea.ciforac

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If so, can you please click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks, AHS

1 Answer

· Write an Answer
Upvotes
Accepted
142 2 1 3

Hello @andreea.ciforac

To retrieve data using an Endpoint Definition with a POST, you could try the following example:

  var holdingsData = EndpointRequest
      .Definition(holdingsEndpoint) 
      .BodyParameters(holdingsRequest)
      .Method(EndpointRequest.Method.POST)
      .GetData();

The default HTTP method for the definition is GET. If your endpoint uses another one, you will have to specify it using the Method(). You can also specify the request body at the definition level using the BodyParameters(), which accepts a JObject instance.

Thanks,

Cristian

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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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