Troubleshooting
MissingCredentials
If Client::from_env() or Client::builder().credentials_from_env()? returns MissingCredentials, confirm the right environment variables are present.
Market data:
ALPACA_DATA_API_KEYALPACA_DATA_SECRET_KEY
Trading:
ALPACA_TRADE_API_KEYALPACA_TRADE_SECRET_KEY
Wrong Base URL
If requests go to the wrong environment:
alpaca-datareadsALPACA_DATA_BASE_URLalpaca-tradereadsALPACA_TRADE_BASE_URLalpaca-tradedefaults to paper trading unless you switch to.live()
alpaca-mock Starts But Orders Fail
Common causes:
ALPACA_DATA_API_KEY/ALPACA_DATA_SECRET_KEYare not set for market-data-backed mock flows- auth headers are missing on trading routes
- an HTTP fault was injected through
/admin/faults/http
Check:
curl http://127.0.0.1:3847/health
curl http://127.0.0.1:3847/admin/state
Docs Site Build Issues
Rebuild with:
python3 tools/docs/generate-doc-site
npm ci --prefix website
npm run build --prefix website
Downstream cargo publish --dry-run Fails Before First Release
Before the first real crates.io publication, dependent workspace crates can fail dry-run because upstream workspace crates are not yet available on crates.io.
Expected publish order:
alpaca-corealpaca-rest-httpalpaca-dataalpaca-tradealpaca-mock
Real API Tests Skip Or Fail Outside Market Conditions
Some live tests depend on paper trading state or current market conditions. Use the documented release-confidence subset that matches the current environment, and do not replace live verification with fake data branches.