Trouble placing orders on paper account

Basically all of my paper trading systems can’t place orders for first 5-7 minutes after market is open. It’s really annoying because I can’t test my strategies properly due to this problem. It wasn’t like that in the past. Sad to see that nobody seems to care about paper trading. When I go live on small quantities nothing like that ever happens. Is alpaca team even aware of this problem and working on fixing it?

@datskat What is it you mean by “my paper trading systems can’t place orders”? Are you getting an error? Could you provide an example of an order you tried to place. If you have an order number that would be ideal, otherwise the specifics of the order (ie symbol, quantity, order type) and an approximate time you attempted to place the order. With that information I can check the logs which generally provide more details.

Well since first placed order during trading day there is error “Insufficient buying power” Which is one of the annoyances because later that same day exactly the same amount of shares is bought\sold without problem. Next thing that happens during first minutes of trading day is “wash trade detected” which again is very annoying, because I cancel all orders before I buy or sell anything.

it was "TSLA’ market order quantity varies from but usually is around 2500 shares. Approx time was <5-7 minutes after market is opened. I will provide order numbers tomorrow.

@datskat I believe I found your orders in the Alpaca logs. The main issue seems to be that your algo isn’t checking order status after submitting or deleting orders. All order methods, including submit, replace, and delete, are only requests. When an algo submits an order, it is requesting that an order be created and sent for execution. The API responds immediately, but order execution occurs asynchronously. The order may not fill for some time. Similarly, when an algo deletes all orders, it is requesting that orders be deleted. The API responds immediately, but the orders will be deleted asynchronously or may not be deleted at all. The algo should always check order status or open orders to verify whether orders have filled or been deleted.

The errors you are seeing, “potential wash trade detected. opposite side market/stop order exists” are because you submitted a request to delete orders, but those orders hadn’t been deleted yet and were still open.

Similarly, the errors you are seeing, "insufficient buying power,” are due to previous orders that are still open or have not been filled yet, and are reserving buying power.

Checking for open orders before submitting new orders may eliminate all these issues.

If you wish, I can walk through specific orders and any associated errors.

The trouble im having with this is the fact that it doesn’t work like that when I go live. In live setting similar problems don’t happen so basically I need to test my strategies on live account because paper is completely inaccurate. Also how is it possible that delay between sending a request and buying/selling an asset is 7 minutes long in first minutes of market being open? Once again-for first 5-10 minutes after market Is open my orders don’t go through. The same algorithm starts working after that time.