docs: update README and runbook for broker-synced reset, confidence dampener, paper account workflow
This commit is contained in:
@@ -132,6 +132,33 @@ curl -X PUT https://stonks-trading.celestium.life/api/trading/config \
|
||||
-d '{"enabled": true}'
|
||||
```
|
||||
|
||||
### Full paper trading reset
|
||||
Liquidates all Alpaca positions, cancels open orders, wipes all local trading state (decisions, orders, positions, snapshots, backtests), and sets engine capital from the broker's actual account balance.
|
||||
|
||||
```bash
|
||||
# Reset and sync capital from broker
|
||||
curl -X POST https://stonks-trading.celestium.life/api/trading/reset \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{}'
|
||||
|
||||
# Or override with a specific capital amount
|
||||
curl -X POST https://stonks-trading.celestium.life/api/trading/reset \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{"initial_capital": 100000}'
|
||||
```
|
||||
|
||||
Note: if the market is closed, Alpaca liquidation orders will be queued and fill at next market open. The engine capital is set immediately.
|
||||
|
||||
### Switching to a new Alpaca paper account
|
||||
Alpaca allows up to 3 paper accounts. To start fresh:
|
||||
1. Go to https://app.alpaca.markets
|
||||
2. Click paper account number → "Open New Paper Account"
|
||||
3. Generate new API keys
|
||||
4. Update secrets on gremlin-1: `alpaca.key`, `alpaca.secret`, `alpaca.url`
|
||||
5. Re-run `runmefirst.sh` or `helm upgrade` with new `--set` values
|
||||
6. Restart broker-adapter: `kso rollout restart deployment/broker-adapter`
|
||||
7. Hit the reset endpoint to sync engine state with the new account
|
||||
|
||||
### Check recent trading decisions
|
||||
```bash
|
||||
curl -s https://stonks-api.celestium.life/api/trading/decisions?limit=10
|
||||
|
||||
Reference in New Issue
Block a user