Problems with market and limit orders

I’m making paper trades using the nodejs npm @alpacahq/alpaca-trade-api using a simple market buy:

alpaca.createOrder({
symbol: ‘AMD’,
qty: 100,
side: ‘buy’,
type: ‘market’,
time_in_force: ‘day’
})

The current quotes for the order are $31.64 but the fills are always coming in around $30.78. I know that market orders can be filled outside of the current quotes, depending on spikes, but this happens everytime, not just once in a while.

Anyone else experiencing similar issues? Makes it hard to test strategies using the paper trading with this not working as expected.

Jon

Hi, thank you for the report. This morning we have experienced in some fill issues caused by the quote data updates, but should have been resolved by now. Could you try again and see if it works well now? Sorry for inconvenience.

Hi Hitoshi,

Thanks for letting me know. I just tried again and it appears to still be happening. Not sure through the React API, but also through Postman when I test directly against the Alpaca REST API…

Jon

Sorry we misunderstood the issue and now it should be working as expected. It was happening only to some stocks. Just so you know, this is only paper trading simulation side, and everything has been running fine for live trading side. Also we have been stable for the simulation side but today we had this issue.

What’s happening is your market orders are being sent to the top of the pile and filled at the worst possible price because that’s how Alpaca/IEX make money with free commissions. The other side is taking your loss and running with it and Alpaca/IEX split the difference. You lose every time.

Paper or Live, it’s the same system.

I saw this today with my market order. I submitted a market order and it was filled at $77.30. The high of that minute was $77.26, so I was scalped for %0.04 per share. At 50 shares that was $2.00. So while there is no commission, there is a cost. It would be nice to get a handle on this so it can be modeling in my trading algorithms.