agentsclimarketplace

Position monitor

Skill aAAaqwq/AGI-Super-Team/skills/position-monitor

14 AI executives powered by legendary minds (Musk/Buffett/Simons/Feynman) — deploy your virtual C-Suite in one git clone.From the repository description

Install
npx -y skills add aAAaqwq/AGI-Super-Team --skill position-monitor

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

2.8 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it

📊 仓位监控+止盈止损 Skill v8.1

你是Quant。每小时检查持仓,执行止盈止损/Claim结算。

脚本目录

skills/position-monitor/scripts/
├── poly_positions.py       # 持仓+余额+TP/SL检查
├── get_balance_stable.py   # 三层fallback余额查询
└── trade.py                # CLOB API下单(卖出/查单)

执行原则

  • API-first:持仓查询、止盈止损、卖出走 API
  • Browser 仅用于 Claim / API失败兜底
  • 卖出统一走 scripts/trade.py sell

Step 0: 预检

unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY all_proxy ALL_PROXY
python3 "$SKILL_DIR/scripts/get_balance_stable.py"
  • source: "api" → API正常
  • source: "cache" → 缓存可用
  • source: "fallback_conservative" → 全链路失败,用保守$50

Browser检查只在 Claim / API卖出失败 时触发。


Step 1: 查持仓 + TP/SL

python3 "$SKILL_DIR/scripts/poly_positions.py" --check-tpsl

输出:现金余额、总资产、活跃持仓详情、redeemable、TP/SL触发提示。


Step 2: 执行止盈止损

优先级:先SL → TP → Claim

止损规则 v7.0(三档阶梯 + 持仓新闻调节):

结算豁免优先检查

同时满足 → 跳过所有SL:

  1. 结算 ≤ 12h
  2. Buffer ≥ 2%
  3. 仍盈利

止损表

#基础条件基础动作CRISISBEARISHBULLISH
SL1亏≥15%全止10%全止12%全止18%全止
SL2亏≥10%减仓40%7%减60%8%减50%13%减30%
SL3亏≥5%减仓20%3%减40%4%减30%不触发

止盈表

#条件动作CRISIS/BEARISHBULLISH
TP1≥99¢且结算>4h全卖不变不变
TP2盈≥30%全卖≥25%≥35%
TP3盈≥25%卖80%≥20%≥30%
TP4盈≥15%卖60%≥10%≥20%
TP5峰值回撤≥10pp卖半≥7pp不变
TP6利润腰斩全卖不变不变

新闻强度判断

  • brave-search: "{BTC/ETH} news today" → 前3条含"crash/plunge/hack/ban"=CRISIS,"drop/bearish"=BEARISH,"surge/rally"=BULLISH,其他=NEUTRAL

卖出执行

python3 "$SKILL_DIR/scripts/trade.py" sell <slug> <YES/NO> <usd_amount> [--threshold N]

Step 3: Claim(Browser,非阻塞)

有 redeemable 仓位时:

  1. 检查 browser 可用性
  2. 不可用 → 记录 pending,不卡主流程
  3. 可用 → 打开 portfolio,逐个 Claim

Claim 失败不拖垮主流程。


Step 4: 纯文本总结(必须输出)

📊 仓位监控已完成 HH:MM
总资产 $XX | 现金 $XX | 活跃持仓 N 个
本轮操作:无交易 / 卖出XXX / Claim $X.XX
结果:未触发新TP/SL / 已执行SL2
备注:API正常

What ships with it: 5 files

29.0 KB alongside SKILL.md, 3 of them executable

scripts/

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.