Q - Why can't I place an order?

If you're having issues placing an order, please ensure that your API keys are up to date. You can see your current API key on your dashboard, and you can generate a new one there, if the key you're using is no longer valid. Make sure that your trading program is connected to the right API endpoint - paper and live trading use different URLs and key pairs, and must be generated separately by changing the paper/live account toggle.

If you're seeing an error about "insufficient quantity" when trying to place a sell order or about having insufficient funds when placing a buy order, it is possible that your trading program is submitting orders too quickly. Orders do not always fill immediately, and your program should not assume that shares have been bought or sold instantly upon order submission. It is likely you will need to wait a moment for an order to be filled. Please ensure your program verifies the status of previous executions before placing new orders that depend on their outcome.

For assistance with debugging issues like this, we invite you to join Alpaca's Slack Community, as well as our community forum.