posMaintRptID is not unique

Created at 05 Oct 2019, 01:24
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
Athenum's avatar

Athenum

Joined 19.06.2019

posMaintRptID is not unique
05 Oct 2019, 01:24


Hi,

I need to store new trades in a table and then later call Position Report (MsgType(35)=AP) to update those trades in the table at a later time. But the only unique identifier I have available for this is posMaintRptID. Unfortunately this ID is not unique for each trade and I find myself getting duplicates in my table for different trades (perhaps closed at an earlier time) that have the same posMaintRptID.

Can you please advise how I can guarantee uniqueness with IDs received from Position Report when storing and later updating in a table?

Thank you,

Chris


@Athenum
Replies

PanagiotisCharalampous
07 Oct 2019, 08:56

Hi Chris,

posMaintRptID should be unique for each position. Can you please explain to us why do you think it is not unique? 

Best Regards,

Panagiotis


@PanagiotisCharalampous

Athenum
07 Oct 2019, 09:53

RE:

Hi,

This is true for all open positions, but it seems that posMaintRptID is recycled at a future date for new positions. Is this expected behaviour? Perhaps you only have a set number of posMaintRptID's to use before you re-use old ones.

I can email you several example posMaintRptID's if this helps.

Thank you,

Chris


@Athenum

PanagiotisCharalampous
07 Oct 2019, 10:03

Hi Chris,

I can email you several example posMaintRptID's if this helps.

Yes, please. 

Best Regards,

Panagiotis 


@PanagiotisCharalampous

Athenum
08 Oct 2019, 14:54

RE:

Panagiotis Charalampous said:

Hi Chris,

I can email you several example posMaintRptID's if this helps.

Yes, please. 

Best Regards,

Panagiotis 

Thank you, could you please provide a suitable email address for me to email you? 

 


@Athenum

PanagiotisCharalampous
08 Oct 2019, 14:59

Hi Chris,

Please send it at community@spotware.com.

Best Regards,

Panagiotis


@PanagiotisCharalampous