Request For Positions returns nothing

02 Jan 2019, 12:03Request For Positions returns nothing#1
jam584St1posts: 10since: 06 Dec 2018

Hello! When I send Request For Positions I get nothing in return from server. No any Position Report. Other messages are working fine. I have opened orders online. My message: 

8=FIX.4.49=8935=AN34=249=icmarkets.341327657=TRADE50=341327652=20190102-09:48:00.65156=cServer710=17522865410=208   

What could be the problem?

02 Jan 2019, 12:13#2
Panagiotis Charalampousposts: 2821since: 13 Jan 2017

Hi jam584St1,

I do not see any problem in the message. Are you sure there are open positions on this account?

Best Regards,

Panagiotis


Head of Community Management at cTrader
02 Jan 2019, 12:52#3
jam584St1posts: 10since: 06 Dec 2018

Yes I'm sure. I have 3 opened positions by FIX and one by cTrader. I've tried with PosMaintRptID, but still I get nothing. At least there must be an answer that "no open positions found that match criteria" by Position Report, but it is not. I don't understand why there is no answer at all.

03 Jan 2019, 09:52#4
jam584St1posts: 10since: 06 Dec 2018

Can you check Request For Positions from your side? I want to know it does not work only for me or not.

03 Jan 2019, 09:59#5
Panagiotis Charalampousposts: 2821since: 13 Jan 2017

Hi jam584St1,

It works fine on my side and I do not see any problem in your message. Unfortunately, I cannot offer further advise since I do not have access to your account neither to the code you are using. Did you try reproducing with the sample application? If you can reproduce it with a demo account, then please send me the credentials at community@spotware.com to have a look.

Best Regards,

Panagiotis


Head of Community Management at cTrader
08 Jan 2019, 22:59#6
jam584St1posts: 10since: 06 Dec 2018

Hello. I've tested Request For Positions by your sample application. It's worked fine, but I'm not getting the same result from my script. 

Examples:

------------------

Sample application messages:

Message:
8=FIX.4.49=10935=AN49=icmarkets.341327656=cServer57=TRADE50=341327634=252=20190108-20:38:20710=1408471721=5308327310=174

Result:
8=FIX.4.49=16335=AP34=249=cServer50=TRADE52=20190108-20:38:20.78156=icmarkets.341327657=341327655=1710=1408471721=53083273727=1728=0730=1.14437702=1704=0705=100010=091

------------------

My messages:

Message:
8=FIX.4.49=8935=AN49=icmarkets.341327656=cServer57=TRADE50=341327634=252=20190108-20:39:36.990710=711796383721=5308327310=222

Then after 10-20 seconds

Result:
8=FIX.4.49=9635=234=249=cServer50=TRADE52=20190108-20:46:33.34256=icmarkets.341327657=34132767=216=010=182

------------------

Why server send me ResendRequest? What could be the problem? I use port 5202 for trade to connect server. Could this be the cause?

 

09 Jan 2019, 10:10#7
Panagiotis Charalampousposts: 2821since: 13 Jan 2017

Hi jam584St1,

If you get a resend message from the server, then probably you have a problem in the message sequence numbering (tag 34). Make sure that you implement message sequence numbering properly.

Best Regards,

Panagiotis


Head of Community Management at cTrader
09 Jan 2019, 17:23#8
jam584St1posts: 10since: 06 Dec 2018

I've solved the issue. The problem was that BodyLength and CheckSum in my script have been incorrectly calculating for only this type of message. Thank you for your support.