Loading...
Loading...
Configure, deploy, and manage Senpi Trading Runtime (OpenClaw plugin @senpi-ai/runtime) for automated on-chain position tracking with DSL trailing stop-loss protection. Use when a user needs to create or modify runtime YAML files, configure DSL (Dynamic Stop-Loss) exit engine parameters (phases, tiers, time-based cuts), set up the position_tracker scanner to monitor a wallet's positions on Hyperliquid, install/list/delete runtimes via CLI, or inspect DSL-tracked positions. The runtime does NOT create strategy wallets; create/get the strategy wallet via Senpi MCP first, then link that existing wallet in runtime YAML. Triggers on mentions of senpi, Senpi runtime, DSL exit, stop-loss tiers, position tracker, trailing stop, openclaw senpi, dsl_preset, or strategy YAML configuration."
npx skill4agent add senpi-ai/senpi-skills senpi-trading-runtimeposition_trackerstrategies.<name>.wallet${WALLET_ADDRESS}openclaw senpi runtime createstrategy_liststrategies[].strategyWalletAddressstrategy_create_custom_strategyWALLET_ADDRESSstrategy_listinitialBudgetstrategy_list({})
if provided_wallet not in strategies[].strategyWalletAddress:
# confirm with user first: create new strategy wallet + initialBudget
strategy_create_custom_strategy({
initialBudget: <budget_usdc>,
positions: [],
skillName: <strategy_or_runtime_name>,
skillVersion: "1.0.0"
})initialBudgetpositions: []openclaw gateway runopenclaw senpi --cheatsheet# Create a runtime from YAML file
openclaw senpi runtime create --path ./my-strategy.yaml
openclaw senpi runtime create -p ./my-strategy.yaml # short form
# Create with inline YAML content
openclaw senpi runtime create --content "<yaml>"
openclaw senpi runtime create -c "<yaml>" # short form
# Create with custom ID
openclaw senpi runtime create --path ./my-strategy.yaml --runtime-id my-name
# List installed runtimes (id, wallet, source, status)
openclaw senpi runtime list
# Delete a runtime
openclaw senpi runtime delete <runtime_id> # positional id
openclaw senpi runtime delete --id <runtime_id> # named flag# All active DSL-tracked positions
openclaw senpi dsl positions
openclaw senpi dsl positions -r <id> # filter by runtime id
openclaw senpi dsl positions -a <addr> # filter by wallet address
openclaw senpi dsl positions --json
# Inspect one position (full DslState)
openclaw senpi dsl inspect <ASSET>
openclaw senpi dsl inspect SOL -r <id>
openclaw senpi dsl inspect SOL -a <addr>
openclaw senpi dsl inspect BTC --json
# Archived (closed) positions — reason, ROE, phase, tier
openclaw senpi dsl closes
openclaw senpi dsl closes -r <id>
openclaw senpi dsl closes -a <addr>
openclaw senpi dsl closes -l <n>
openclaw senpi dsl closes --jsonopenclaw senpi status # lightweight health summary (all runtimes)
openclaw senpi status -r <id>
openclaw senpi status --json
openclaw senpi state # full operational state (all runtimes)
openclaw senpi state -r <id>
openclaw senpi state --jsonsenpi guideopenclaw senpi guide # overview + quick command list
openclaw senpi guide scanners # scanner types and config fields
openclaw senpi guide actions # action types and decision modes
openclaw senpi guide dsl # DSL exit engine: phases, tiers, time cuts
openclaw senpi guide examples # print minimal strategy YAML to stdout
openclaw senpi guide schema # full YAML schema field reference
openclaw senpi guide version # plugin version and changelog URLsenpi config~/.openclaw/senpi-cli.jsonopenclaw senpi config set-chat-id <chatId>
openclaw senpi config set-senpi-jwt-token <token>
openclaw senpi config set-state-dir <dir>
openclaw senpi config get <key> # telegram-chat-id | senpi-jwt-token | state-dir
openclaw senpi config list # secrets masked
openclaw senpi config unset <key>
openclaw senpi config resetopenclaw gateway call senpi.installRuntime --params '{"runtimeYamlContent":"..."}'
openclaw gateway call senpi.listRuntimes --json --params '{}'
openclaw gateway call senpi.deleteRuntime --params '{"id":"my-runtime"}'
openclaw gateway call senpi.listDslPositions --json --params '{}'
openclaw gateway call senpi.getDslPositionState --json --params '{"asset":"SOL"}'
openclaw gateway call senpi.listDslArchives --json --params '{"limit":20}'
openclaw gateway call senpi.getHealthStatus --json --params '{}'
openclaw gateway call senpi.getSystemState --json --params '{}'| Method | Params | Success response |
|---|---|---|
| | Runtime installed |
| — | List of runtimes |
| | Deleted |
| | Active positions |
| | Single position state |
| | |
| | |
| | |
listDslArchivesdsl_breachhard_timeoutweak_peak_cutdead_weight_cutexchange_sl_hitmanualnamestrategiesscannersactionsexitnotificationsname: my-tracker
version: 1.0.0
description: >
On-chain position tracker with DSL trailing stop-loss.
strategies:
main:
wallet: "${WALLET_ADDRESS}"
budget: 500
slots: 2
margin_per_slot: 200
trading_risk: conservative # conservative | moderate | aggressive
enabled: true
scanners:
- name: position_tracker
type: position_tracker
interval: 10s
actions:
- name: position_tracker_action
action_type: POSITION_TRACKER
decision_mode: rule
scanners: [position_tracker]
exit:
engine: dsl
interval_seconds: 30 # how often the price monitor runs (5-3600)
dsl_preset: # single preset (no named map needed)
hard_timeout:
enabled: true
interval_in_minutes: 360
weak_peak_cut:
enabled: true
interval_in_minutes: 120
min_value: 5
dead_weight_cut:
enabled: true
interval_in_minutes: 60
phase1:
enabled: true
max_loss_pct: 4.0
retrace_threshold: 7
consecutive_breaches_required: 1
phase2:
enabled: true
tiers:
- { trigger_pct: 7, lock_hw_pct: 40 }
- { trigger_pct: 12, lock_hw_pct: 55 }
- { trigger_pct: 15, lock_hw_pct: 75 }
- { trigger_pct: 20, lock_hw_pct: 85 }
notifications:
telegram_chat_id: "${TELEGRAM_CHAT_ID}"${VAR}${VAR:-default}max_loss_pctretrace_thresholdhard_timeoutweak_peak_cutdead_weight_cutlock_hw_pcttrigger_pctlock_hw_pcttrigger_pctinterval_secondsretrace_thresholdretrace_ROE% / 100 / leverage| Variable | Required | Purpose |
|---|---|---|
| Yes | Existing strategy wallet address from Senpi MCP (used in YAML via |
| For live MCP | Senpi MCP authentication. |
| No | Telegram chat ID for notifications. |
| No | Override DSL state file directory. |
dsl-v5.py