question

Upvotes
Accepted
3 0 0 4

Not getting all positions in API

I am trading an account that has a dozen or so positions and am trying to get a current list of all of them. I ran a version of the code at https://github.com/Refinitiv-API-Samples/Example.REDI.CSharp.Examples/blob/master/REDIConsolePositions/RediConsolePositions.cs


The problem is that I'm not sure how many positions I have ahead of time so I don't know when to end the program. For example, do I end when I get the first UPDATE action or is it possible I will get another ADD afterwords and miss a position?

redi-api
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.

@daniel03

Hi,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,
AHS

Upvotes
Accepted
32.2k 40 11 20

Hello @daniel03 ,

Please see Tutorial: Monitor Positions in C# for more information- positions are communicated asynchronously.

You may see Add(s) after the initial Snapshot. You may, potentially, have Add(s) after Update(s). However, the set of Positions, should be fully communicated within a short period of time, so if you do not see any Adds for a bit of time, you have the current complete set.

Positions are a moving target, if Positions change in any way, monitoring will reflect the changes.

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
3 0 0 4

That document states "The total number of Positions held is communicated within very short period of time after Positions monitoring request is submitted." but I'm missing the part of the sample code that shows how to receive that number.

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
32.2k 40 11 20

Hello @daniel03 ,

There is no method call to request and receive the number of positions.

The only option is to register interest, and to be notified of and process any change in positions.

At any point of time, the positions can change, resulting in callback triggered, there is never "a guaranteed static state" per design.

Hope this explanation helps

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.