Alpaca fails to create orders for the last 4 hours

There are 2 issues I want to report - they are probably related. I’m doing live algo trading. I was out of office for the last few hours and when I came back, I noticed that the last order was placed about 12:37 EDT. Normally my code creates dozens of orders per hour, so this was really odd. Here are my last few orders created today (times are for CDT zone):


I compared this list to my code’s log, and it turns out that after the above 6 orders, my code submitted over 200 more orders, none of which were either accepted OR REJECTED. Yes, whenever an order was not accepted for any reason, my code catches and logs that reason. All of those 200+ orders from 12:43 EDT to now seemed to be accepted, but none of them are on my Alpaca page!

-----------  the first 6 orders were placed normally  -----------
12:20:23  ILF   placed sell order for 3 shares, limit $29.74
12:20:26  PICK  placed sell order for 86 shares, limit $46.72
12:24:32  PICK  placed sell order for 86 shares, limit $46.59
12:33:20  GLO   placed sell order for 330 shares, limit $12.10
12:35:52  CWEB  placed sell order for 86 shares, limit $46.72
12:35:56  GLO   placed sell order for 330 shares, limit $12.15
-----  here the issue begins, none of 200+ orders below are on my order history   --------
12:43:40  CHIQ  placed sell order for 124 shares, limit $32.33
12:43:47  VRA   placed sell order for 191 shares, limit $10.64
12:48:30  GLO   placed sell order for 330 shares, limit $12.15
12:59:23  EWZ   placed sell order for 107 shares, limit $37.68
12:59:26  ILF   placed sell order for 3 shares, limit $29.74
13:02:50  EWZ   placed sell order for 107 shares, limit $37.83
13:06:23  VRA   placed sell order for 191 shares, limit $10.64

I cropped the above list, of course. You don’t need the entire list of 200+ failed orders.

Then I tried to place an order manually, and this time I failed to create any sell order at all. Now it’s 5 pm EDT, so it’s post-market and only limit orders are possible. I tried “DAY”, “DAY - EXTENDED HOURS”, and “GTC”, and nothing worked.

Here is the response I’ve got in all cases, with no reason given:

order_2

What’s going on?

same issue here @Dan_Whitnable_Alpaca we cant short sell

Just to be clear, I was trying to liquidate (sell) existing LONG positions.

@arrow107 Looking at the first issue with orders not seeming to be either accepted or rejected, it appears the 7 orders listed above (CHIQ, VRA, GLO, EWZ, ILF, EWZ, VRA) were all accepted but then subsequently canceled by the algo via the API Key (ie not OAuth) from IP 45.79.176.13. Here are the orders that our system has recorded (in reverse order from bottom up).


Do those not show up under the ‘closed’ orders tab? Can you page through any other closed orders?

There were many orders placed after 12:43 but all except 16 were canceled by the algo. Here are the 16 which filled


It seems like your algo was placing orders up until 5:59 on 5-24-2021 but most were being canceled. Could the issue be you were not getting updates? How does your algo check for order status?

I believe the reason you couldn’t place a sell order for BRZU around 5:00 is your algo was also opening and canceling orders for that stock at that time. You cannot have two orders to close a position active at one time. Below is the list of orders being opened then canceled by your algo around 5:00.

That might give you some ideas to troubleshoot. If you have some other specific orders I can track them down.