question

Upvotes
Accepted
3 0 0 2

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 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
23k 22 9 14

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 5.0 MiB each and 10.0 MiB total.

Upvotes
3 0 0 2

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 5.0 MiB each and 10.0 MiB total.

Upvotes
23k 22 9 14

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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea