Error codes
Alpaca API error codes
26 decoded error codes for Alpaca. Each page gives the exact error text and what it means. 26 of them carry a fix or a next step, and each of those rows is marked Fix recorded. Where the source gives no remedy, the page says so.
Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.
Status codes
8 codes
HTTP 400Fix recorded One of the request's parameters is invalid.HTTP 401 (market data)Fix recorded The Market Data API's shared reply where the authentication headers are missing or invalid.HTTP 403Fix recorded Forbidden.HTTP 404Fix recorded Not found: an asset by symbol or id, a watchlist by id, or on the market data host a feed that does not exist.HTTP 422Fix recorded Unprocessable.HTTP 429Fix recorded Too many requests: the rate limit was hit.HTTP 500Fix recorded Internal server error on Alpaca's side.HTTP 504Fix recorded Gateway timeout, listed among the replies of GET /v2/account/portfolio/history.
Order rejection reasons
1 code
In the rejection the API reports, not in the HTTP status.
Open API error codes
11 codes
In an error message sent over the Open API connection, not in an HTTP status.
WS_Fix recorded The market data stream's error 400, invalid syntax: the message sent could not be parsed.400 (400) WS_Fix recorded The market data stream's error 401, not authenticated: a message other than auth arrived before the connection was authenticated.401 (401) WS_Fix recorded The market data stream's error 402, auth failed: the key id and secret were not accepted, or the feed is not in your subscription.402 (402) WS_Fix recorded The market data stream's error 403, already authenticated: a second auth message on a connection that was already authenticated.403 (403) WS_Fix recorded The market data stream's error 404, auth timeout: no auth message arrived within the 10 seconds the page allows after connecting.404 (404) WS_Fix recorded The market data stream's error 405, symbol limit exceeded: the subscribe message would take the connection past the number of symbols the plan allows.405 (405) WS_Fix recorded The market data stream's error 406, connection limit exceeded: a second connection where the plan allows one.406 (406) WS_Fix recorded The market data stream's error 407, slow client: the client is not reading messages as fast as the server sends them.407 (407) WS_Fix recorded The market data stream's error 409, insufficient subscription: the feed or channel asked for is not in the plan.409 (409) WS_Fix recorded The market data stream's error 410: the subscribe action named a channel the connected feed does not serve.410 (410) WS_Fix recorded The market data stream's error 500, internal error, on Alpaca's side.500 (500)
Streaming messages
5 codes
On the streaming connection, not in an HTTP reply.
internal server errorFix recorded The error_message of an error action on the account stream, which the page says the server sends before closing the connection.order_Fix recorded An event on the trade_updates stream: a request to cancel the order was rejected.cancel_ rejected order_Fix recorded An event on the trade_updates stream: a request to replace the order was rejected.replace_ rejected rejectedFix recorded An event on the trade_updates stream: the order was rejected.unauthorizedFix recorded The status in an authorization message on the account stream: the auth message failed, or a listen message was sent before the connection was authorised (then the message carries action listen).
No HTTP status recorded
1 code
How to cite this
Alpaca API error codes. Broker API Hub, https://openbrokerapi.com/errors/alpaca, newest check .
Where you rely on a single figure, cite the source and the checked date printed beside it as well.