recipe-launch-grid-bot
GitHub指导用户部署网格交易机器人,包含获取价格、计算挂单层级、沙盒模拟验证及实盘安全控制等步骤,确保策略在震荡市中盈利并防范趋势风险。
Trigger Scenarios
Install
npx skills add krakenfx/kraken-cli --skill recipe-launch-grid-bot -g -y
SKILL.md
Frontmatter
{
"name": "recipe-launch-grid-bot",
"version": "1.0.0",
"metadata": {
"openclaw": {
"domain": "strategy",
"category": "recipe"
},
"requires": {
"bins": [
"kraken"
],
"skills": [
"kraken-grid-trading",
"kraken-paper-to-live"
]
}
},
"description": "Deploy a grid trading bot with paper validation and live safety controls."
}
Launch a Grid Bot
PREREQUISITE: Load the following skills to execute this recipe:
kraken-grid-trading,kraken-paper-to-live
Deploy a grid of buy and sell orders across a price range.
CAUTION: Grids profit in ranging markets but lose in strong trends. Always paper-test first.
Steps
- Get current price:
PRICE=$(kraken ticker BTCUSD -o json 2>/dev/null | jq -r '.[].last_price') - Compute grid levels (e.g., 3 levels at $1000 spacing):
BUY1=$(echo "$PRICE - 1000" | bc),BUY2=$(echo "$PRICE - 2000" | bc),BUY3=$(echo "$PRICE - 3000" | bc),SELL1=$(echo "$PRICE + 1000" | bc),SELL2=$(echo "$PRICE + 2000" | bc),SELL3=$(echo "$PRICE + 3000" | bc) - Paper-test the grid:
kraken workspace create sandbox --capital 10000 --mode paper -o json 2>/dev/null export KRAKEN_WORKSPACE=sandbox - Place paper buy levels:
kraken paper buy BTCUSD 0.001 --type limit --price $BUY1 -o json 2>/dev/null(repeat for BUY2, BUY3) - Place paper sell levels:
kraken paper sell BTCUSD 0.001 --type limit --price $SELL1 -o json 2>/dev/null(repeat for SELL2, SELL3) - Monitor paper fills:
kraken paper orders -o json 2>/dev/null - Review paper results:
kraken workspace status -o json 2>/dev/null - Pre-flight live:
kraken auth test -o json 2>/dev/null && kraken balance -o json 2>/dev/null - Enable dead man's switch:
kraken order cancel-after 3600 -o json 2>/dev/null - Validate live grid orders:
kraken order buy BTCUSD 0.001 --type limit --price $BUY1 --validate -o json 2>/dev/null - Place live grid (requires human approval): place buy and sell levels sequentially using $BUY1-3 and $SELL1-3
- Monitor fills:
kraken ws executions -o json 2>/dev/null - Replace filled levels: when a buy fills, place a sell one level up, and vice versa
If you hit a mismatch between what you are trying to do and the CLI's interface or responses — including a mismatch between this skill and the installed CLI version's contract — feel free to submit feedback with kraken feedback.
Version History
-
aa56e59
Current 2026-08-20 04:46
版本0.4.0更新:引入工作区与记录会话支持可重复研究循环,替换响应格式为可读模式,新增反馈命令,强化账户设置确认及WebSocket安全限制。
- aa32814 2026-07-25 10:29


