Skip to content

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. 1

    Open the bot log

    Find the log entry for the failed call.

  2. 2

    Read error_detail

    The field holds Alpaca's own reason.

  3. 3

    Match the message

    It will be symbol not tradable, insufficient buying power or pdt restriction.

  4. 4

    Apply the fix

    Use the matching section below.

  5. 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

Try a paper bot first

No card required. Paper is free. Live trading from $15 a month.