NewOrder (D)
NewOrder (D)
21 Mar 2017, 13:33
Hi Spotware.
I have rejects for new order message and I can't figure out why.
It looks like all required fields are in (as in docs) and they are valid, but I still have "Invalid MsgType <35>".
Here is complete in and out sequence:
OUT >>> 8=FIX.4.4|9=114|35=A|34=1|49=fxpig.3000369|52=20170321-11:29:04.611|56=CSERVER|57=QUOTE|98=0|108=3|141=Y|553=3000369|554=J0Ky8PI1|10=129| IN <<< 8=FIX.4.4|9=89|35=A|34=1|49=CSERVER|50=QUOTE|52=20170321-11:29:05.018|56=fxpig.3000369|98=0|108=3|141=Y|10=251| OUT >>> 8=FIX.4.4|9=137|35=D|34=2|49=fxpig.3000369|52=20170321-11:29:04.740|56=CSERVER|57=QUOTE|11=1408471|55=1|54=1|60=20170321-11:29:04.740|38=10000|40=1|59=1|10=238| IN <<< 8=FIX.4.4|9=114|35=3|34=2|49=CSERVER|50=QUOTE|52=20170321-11:29:05.065|56=fxpig.3000369|45=2|58=Invalid MsgType <35>|372=D|373=11|10=144|
Same for different sets of ClOrdID, Symbol, Side, OrderQty, OrdType, TimeInForce.
Am I doing something completely wrong?
Btw, the rest messages are ok.
Replies
dm.skpd
21 Mar 2017, 15:03
RE:
#EOL said:
You are sending orders to market data connection. Try trade one, it's on the different port and TargetSubID (tag 57) = TRADE
Logon message is rejected on trade connection (5202 port, tag 57 = TRADE):
OUT >>> 8=FIX.4.4|9=114|35=A|34=1|49=fxpig.3000367|52=20170321-12:58:55.024|56=CSERVER|57=TRADE|98=0|108=3|141=Y|553=3000367|554=1mrMZapI|10=247| IN <<< 8=FIX.4.4|9=151|35=5|34=1|49=CSERVER|50=TRADE|52=20170321-12:58:55.364|56=fxpig.3000367|58=TargetSubID is assigned with the unexpected value 'TRADE', expected 'QUOTE'|10=101|
Same across almost all brokers, except roboforex (which do not offer netting account, so not really suitable).
Does this mean that most of the cTrader's brokers can't handle new orders via FIX API?
@dm.skpd
dm.skpd
21 Mar 2017, 18:04
RE:
Spotware said:
Hi dm.skpd,
Can you verify that you are sending Trade messages to 5202 and not 5201?
Right after your message FXPIG changed their connection settings (IP address) and now I can successfully use Logon and NewOrder messages on 5202 port.
That is good part, thank you!
On a side note: nothing was changed for rest brokers, I still can't Logon on 5202 port for brokers: pepperstone, icmarkets, fxpro.
@dm.skpd
#EOL
22 Mar 2017, 10:36
RE: RE:
dm.skpd said:
On a side note: nothing was changed for rest brokers, I still can't Logon on 5202 port for brokers: pepperstone, icmarkets, fxpro.
The only version I have, is that different servers are used for demo an live accounts. So you should check connections settings in cTrader for the exact account you are going to use via FIX.
And, probably, you may want to change your password for accounts fxpig.3000369 and fxpig.3000367, since they are exposed in the FIX logs you posted earlier (tag 554)
@#EOL
dm.skpd
22 Mar 2017, 13:58
RE: RE:
#EOL said:
What hostname are you talking about?
Probably h23.p.ctrader.com, but not sure.
They have changed IP again, but all three still accept connections (same behavior for first IP - can't trade, ok for two new - can trade).
And, probably, you may want to change your password for accounts fxpig.3000369 and fxpig.3000367, since they are exposed in the FIX logs you posted earlier (tag 554)
Not really. These are demo accounts, pasted as is to not confuse with invalid checksum.
@dm.skpd
#EOL
21 Mar 2017, 14:56
You are sending orders to market data connection. Try trade one, it's on the different port and TargetSubID (tag 57) = TRADE
@#EOL