๐ง Setup Guide
The quick-start used the yfinance data source (not production suitable) and signals-only mode, so no credentials were needed.
To paper-trade or go live you'll add two things:
- A broker (sends orders)
- A data provider (streams fresh market data)
The stratequeue setup
wizard writes your keys to~/.stratequeue/credentials.env
, which is auto-loaded on every run.
๐๏ธ Credentials are stored locally in plain text.
If you prefer, export the variables in your shell instead and skip the wizard.
Interactive setup wizard walkthrough
1 ยท Run the interactive wizard
# Ensure questionary is installed (pulled in by default)
pip install stratequeue
# Launch the menu
stratequeue setup
Choose "Broker" first, then "Data Provider".
StrateQueue will confirm success and tell you to run stratequeue status
.
Example session (Alpaca + Polygon)
๐ง StrateQueue Setup
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
? What would you like to configure? Broker (trading platform credentials)
? Select broker to configure: Alpaca (US stocks, ETFs, crypto)
๐ Alpaca Setup
Get your API keys from: https://app.alpaca.markets/
? Select trading mode: Paper Trading
? Paper API Key: โขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโข
? Paper Secret Key: โขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโข
๐ Credentials saved to /Users/you/.stratequeue/credentials.env
โ
Alpaca credentials saved.
๐ก Test your setup with: stratequeue status
2 ยท Manual & non-interactive options
Prefer to handle environment variables yourself or on a server?
export PAPER_KEY=pk_your_key
export PAPER_SECRET=ps_your_secret
export POLYGON_API_KEY=poly_key
export DATA_PROVIDER=polygon
StrateQueue looks for variables in this order:
- Variables already in the current shell
.env
in the project folder~/.stratequeue/credentials.env
3 ยท Environment variables reference
Type | Mode | Required variables |
---|---|---|
Broker โ Alpaca | Paper (recommended) | PAPER_KEY , PAPER_SECRET , PAPER_ENDPOINT (defaults to https://paper-api.alpaca.markets) |
Broker โ Alpaca | Live (real money) | ALPACA_API_KEY , ALPACA_SECRET_KEY , ALPACA_BASE_URL (defaults to https://api.alpaca.markets) |
Data - Polygon | โ | POLYGON_API_KEY , DATA_PROVIDER=polygon |
Data - CoinMarketCap | โ | CMC_API_KEY , DATA_PROVIDER=coinmarketcap |
Data - Demo | โ | (no keys needed) |
4 ยท Verify your setup
stratequeue status # checks broker credentials
stratequeue deploy ... # run your strategy with --paper or --live
If something is missing you'll see clear โ or โ ๏ธ messages along with a fix tip.
5 ยท Troubleshooting
Symptom | Fix |
---|---|
โ Not detected: Missing required Alpaca environment variables |
Re-run the wizard or export the keys manually |
Wizard complains about questionary | pip install questionary |
Credentials file ignored | Remember that shell exports override .env & credentials.env |
๐ You're ready!
Deploy with --paper
for a dry-run, or --live
once you're confident.