How to avoid "partially_filled" orders, when I only submitted one single order?

Hi everyone,

My Problem:
I have submitted a stop order with a qnty of 18 as one single order.

But for some reason the api is placing 2 separat orders. One of them with the flag “partially_filled”.

How can I avoid this? Because of the day trading protection I can only close one of these 2 placed trades… and then my WinRate is every day destroyed because of the other position which is still open for many many hours and falls extremely out of my initial take profit or stop loss range.

BTW: For allllll other orders which I have placed and they where NOT handled as partially_filled orders, everything was working fine and I was able to close the trades really well.

Even single orders can be partially filled. Use FOK orders to avoid:
Understand Orders | Alpaca Docs

Hi :wave:

Thx for your fast reply.

Ok I will try to change this from

time_in_force="gtc"

to

time_in_force="fok"

I will try this 2morrow out, when the US exchange will open up, BUT I really think this could be my solutionnnn

THX :slight_smile:

I have tried it out, but FOK is not possible as bracket order!?!

  • I need a TP and SL
  • I need to place the order as limit order
  • and I want to avoid of course splitted qnty as described in the main problem

can you tell me which combination of order_class and time_in_force is the correct one to avoid the initial described problem please…

Thx