Guide
Why does my Alpaca test order fail with 422?
Open the bot log entry for the call and read the error_detail field. Alpaca paper rejects a test order with 422 for three usual reasons: symbol not tradable, insufficient buying power, or a pdt restriction. Each has a short fix.
Official documentation
Fix an Alpaca 422 test order
- 1
Open the bot log
Find the log entry for the failed call.
- 2
Read error_detail
The field holds Alpaca's own reason.
- 3
Match the message
It will be symbol not tradable, insufficient buying power or pdt restriction.
- 4
Apply the fix
Use the matching section below.
- 5
Send the test again
Try a large-cap stock to check the setup.
Symbol not tradable
- Alpaca paper doesn't list some tickers.
- Some OTC tickers are missing.
- Try a large-cap stock instead.
- That checks the setup itself.
- Then go back to your own ticker.
Insufficient buying power
- Open positions from earlier tests tie up cash.
- Close them in the Alpaca dashboard.
- Then send the test again.
- Check the paper account's cash first.
- Smaller tests leave more room.
Pdt restriction
- The paper account carries a day-trade block.
- Reset it from the Alpaca dashboard.
- Then reconnect with a new key pair.
- A reset voids the old keys.
- Bot settings and history are kept.
Not a 422
- A 403 options_level_required is a different error.
- It means the options level is too low.
- A 401 unauthorized means the key stopped working.
- Generate a new key pair for that one.
- Reconnect from the Integrations page.
Test first
- Nyria Paper runs the same alerts with no broker.
- Alpaca paper runs them at Alpaca's paper account.
- Check each alert in one before the other.
- Then point your real alert source at the strategy.
- The webhook URL doesn't change.
Questions
- What does a 422 mean here?
- Alpaca paper refused the test order.
- Where do I find the reason?
- The error_detail field in the bot log entry.
- What are the usual reasons?
- Symbol not tradable, insufficient buying power or pdt restriction.
- How do I clear a pdt restriction?
- Reset it in the Alpaca dashboard. Then reconnect with a new key pair.
- Does a reset keep my bot settings?
- Yes. Settings and history are kept.
- Is a 403 the same thing?
- No. That's options_level_required.
Next
- Paste an alert into the alert tester to see how Nyria reads it.
- Step by step for one account: how to automate TradingView to Nyria Paper.
- Step by step for one account: how to automate Webhook to Nyria Paper.
- Alert tester.
Guides
Alpaca automated trading from alerts
An API key, no code: TradingView, Discord or Telegram alerts become stock, option and crypto orders at Alpaca.
Read guideWhy is my trading bot not placing orders?
Open the bot's Logs tab. Seven states explain a bot that places nothing.
Read guideWhy does Nyria say Alpaca didn't accept these keys?
Alpaca refused the key ID and secret you pasted.
Read guideWhy does Alpaca say options_level_required?
Your Alpaca options level is below Level 3.
Read guideTry a paper bot first
No card required. Paper is free. Live trading from $15 a month.