Alpaca Paper Trading - Partial Order Fill

Hi, I am testing my program with Alpaca’s paper trading and am trying to find a situation where I get partially filled on my stop buy order.

I chose a stock that had low volume and ran my program. The program went into a buy position and sent an order to buy a very high number of shares (more than double what was currently being traded) and my order surprisingly got filled all the way.

From Alpaca (Paper Trading):
“Everything on the broker side behaves the same way as the live account except the orders aren’t routed to the real exchanges. Instead, the system simulates the order filling based on the real-time quotes.” - If this was the case, how did the above trade get fully filled?

TLDR: Is there any way to get partially filled while using Alpaca Paper Trading?

From the paper trading specification (https://alpaca.markets/docs/trading-on-alpaca/paper-trading/):

  • Your order quantity is not checked against the NBBO quantities. In other words, you can submit and receive a fill for an order that is much larger than the actual available liquidity.
  • When orders are eligible to be filled, they will receive partial fills for a random size 10% of the time. If the order price is still marketable, the remaining quantity would be re-evaluated for a subsequent fill.
1 Like

Thank you for clarifying. How does everyone here ‘check’ to see if they are partially filled as opposed to fully filled?

I thought about using ‘filled_at’ field from the response I get from an order, but I am not 100% sure if this field gets a value on the first share out of a N share order. Can anyone confirm? Thanks.

I subscribe to the ‘trade_updates’ websocket channel. From there I receive updates for order fill, partial fill, and cancels.

1 Like

I’m wondering if anyone here is using polygon WebSocket stream for market data + alpaca WebSocket stream for account/orders simultaneously (and how that would be structured).

Not looking to be spoon-fed, but I would appreciate a general direction if anyone has experience with multiple websockets.

The alpaca python api allows you to connect to both at the same time. Check out the StreamConn class.