Guide
Why does Nyria say Alpaca didn't accept these keys?
Alpaca didn't accept these keys means Alpaca refused the key ID and secret you pasted. The usual causes are a trailing space copied with the secret, a key regenerated after you copied it, or a live key under Connect paper account. Generate a fresh pair in the matching environment and paste it again.
Official documentation
Fix Alpaca didn't accept these keys
- 1
Check the environment
Confirm the Alpaca dashboard was on Paper or Live when you generated the key.
- 2
Match the button
Pick the paper option for a paper key and the live option for a live one.
- 3
Generate a new pair
In Alpaca, select Generate New Keys and copy both values.
- 4
Paste without spaces
Paste the key ID and the secret, with no space at either end.
- 5
Check the account number
Paper account numbers start with PA.
The usual causes
- A trailing space copied with the secret.
- A key regenerated in Alpaca after you copied it.
- A key from the other environment.
Paper and live keys
- A paper key only works on paper.
- A live key only works on live.
- Alpaca shows the secret once, so copy it straight away.
A new signup
- The dialog may say Alpaca has no account for these keys yet.
- Alpaca may still be creating the PA account.
- Wait a few minutes and try again.
Keep keys safe
- Alpaca API keys can trade.
- Never share them.
- Removing the account in Nyria deletes Nyria's copy, but the key works until you regenerate it.
Questions
- Why does Alpaca refuse my keys?
- Usually a trailing space, a regenerated key or the wrong environment.
- Can a live key connect as paper?
- No. A paper key only works on paper and a live key only on live.
- Where do I find my secret key again?
- You cannot. Alpaca shows it once, so generate a new pair.
- What does the PA prefix mean?
- Alpaca paper account numbers start with PA.
- Does removing the account revoke the key?
- No. The key works until you regenerate it at Alpaca.
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 Alpaca.
- Step by step for one account: how to automate Webhook to Alpaca.
- Alert tester.
Guides
How to connect TradingView to Alpaca
One Alpaca API key, paper or live. A webhook URL turns alerts into orders.
Read guideAlpaca API TradingView setup
Where the Alpaca key goes and how a webhook becomes an order.
Read guideWhy does Alpaca say options_level_required?
Your Alpaca options level is below Level 3.
Read guideWhy did my broker reject an automated order?
The broker's reason, and the fix for each common rejection.
Read guideTry a paper bot first
No card required. Paper is free. Live trading from $15 a month.