API Support Forum
OEC API > API Support > Problem with trailing stop orders
Author Topic: Problem with trailing stop orders
(4 messages, Page 1 of 1)
Moderators: VPfau
RPovsic724
Posts: 5
Joined: Oct 13, 2020


Posted: Dec 15, 2020 @ 02:02 PM             Msg. 1 of 4
When I place TS orders via FIX API, I don't get trailing stop updates. Why this can happen??

I set ExecInst="a" (18) and use PegOffsetValue (211) field, as it's written in the docs, but it doesn't work for me. I see that the desktop app recognizes orders as trailing stops, but it doesn't send any updates for them. However, if I place trailing stop via the desktop app it works ok ... please help me with this issue, what I'm doing wrong?

Request:
8=FIX.4.4|9=199|35=D|34=7|49=Dbkmp5533|52=20201215-19:39:41.754|56=OEC_TEST|1=DEMO019622|11=4/qfypYbSGmVySxS0HsKDg==|18=a|38=1|40=3|54=2|55=ES|59=1|60=20201215-19:39:41.754|99=3691|200=202012|211=0.25|461=FXXXXS|10=130|


Response PENDING_NEW:
8=FIX.4.4|9=265|35=8|34=7|49=OEC_TEST|52=20201215-19:39:41|56=Dbkmp5533|1=DEMO019622|6=0.00|11=4/qfypYbSGmVySxS0HsKDg==|14=0|17=OECFIX:251116443:9158|37=251116443|38=1|39=A|40=3|54=2|55=ES|59=1|60=20201215-19:39:41.815|99=3691|150=A|151=1|167=FUT|200=202012|211=0.25|461=FXXXXS|10=091|


Response NEW:
8=FIX.4.4|9=265|35=8|34=9|49=OEC_TEST|52=20201215-19:39:41|56=Dbkmp5533|1=DEMO019622|6=0.00|11=4/qfypYbSGmVySxS0HsKDg==|14=0|17=OECFIX:251116443:9160|37=251116443|38=1|39=0|40=3|54=2|55=ES|59=1|60=20201215-19:39:41.875|99=3691|150=0|151=1|167=FUT|200=202012|211=0.25|461=FXXXXS|10=058|
OTurman
Posts: 2
Joined:


Posted: Jan 08, 2021 @ 05:02 AM             Msg. 2 of 4
Hello, RPovsic724

I'm trying to figure out how this happened, but unfortunately I have no logs. Please, could you repeat the case for getting the logs.

Thanks.
Edited by OTurman on Jan 08, 2021 05:02 AM
RPovsic724
Posts: 5
Joined: Oct 13, 2020


Posted: Jan 12, 2021 @ 05:12 AM             Msg. 3 of 4
Hi OTurman!
Sure, here's the raw log. I used QuickFixJ client (latest version).

OEC_TEST, outgoing> (8=FIX.4.49=19935=D34=5449=DBookmap00252=20210112-10:50:01.86256=OEC_TEST1=DEMO01422611=K4SXPuaJT+CUq9ITwJ3Y3A==18=a38=140=354=155=ES59=160=20210112-10:50:01.86199=3805200=202103211=0.25461=FXXXXS10=069)

OEC_TEST, incoming> (8=FIX.4.49=26635=834=8149=OEC_TEST52=20210112-10:50:0156=DBookmap0021=DEMO0142266=0.0011=K4SXPuaJT+CUq9ITwJ3Y3A==14=017=OECFIX:251825401:2248637=25182540138=139=A40=354=155=ES59=160=20210112-10:50:01.94899=3805150=A151=1167=FUT200=202103211=0.25461=FXXXXS10=088)

OEC_TEST, incoming> (8=FIX.4.49=26635=834=8249=OEC_TEST52=20210112-10:50:0156=DBookmap0021=DEMO0142266=0.0011=K4SXPuaJT+CUq9ITwJ3Y3A==14=017=OECFIX:251825401:2248737=25182540138=139=A40=354=155=ES59=160=20210112-10:50:01.94899=3805150=A151=1167=FUT200=202103211=0.25461=FXXXXS10=090)

OEC_TEST, incoming> (8=FIX.4.49=26635=834=8349=OEC_TEST52=20210112-10:50:0256=DBookmap0021=DEMO0142266=0.0011=K4SXPuaJT+CUq9ITwJ3Y3A==14=017=OECFIX:251825401:2248837=25182540138=139=040=354=155=ES59=160=20210112-10:50:02.01399=3805150=0151=1167=FUT200=202103211=0.25461=FXXXXS10=043)

==========
The Gain Trader app recognizes order as a trailing stop. But GF doesn't send updates for it.
I noticed when I hover over orders in the Trader app, it shows that the "Ref price" is always 0 for orders that I place via API. Maybe this is the clue, but I don't see how to specify this field via API.
Edited by RPovsic724 on Jan 12, 2021 05:13 AM
OTurman
Posts: 2
Joined:


Posted: Jan 14, 2021 @ 06:46 AM             Msg. 4 of 4
Hello, RPovsic724

You were right, the problem is really related to the fact that "Ref price" is always 0. We will add the "PeggedRefPrice" field to the protocol. This will solve the problem, we will implement it as quickly as possible. Thanks for reporting.

Regards,
Olzhas