# Order was Rejected

**URL:** <https://forum.alpaca.markets/t/order-was-rejected/1786>\
**Category:** Alpaca Account Troubleshooting\
**Created:** [June 12, 2020, 10:42pm UTC](https://forum.alpaca.markets/t/order-was-rejected/1786 "2020-06-12T22:42:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BASIC\_NPC](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/basic_npc/32/937_2.png) [@BASIC\_NPC](https://forum.alpaca.markets/u/BASIC_NPC)\
**Post date:** [June 12, 2020, 10:42pm UTC](https://forum.alpaca.markets/t/order-was-rejected/1786/1 "2020-06-12T22:42:35Z")

</div>

## Environment

**Language**  
Python

## Problem

**Summary**  
I attempted to make a simple market ‘buy’ order at 3:50 EST. I saw that the order was ‘Accepted’ for awhile, then moved to the ‘Rejected’ state. Does anyone know what might cause that to happen? The total price of the order was estimated to be roughly $5 less than the Equity that would be left in my account after order completion, so maybe that would cause it (since possibly the market price for all the shares I was attempting to buy was higher than my account equity)? I’m pretty new to using alpaca, so i’m not sure what would cause this state to occur.

**Paper or Live Tradng?**  
Live trading

**Example Code**

If it’s any help, here’s an approximation of what the order looks like (with a fake quantity).

api.submit\_order (  
symbol = ‘FTI’,  
qty = 200,  
side =‘buy’,  
type =‘market’,  
time\_in\_force =‘day’  
)

---

<div class="post-metadata">

**Author:** ![BASIC\_NPC](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/basic_npc/32/937_2.png) [@BASIC\_NPC](https://forum.alpaca.markets/u/BASIC_NPC)\
**Post date:** [June 16, 2020, 12:32am UTC](https://forum.alpaca.markets/t/order-was-rejected/1786/2 "2020-06-16T00:32:13Z")

</div>

I just switched the market order over to a limit order, and regenerated my api key. Seems to work fine now. Not really a solution, but eh as long as the buy works one way or another idc.
