Welcome
This wizard walks you through everything WhaleShadow needs to trade safely:
- Pick a broker with native multi-leg spread support.
- Plug in Unusual Whales for signals.
- Enable the OpenRouter LLM advisor (optional, recommended).
- Tune risk & exit policy to your account size.
- Verify paper-mode plumbing and kill-switch behavior.
- Export a ready-to-use
.env.
1 ยท Broker
Choose the broker that will execute your spreads. All three support native multi-leg orders.
Get sandbox creds at https://developer.tradier.com/.
Live creds require a funded Tradier Brokerage account with options approval.
2 ยท Signals (Unusual Whales)
Primary signal feed. Paid subscription required (unusualwhales.com).
Universe is agnostic โ start with the default broad set, trim or expand as your thesis evolves.
3 ยท LLM Advisor (optional)
Final gate after deterministic checks. Any OpenRouter-compatible model works โ use a cheap one.
{decision, size_multiplier, confidence}.
If the call fails, the engine fails closed โ safer than submitting blindly.
4 ยท Risk & Exit Policy
The defaults implement the playbook. Tighten if you're new or under-capitalized.
If equity falls this many dollars below the first-tick snapshot on any given day, the kill switch trips and every position flattens. Set to 0 to disable.
Exit policy (principle: catch the wave, don't ride to zero)
Hard stop -40% of debit paid Scale-out trigger +50% of debit paid (close half, let runners run) Trailing armed at +30% of debit paid Trailing drawdown 30pp from peak Hard target +120% of debit paid Max hold 72 h Min DTE to hold 2 days
These are compiled in via Settings. Override through env vars only if you understand the trade-off.
5 ยท Control Plane
The FastAPI control plane exposes /status, /tracked, and the emergency /control/kill endpoint.
curl -X POST -H "X-API-Token: $WS_API_TOKEN" \ http://$WS_API_HOST:$WS_API_PORT/control/killIt should cancel every order and flatten every position.
6 ยท Pre-flight Checklist
Make sure each of these is true before you go live.
7 ยท Your env vars
Pick a destination. WhaleShadow reads the same variables whether you deploy locally, on Railway, on Render, or in Docker.
- Open your Railway project โ Variables tab โ Raw Editor.
- Paste the block below.
- Ensure the service's Start Command is
python -m whaleshadow(default fromrailway.json). - Redeploy. Railway will route
$PORTautomatically. - Visit
https://<your-service>.up.railway.app/healthโ should return{"ok": true}.
PORT or WS_API_HOST yourself โ Railway supplies PORT, and the Dockerfile pins the host to 0.0.0.0.
/status on your deploy URL. If mode: setup appears, your broker creds didn't parse โ edit and redeploy. Once you see live equity, run five paper sessions and review trade_log.jsonl before flipping WS_PAPER_MODE=false.
curl -X POST -H "X-API-Token: $WS_API_TOKEN" \ https://<your-railway-url>/control/kill