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
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?



Response NEW:
Posts: 2

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.

Edited by OTurman on Jan 08, 2021 05:02 AM
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
Posts: 2

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.