API Support Forum
OEC API > FIX Support > RequestForPositions Message
Author Topic: RequestForPositions Message
(10 messages, Page 1 of 1)
Moderators: VPfau
AThaker5615
Posts: 5
Joined:


Posted: Apr 03, 2024 @ 10:35 PM             Msg. 1 of 10
I'm sending the following FIX message to try to request my positions:


8=FIX.4.4|9=102|35=AN|34=11|49=AThaker***|52=20240404-03:28:59.000|56=OEC_TEST|1=API01****|263=0|581=1|710=892|724=0|10=133


and I get this:


8=FIX.4.4|9=139|35=3|49=AThaker****|56=OEC_TEST|34=12|52=20240404-03:28:59.000|45=8|371=581|372=AP|373=5|58=Value is incorrect (out of range) for this tag|10=004|


I think this message is indicating that my tag 581, the AccountType tag, is incorrect (out of range). When I see the "valid values" in the RequestForPositions Fix Message specification it shows "1 - ACCOUNTCUSTOMER"

I am confused why it seems like it's rejecting my RequestForPositions (AN) request based on setting tag 581 to 1. What should I be setting it to?
AThaker5615
Posts: 5
Joined:


Posted: Apr 04, 2024 @ 10:03 AM             Msg. 2 of 10
In case it's helpful additional information, this only happens when I have positions. When I have no positions I get replies more like what I'd expect:

sending
8=FIX.4.4|9=102|35=AN|34=22|49=AThaker****|52=20240404-14:58:05.000|56=OEC_TEST|1=API01****|263=0|581=1|710=461|724=0|10=123|

receiving
8=FIX.4.4|9=133|35=AO|34=25|49=OEC_TEST|52=20240404-14:58:05|56=AThaker****|1=API01****|581=1|710=461|721=OECFIX:638472651390540286:2492|728=2|729=1|10=093|
YSamiwala
Posts: 6
Joined:


Posted: Apr 12, 2024 @ 08:27 AM             Msg. 3 of 10
Thank you for you question.

I am working on this ticket and will let you know as soon as I will have any information
YSamiwala
Posts: 6
Joined:


Posted: Apr 15, 2024 @ 07:51 AM             Msg. 4 of 10
Hi

This response is not from the request you have sent
34=11 => MsgSeqNum=11 (from request)
45=8 => RefSeqNum=8 (from response)

Below is the request for 8
QuickFix20240403.log:8174:22:29:00.067 FIX.4.4:OEC_TEST->AThake****:9e61a8bc-0a31-4542-ad85-33ebab0e4e86 34=8|49=OEC_TEST|52=202
40404-03:29:00|56=AThake****|1=API01****|55=ES|167=FUT|200=202406|461=FXXXXS|581=0|710=892|715=20240404|721=OECFIX:638472651390540286:2089|727=1|728=0|73
0=0|731=2|734=0|702=1|704=1|705=0|753=1|708=5268.25|10=004|

And here 581=0 which is the issue, 581 should be 1
Edited by YSamiwala on Apr 15, 2024 10:17 AM
AThaker5615
Posts: 5
Joined:


Posted: Apr 15, 2024 @ 11:59 AM             Msg. 5 of 10
Sorry for not posting correctly the matching responses. I was trying different values of for 581 after getting that error message which is why I sent some with zero. Here is one I sent over just now, with 581=1, and the matching response showing the same error message.

Sent:
8=FIX.4.4|9=101|35=AN|34=2|49=AThaker5615|52=20240415-16:55:29.000|56=OEC_TEST|1=API010079|263=0|581=1|710=107|724=0|10=076|

Received:
8=FIX.4.4|9=138|35=3|49=AThaker5615|56=OEC_TEST|34=3|52=20240415-16:55:29.000|45=2|371=581|372=AP|373=5|58=Value is incorrect (out of range) for this tag|10=208|


Why am I still getting this when I set 581=1?
YSamiwala
Posts: 6
Joined:


Posted: Apr 15, 2024 @ 12:39 PM             Msg. 6 of 10
Thanks for this info,

Looking further into this
YSamiwala
Posts: 6
Joined:


Posted: Apr 15, 2024 @ 03:09 PM             Msg. 7 of 10
looking further, this reject message is coming from your side
49 is the sender and 56 is the target
This indicates that the rules/dictionary has to be incorrect.
The options are to either not use any dictionary or use the correct one
AThaker5615
Posts: 5
Joined:


Posted: Apr 16, 2024 @ 02:20 PM             Msg. 8 of 10
Ah that is super helpful! Disabling dictionary now I get response more like I'd expect.

Is there a GAIN approved dictionary I could use? I was using what I thought was a standard FIX44.xml dictionary
YSamiwala
Posts: 6
Joined:


Posted: Apr 16, 2024 @ 03:58 PM             Msg. 9 of 10
We do have a file for that, I will ask around and find out how to send that file to you
YSamiwala
Posts: 6
Joined:


Posted: Apr 18, 2024 @ 08:58 AM             Msg. 10 of 10
please download the data dictionary using this url

https://api.gainfutures.com/WebAPI/api/Files/DownloadClientUpdateLast?brandId=0&clientTypeId=5010&branchId=2
Edited by YSamiwala on Apr 18, 2024 09:32 AM