5 free queries remaining

AlpacaCode — Command Reference

Backtest

agent:backtest lookback:1m
1-month backtest
symbols:AAPL,TSLA
custom symbols
hours:extended
pre/after-market
intraday_exit:true
5-min TP/SL bars
pdt:false
disable PDT rule

Validate

agent:validate run-id:<uuid>
validate a run
source:paper_trade
validate paper trades

Reconcile

agent:reconcile
DB vs Alpaca (7d)
window:14d
custom window

Paper Trade

agent:paper duration:7d
run in background
symbols:AAPL,MSFT poll:60
custom config
hours:extended
extended hours
email:false
disable email reports
pdt:false
disable PDT rule

Full Cycle

agent:full lookback:1m duration:1m
BT > Val > PT > Val
hours:extended
extended hours

Query & Monitor

trades / runs
DB tables
agent:report
performance summary
type:backtest run-id:<uuid>
filter / detail
strategy:btd
filter by slug prefix
agent:top
rank strategies by Sharpe
strategy:btd
filter by slug prefix
agent:status
agent states
agent:stop
stop background task

Research

news TSLA
company news
provider:xai|tavily
force news provider
profile TSLA
company profile
financials AAPL
income & balance sheet
price TSLA
quote & technicals
movers
top gainers & losers
analysts AAPL
ratings & targets
valuation AAPL,MSFT
valuation comparison

Options

hours:extended
4AM-8PM ET
intraday_exit:true
5-min bar exits
pdt:false
disable PDT (>$25k)

General

help / status / clear
Running...