Topics
Replies
gbuella
13 May 2024, 07:22
RE: Order Cancel/Replace doesn't trigger expected response
PanagiotisCharalampous said:
In order to identify to which request the response is related to, you need to use tag 11. Tag 41 is about identifying the order to be amended.
I'm sorry, my bad, I mixed things up, there is no tag 41 in the reply. Thank you for replying anyways.
Here is a better description:
In your example, highlighting fields with tags 11 and 41
Request: 8=FIX.4.4|9=123|35=G|34=3|49=live.theBroker.12345|50=Trade|52=20170721-13:42:17.680|56=CSERVER|57=TRADE|11=Is03AvsknNYK|38=5000|41=n9Tm8x1AavO5|44=1.1|10=010|
Response: 8=FIX.4.4|9=192|35=8|34=3|49=CSERVER|50=TRADE|52=20170721-13:42:18.784|56=live.theBroker.12345|57=Trade|11=Is03AvsknNYK|14=0|37=629|38=5000|39=0|40=2|44=1.1|54=1|55=1|59=1|60=20170721-13:42:18.760|150=5|151=5000|721=624|10=150|
I just tried this again right now, here is what I get:
Request: 8=FIX.4.4|9=216|35=G|34=5|49=demo.icmarkets.9045572|56=cServer|57=TRADE|52=20240513-07:09:42.458|41=tandeta_order_ba2a0805ffa2158980f40120e86d5ae2|11=tandeta_order_ba2a0805ffa2158980f40120e86d5ae2_modify|37=703284983|38=1000|44=1.1|10=024|
Response: 8=FIX.4.4|9=257|35=8|34=5|49=cServer|50=TRADE|52=20240513-07:09:42.576|56=demo.icmarkets.9045572|11=tandeta_order_ba2a0805ffa2158980f40120e86d5ae2|14=0|37=703284983|38=1000|39=0|40=2|44=1.1|54=2|55=1|59=1|60=20240513-07:09:42.565|150=5|151=1000|494=bot_order|721=425980855|10=031|
Notice, that in your example, the response echoes back the value of the field with tag 11.
While in reality, what I get with tag 11, is what I sent with tag 41 (see the _modify suffix above). Whatever string I send with tag 11 is not sent back to me, the response instead contains a tag 11 with the value of tag 41 from the request, as you can see here, and in my original post as well, clearly not as described in the example in the docs.
I am trying to use tag 11 to identify the response as you suggest, but I can't.
I hope it is easier to see it now.
@gbuella
gbuella
11 May 2024, 10:57
Note:
I checked out what happens if the request is rejected, e.g. If request the same price and size a limit the order already has, thus no change, and it works as I expected it to work, I get back the request_id_3a025f
string I use for identifying the string:
8=FIX.4.4|9=144|35=G|34=5|49=demo.icmarkets.9045572|56=cServer|57=TRADE|52=20240511-10:48:28.582|41=order_1|11=request_id_3a025f|37=703133798|38=1000|44=1.0832|10=030|
Response:
8=FIX.4.4|9=146|35=j|34=8|49=cServer|50=TRADE|52=20240511-10:48:28.738|56=demo.icmarkets.9045572|58=INVALID_REQUEST:Nothing to amend.|379=request_id_3a025f|380=0|10=033|
In this case I get back the request id (field 11) in the BusinessRejectRefID
field (field 379). So this works ok, although in the example in the documentation field 379 is some string not present in the request.
So the rejected case works, why doesn't the success response (35=8) work as expected? Do I misunderstand something here?
@gbuella
gbuella
13 May 2024, 07:31
RE: Order Cancel/Replace doesn't trigger expected response
PanagiotisCharalampous said:
Another log of what actually happens, I just tweaked my code to use specific strings as ids:
You can see I place an order, modify it, but the string
this_is_the_request_id
is only present in my modify request, the response doesn't contain that string.Maybe/Probably I still misunderstand something, I would be happy if you let me know what is this about, thank you very much!
@gbuella